curl -X POST https://api.playto.so/v1/customers/ \
-H "X-API-KEY: sk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Smith",
"email": "jane@acme.com",
"phone": "+1 555 000 1234"
}'
curl -X POST https://api.playto.so/v1/customers/ \
-H "X-API-KEY: sk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Smith",
"email": "jane@acme.com"
}'
{
"id": "e5f6a7b8-c9d0-1234-efab-345678901234",
"name": "Jane Smith",
"email": "jane@acme.com",
"phone": "+1 555 000 1234",
"created_at": "2024-05-01T10:00:00Z"
}
{
"id": "e5f6a7b8-c9d0-1234-efab-345678901234",
"name": "Jane Smith",
"email": "jane@acme.com",
"phone": "+1 555 000 1234",
"created_at": "2024-05-01T10:00:00Z"
}
Customers
Create Customer
Create a new customer record. If a customer with the same email already exists, their existing record is returned.
POST
/
customers
/
curl -X POST https://api.playto.so/v1/customers/ \
-H "X-API-KEY: sk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Smith",
"email": "jane@acme.com",
"phone": "+1 555 000 1234"
}'
curl -X POST https://api.playto.so/v1/customers/ \
-H "X-API-KEY: sk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Smith",
"email": "jane@acme.com"
}'
{
"id": "e5f6a7b8-c9d0-1234-efab-345678901234",
"name": "Jane Smith",
"email": "jane@acme.com",
"phone": "+1 555 000 1234",
"created_at": "2024-05-01T10:00:00Z"
}
{
"id": "e5f6a7b8-c9d0-1234-efab-345678901234",
"name": "Jane Smith",
"email": "jane@acme.com",
"phone": "+1 555 000 1234",
"created_at": "2024-05-01T10:00:00Z"
}
Authentication
RequiresX-API-KEY header.
You can also pass an optional Idempotency-Key header to safely retry requests without creating duplicate records. See the Idempotency guide for details.
Body Parameters
Response
Returns the customer record. If the email already exists in your account, the existing customer is returned with HTTP200. A new customer returns HTTP 201.
This endpoint is idempotent by email. Sending the same email twice will not create a duplicate - the existing customer is returned with a
200 OK response.curl -X POST https://api.playto.so/v1/customers/ \
-H "X-API-KEY: sk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Smith",
"email": "jane@acme.com",
"phone": "+1 555 000 1234"
}'
curl -X POST https://api.playto.so/v1/customers/ \
-H "X-API-KEY: sk_live_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Jane Smith",
"email": "jane@acme.com"
}'
{
"id": "e5f6a7b8-c9d0-1234-efab-345678901234",
"name": "Jane Smith",
"email": "jane@acme.com",
"phone": "+1 555 000 1234",
"created_at": "2024-05-01T10:00:00Z"
}
{
"id": "e5f6a7b8-c9d0-1234-efab-345678901234",
"name": "Jane Smith",
"email": "jane@acme.com",
"phone": "+1 555 000 1234",
"created_at": "2024-05-01T10:00:00Z"
}
