Docs
API Reference

Customers Endpoint

List, create, and update customer records via the API.

List customers

GET /customers

Scopes required: customers:read

Query parameters:

ParameterTypeDescription
emailstringFilter by email address
externalIdstringFilter by your system's customer ID
limitnumberResults per page (default: 20, max: 100)
cursorstringPagination cursor

Response:

{
  "customers": [
    {
      "id": "cus_01abc...",
      "email": "jane@example.com",
      "name": "Jane Smith",
      "externalId": "usr_12345",
      "metadata": {
        "plan": "pro"
      },
      "ticketCount": 3,
      "createdAt": "2025-01-01T00:00:00Z"
    }
  ],
  "nextCursor": null
}

Create a customer

POST /customers

Scopes required: customers:write

Request body:

{
  "email": "john@example.com",
  "name": "John Doe",
  "externalId": "usr_99999",
  "metadata": {
    "plan": "enterprise",
    "accountAge": "24 months"
  }
}

externalId is your internal ID for this customer. If you provide an externalId that already exists, the existing customer is returned (upsert behaviour).

Get a customer

GET /customers/:id

Scopes required: customers:read

Update a customer

PATCH /customers/:id

Scopes required: customers:write

Request body (all fields optional):

{
  "name": "Jane Doe",
  "metadata": {
    "plan": "pro"
  }
}

metadata is a free-form key-value object (string values only). It's merged with existing metadata — to remove a key, set it to null.

On this page