Create a customer

View as Markdown

Creates a new customer record. The email field is required. You can provide a full name (which will be split into first_name and last_name) or provide them separately.

If company_name is provided, the customer type is automatically set to business.

Authentication

AuthorizationBearer

Use a secret key (sk_test_* or sk_live_*) for full read/write access, or a public key (pk_test_* or pk_live_*) for read-only access.

Request

This endpoint expects an object.
emailstringRequiredformat: "email"
Customer email address.
namestring or nullOptional

Full name. Will be split into first_name and last_name if those are not provided separately.

first_namestring or nullOptional
last_namestring or nullOptional
company_namestring or nullOptional

If provided, customer type is set to business.

external_idstring or nullOptional

Your application’s unique identifier for this customer. Used for lookups via GET /customers/{external_id}.

phonestring or nullOptional
country_idstring or nullOptionalformat: "uuid"
metadataobject or nullOptional

Response

Customer created successfully
dataobject

Errors

401
Unauthorized Error
403
Forbidden Error
422
Unprocessable Entity Error