Customers
Customers are the end-users of your product. These endpoints allow you to list existing customers and sync new ones from your CRM or billing system.
List customers
GET /api/v1/customers/
Retrieve a paginated list of customers for your company.
Query parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
limit | integer | No | 20 | Results per page (max 100). |
offset | integer | No | 0 | Number of results to skip. |
Example request
curl -sS \
-H 'Authorization: Api-Key scalar*live*...' \
'https://<your-host>/api/v1/customers/'
Success response (200 OK)
{
"results": [
{
"id": 2001,
"email": "[email protected]",
"first_name": "Sam",
"last_name": "Singh"
}
],
"count": 1
}
Upsert a customer
POST /api/v1/customers/
Create a new customer or update an existing one. If a user with the provided email already exists, they will be attached to your company with the CUSTOMER role.
Request body fields
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Valid email address for the customer. |
first_name | string | No | Customer's first name. |
last_name | string | No | Customer's last name. |
Example request
curl -sS \
-X POST \
-H 'Authorization: Api-Key scalar*live*...' \
-H 'Content-Type: application/json' \
-d '{
"email": "[email protected]",
"first_name": "Sam",
"last_name": "Singh"
}' \
'https://<your-host>/api/v1/customers/'
Success responses
- 201 Created: A new user was created.
- 200 OK: An existing user was updated or attached to your company.
Returns the Customer object.
Objects
Customer object
| Field | Type | Description |
|---|---|---|
id | integer | Unique internal ID. |
email | string | Customer's email address. |
first_name | string | Customer's first name. |
last_name | string | Customer's last name. |
