Skip to main content
POST
Create a customer session

Authorizations

Authorization
string
header
required

Partner API key. Send the raw key as the Authorization header value — e.g. dk_test_… in sandbox or dk_live_… in production. Generate and rotate keys in the doola Partner Portal.

Body

application/json

Send this from your server, never the browser.

email
string
required

The customer's email. If no customer exists for it under your tenant, one is created.

Minimum string length: 1
Example:

"founder@example.com"

externalCustomerId
string

Your own id for this customer. Optional, and the recommended integration: it is matched before the email, so a customer who changes their address in your system stays the same doola customer instead of being provisioned again with an empty wizard. Unique per tenant.

Maximum string length: 255
Example:

"usr_8f21c"

firstName
string

Only used when provisioning a new customer.

Example:

"Ada"

lastName
string

Only used when provisioning a new customer.

Example:

"Lovelace"

countryOfResidence
string

ISO 3166-1 alpha-3. Only used when provisioning a new customer.

Example:

"USA"

phoneNumber
string

E.164 format. Only used when provisioning a new customer.

Example:

"+12125550100"

Response

Token issued.

A short-lived token for one of your customers.

accessToken
string

Return this to your frontend and hand it to the SDK. It acts only on this customer.

expiresAt
string<date-time>

When the token stops being accepted. Renew before this, not after.

expiresIn
integer<int64>

Remaining lifetime in seconds at mint. Schedule renewal from this, not from expiresAt: a relative timer keeps the end user's device clock out of the arithmetic.

Example:

600