Create Customer

Create a new customer with the provided information. This customer profile can be used for future transactions, invoices, and payment tracking.
Customer creation is - duplicate requests with the same email will return the existing customer.

Endpoint

curl -X POST https://api.devdraft.ai/v0/customers \
  -H "Authorization: Bearer sk_test_your_secret_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "John Doe",
    "email": "john@example.com",
    "phone": "+1234567890"
  }'

Request Parameters

Response

Returns the created customer object with a 201 Created status.
{
  "id": "cust_123456789",
  "name": "John Doe",
  "email": "john@example.com",
  "phone": "+1234567890",
  "created_at": "2023-01-01T00:00:00Z",
  "updated_at": "2023-01-01T00:00:00Z"
}