Customer sessions

Create a customer session

Changed on
post/v1/partner/customer-sessions

Request

  • Base URL
    https://api.test.doola.com
  • URL
    https://api.test.doola.com/v1/partner/customer-sessions
  • Auth
    API key in header Authorization

Request body

emailstring required

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

externalCustomerIdstring

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.

firstNamestring

Only used when provisioning a new customer.

lastNamestring

Only used when provisioning a new customer.

countryOfResidencestring

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

phoneNumberstring

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

Example request

{
  "email": "founder@example.com",
  "externalCustomerId": "usr_8f21c",
  "firstName": "Ada",
  "lastName": "Lovelace",
  "countryOfResidence": "USA",
  "phoneNumber": "+12125550100"
}

Response

Token issued.

accessTokenstring

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

expiresAtstring date-time

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

expiresIninteger

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 response

{
  "expiresIn": 600
}

Changes