/v1/customersCreate a customer
Creates a new customer record. Returns the created customer object. Email must be unique within your account.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| body | string | required | Customer email address. Must be unique within your account. | |
| name | body | string | optional | Customer full name. |
| phone | body | string | optional | E.164-formatted phone number. |
| metadata | body | object | optional | Arbitrary key-value pairs. Strings only. Max 50 keys. |
Example request
curl -X POST https://api.spalce.dev/v1/customers \
-H "Authorization: Bearer sk_live_..." \
-H "Spalce-Version: 2026-05-01" \
-H "Idempotency-Key: cust_create_7f2c3a1b" \
-d '{
"email": "[email protected]",
"name": "Ada Lovelace",
"phone": "+233244000000"
}'const customer = await spalce.customers.create({
email: '[email protected]',
name: 'Ada Lovelace',
phone: '+233244000000',
}, { idempotencyKey: 'cust_create_7f2c3a1b' });customer = spalce.Customer.create(
email='[email protected]',
name='Ada Lovelace',
phone='+233244000000',
idempotency_key='cust_create_7f2c3a1b',
)Example response 201 Created
{
"id": "cus_01HE7K8RABCDEF",
"object": "customer",
"email": "[email protected]",
"name": "Ada Lovelace",
"phone": "+233244000000",
"metadata": {},
"created": "2026-06-16T08:42:00Z"
}