Skip to main content
POST
/
v1
/
customers
Create Customer
curl --request POST \
  --url https://api.daya.co/v1/customers \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <x-api-key>' \
  --data '
{
  "email": "<string>",
  "first_name": "<string>",
  "last_name": "<string>"
}
'
{
  "id": "650e8400-e29b-41d4-a716-446655440000",
  "email": "customer@example.com",
  "first_name": "John",
  "last_name": "Doe",
  "created_at": "2026-01-05T15:04:05Z",
  "updated_at": "2026-01-05T15:04:05Z"
}

Overview

Create a customer record that can be referenced by customer_id in onramp requests. Customers are scoped to the authenticated merchant.

Authentication

X-Api-Key
string
required
Your merchant API key

Request Body

email
string
required
Customer email address (must be valid)Example: customer@example.com
Email is normalized to lowercase and trimmed before storage.
first_name
string
Customer first name (1–100 characters)Example: John
last_name
string
Customer last name (1–100 characters)Example: Doe

Request Example

{
  "email": "customer@example.com",
  "first_name": "John",
  "last_name": "Doe"
}

Response

id
string
required
Unique customer identifier (UUID)
email
string
required
Customer email address
first_name
string
Customer first name
last_name
string
Customer last name
created_at
string
required
When the customer was created (ISO 8601 timestamp)
updated_at
string
required
When the customer was last updated (ISO 8601 timestamp)

Success Response

{
  "id": "650e8400-e29b-41d4-a716-446655440000",
  "email": "customer@example.com",
  "first_name": "John",
  "last_name": "Doe",
  "created_at": "2026-01-05T15:04:05Z",
  "updated_at": "2026-01-05T15:04:05Z"
}

Error Responses

{
  "error": {
    "code": "validation_failed",
    "message": "Validation failed",
    "details": "email is required and must be a valid email address"
  }
}

Notes

  • Customers are scoped to the authenticated merchant — the same email can exist under different merchants.
  • Once created, a customer can be referenced by customer_id in onramp requests instead of providing an email each time.