> For the complete Lynkow documentation index in agent-friendly format, see [llms.txt](/llms.txt).

# Activate a storefront customer account

**Published**: 2026-11-30
**Category**: Commerce

## `POST /customers/activation/confirm`

**Activate a storefront customer account**

Completes an account from its activation link and signs the buyer in.

Send the link's `token`, a `password` and `acceptsTerms: true`. `firstName`, `lastName`
and `phone` fill only empty profile fields. With `marketingOptIn: true`, the buyer opts
in on every marketing channel without an earlier choice.

The email is marked verified and earlier session tokens stop working. The buyer may
also receive a one-time welcome email.

Returns 200 with `{ customer, token }`. An invalid, expired or used link, or an
account that already has a password, returns 400 `VERIFICATION_LINK_INVALID`. After ten
failed attempts from one client, sign-ins included, further attempts return 429
`RATE_LIMIT_EXCEEDED` with a `Retry-After` header for up to 15 minutes.

> **Note:** Available only on sites with e-commerce enabled.

### Request Body

Content-Type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `token` | string | Yes | Required. Min 1 character |
| `password` | string | Yes | Required. 8-100 characters |
| `firstName` | string | No | Given name; on an address, the recipient's. 1-100 characters |
| `lastName` | string | No | Family name; on an address, the recipient's. 1-100 characters |
| `phone` | string | No | Phone number, stored as entered: no format is checked. 3-40 characters |
| `locale` | string | No | The buyer's preferred language, stored normalized; an unusable value is ignored. The accepted terms and any marketing opt-in are recorded in it |
| `acceptsTerms` | "true" | Yes | Required. Terms-of-service acceptance. Any other value returns 422 and the account is not activated. One of: true |
| `marketingOptIn` | boolean | No | Optional marketing opt-in. When true, opts the customer in on every supported marketing channel. |
| `consentVersion` | string | No | Label of the consent text shown, recorded with an opt-in. Cut to 100 characters; an unusable value is ignored. |


### Responses

| Status | Description |
| --- | --- |
| `200` | Successful response |
| `401` | Missing or invalid storefront publishable key |
| `402` | The site subscription does not currently permit this operation |
| `403` | The storefront key origin is not allowed |
| `404` | Site, resource, or commerce feature not found |
| `422` | Validation error |


### SDK

```typescript
import { createClient } from 'lynkow'

const lynkow = createClient({
  siteId: process.env.LYNKOW_SITE_ID!,
  publishableKey: process.env.LYNKOW_PK,
})

// On the page the activation link opens, e.g. /account/activate/[token]
const { customer } = await lynkow.customers.activation.confirm({
  token: params.token,
  password: form.password,
  acceptsTerms: true,
  firstName: 'Alice',
})
```

---