> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List customers

> List of customers

<Warning>
  **Confirm your deployment before running this request.** This page describes an API contract;
  a published reference does not establish hosted availability. Check the dated
  [host report](/api-reference/hosts) and obtain your deployment URL and credentials.
  Replace the example host if your provisioned service uses a different URL.
</Warning>

### Query parameters

<ParamField query="limit" type="integer (int32)">
  Maximum number of results to return (default: 50).
</ParamField>

<ParamField query="offset" type="integer (int32)">
  Number of results to skip (default: 0). Ignored when `after` cursor is set.
</ParamField>

<ParamField query="after" type="string">
  Cursor for keyset pagination (opaque token from `next_cursor`).
</ParamField>

<ParamField query="email" type="string">
  Filter by email address (exact match).
</ParamField>

<ParamField query="status" type="string">
  Filter by customer status (active, inactive, deleted).
</ParamField>

<ParamField query="tag" type="string">
  Filter by tag.
</ParamField>

<ParamField query="accepts_marketing" type="boolean">
  Filter by marketing opt-in.
</ParamField>

### Response

`CustomerListResponse`

<ResponseField name="customers" type="CustomerResponse[]" required>
  <Expandable title="CustomerResponse">
    <ResponseField name="accepts_marketing" type="boolean" required />

    <ResponseField name="created_at" type="string (date-time)" required />

    <ResponseField name="email" type="string" required />

    <ResponseField name="first_name" type="string" required />

    <ResponseField name="id" type="string (uuid)" required />

    <ResponseField name="last_name" type="string" required />

    <ResponseField name="phone" type="string,null" />

    <ResponseField name="status" type="string" required />

    <ResponseField name="updated_at" type="string (date-time)" required />
  </Expandable>
</ResponseField>

<ResponseField name="has_more" type="boolean" required>
  Whether more results are available after this page.
</ResponseField>

<ResponseField name="limit" type="integer (int32)" required>
  Minimum: `0`.
</ResponseField>

<ResponseField name="next_cursor" type="string,null">
  Opaque cursor for fetching the next page (keyset pagination).
</ResponseField>

<ResponseField name="offset" type="integer (int32)" required>
  Minimum: `0`.
</ResponseField>

<ResponseField name="total" type="integer" required>
  Minimum: `0`.
</ResponseField>

### Status codes

| Code | Meaning |
| - | - |
| `200` | List of customers |
| `400` | Invalid filter parameter |

### Using this contract

Read the [source OpenAPI document](/spec/stateset-icommerce.json) for declared schemas and alternatives.
This page also includes documented corrections from the [spec overlays](https://github.com/stateset/docs/tree/main/spec/overlays).
Example IDs and values are illustrative; replace them with records from your workspace.

<RequestExample>
  ```bash cURL theme={null}
  curl --silent --show-error --fail-with-body --request GET \
    --url 'https://api.stateset.com/api/v1/customers' \
    --header "Authorization: Bearer $STATESET_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "customers": [
      {
        "accepts_marketing": true,
        "created_at": "2026-08-31T14:22:05Z",
        "email": "ada.lovelace@example.com",
        "first_name": "Ada",
        "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
        "last_name": "Lovelace",
        "phone": "+1 415 555 0142",
        "status": "pending",
        "updated_at": "2026-08-31T14:22:05Z"
      }
    ],
    "has_more": true,
    "limit": 20,
    "next_cursor": "string",
    "offset": 1,
    "total": 102
  }
  ```
</ResponseExample>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.