curl --request POST \
--url 'https://api.stateset.com/api/v1/customers' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"accepts_marketing": true,
"email": "ada.lovelace@example.com",
"first_name": "Ada",
"last_name": "Lovelace",
"metadata": {},
"phone": "+1 415 555 0142",
"tags": [
"priority"
]
}'
{
"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"
}
Create a customer
Create a customer
POST
/
api
/
v1
/
customers
curl --request POST \
--url 'https://api.stateset.com/api/v1/customers' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"accepts_marketing": true,
"email": "ada.lovelace@example.com",
"first_name": "Ada",
"last_name": "Lovelace",
"metadata": {},
"phone": "+1 415 555 0142",
"tags": [
"priority"
]
}'
{
"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"
}
Request body
CreateCustomerRequest
boolean,null
string
required
string
required
string
required
object,null
string,null
array,null
Response
CustomerResponse
boolean
required
string (date-time)
required
string
required
string
required
string (uuid)
required
string
required
string,null
string
required
string (date-time)
required
Status codes
| Code | Meaning |
|---|---|
201 | Customer created |
400 | Invalid request |
422 | Idempotency-Key reused with a different body |
curl --request POST \
--url 'https://api.stateset.com/api/v1/customers' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"accepts_marketing": true,
"email": "ada.lovelace@example.com",
"first_name": "Ada",
"last_name": "Lovelace",
"metadata": {},
"phone": "+1 415 555 0142",
"tags": [
"priority"
]
}'
{
"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"
}
Last modified on August 31, 2026