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

# Log a storefront customer out

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

## `POST /customers/logout`

**Log a storefront customer out**

Signs the customer out. A plain logout only acknowledges the call: discard the session
token on the client. Send `everywhere: true` to revoke every session token issued to
this customer so far, the current one included.

Returns 204. Without a valid session token, returns 401 `CUSTOMER_AUTH_REQUIRED`.

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

### Request Body

Content-Type: `application/json`

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `everywhere` | boolean | No | When true, invalidates every prior session for this customer ("log out everywhere"); otherwise the logout is a client-side token discard. |


### Responses

| Status | Description |
| --- | --- |
| `204` | No content |
| `401` | Missing or invalid storefront publishable key or customer session token |
| `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,
})

await lynkow.customers.logout() // discard the token on this client only
await lynkow.customers.logout({ everywhere: true }) // also revoke all sessions server-side
```

---