Skip to content

Customers API

List Customers

GET /api/customers

Query Parameters:

ParameterTypeDescription
pagenumberPage number (default: 1)
per_pagenumberItems per page (default: 20)
searchstringSearch by name or email

Response:

json
{
  "items": [
    {
      "id": "cus_xxx",
      "email": "[email protected]",
      "firstName": "John",
      "lastName": "Doe",
      "company": "Acme Inc",
      "country": "US",
      "createdAt": "2025-01-01T00:00:00.000Z"
    }
  ],
  "pagination": { "page": 1, "perPage": 20, "total": 50, "totalPages": 3 }
}

Get Customer

GET /api/customers/:id

Returns the customer with their licenses, payments, and subscriptions.

Create Customer

POST /api/customers
json
{
  "email": "[email protected]",
  "firstName": "John",
  "lastName": "Doe",
  "company": "Acme Inc",
  "phone": "+1234567890",
  "street": "123 Main St",
  "city": "New York",
  "state": "NY",
  "postalCode": "10001",
  "country": "US",
  "timezone": "America/New_York",
  "metadata": { "source": "manual" }
}

Only email is required.

Update Customer

PUT /api/customers/:id

Accepts partial body.

Delete Customer

DELETE /api/customers/:id