Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent
with a free APIs.io key —
sign in with
GitHub,
Google or
LinkedIn.
No form to fill in; signing in shares your email address with us (Privacy).
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: doola Partner Customer sessions API
description: 'REST API for doola partners to create and manage customers and companies, retrieve formation documents, and look up reference data.
Authenticate every request with a partner API key in the `Authorization` header. Generate keys and manage your webhook endpoint in the doola Partner Portal.'
contact:
name: doola
url: https://www.doola.com
version: v1
servers:
- url: https://api.test.doola.com
description: Sandbox — use test keys (dk_test_…)
- url: https://api.doola.com
description: Production — use live keys (dk_live_…)
security:
- PartnerApiKey: []
tags:
- name: Customer Sessions
description: Mint the token the doola SDK uses in your customer's browser.
paths:
/v1/partner/customer-sessions:
post:
tags:
- Customer Sessions
summary: Create a customer session
operationId: createSession
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateCustomerSessionRequest'
required: true
responses:
'200':
description: Token issued.
content:
'*/*':
schema:
$ref: '#/components/schemas/CustomerSessionDto'
'400':
description: 'E_VALIDATION_FAILED: a field is invalid, including `servicePrices`: an unknown service name, an unknown currency, prices without a currency, or an amount that is negative or not a whole number.'
'409':
description: 'E_EMAIL_IN_USE: the email cannot be this customer''s, because it belongs to an account outside your tenant, to a non-customer principal such as a portal user, or to another account the customer would be renamed onto. E_RESOURCE_CONFLICT: the matched customer is bound to a different externalCustomerId, this externalCustomerId is bound to another customer, or the customer predates IAM and cannot take a new email. E_CUSTOMER_REVOKED: the customer was deactivated.'
'429':
description: 'E_RATE_LIMITED: too many sessions for your tenant. Retry after the Retry-After header''s seconds.'
x-mint:
metadata:
description: Creates a short-lived session for a signed-in customer from your server, for use with the doola Embedded SDK.
components:
schemas:
ServicePricesDto:
type: object
description: 'Optional prices for this customer, shown in the SDK in place of the prices set in the Partner Portal. If you send prices, they are the complete price list for that customer: a service you leave out is not offered. If you send none (no `servicePrices`, or an empty `pricesInCents`), the portal''s prices apply. doola never charges these: you do, on your own page. A renewal without them falls back to the portal''s prices.'
properties:
currency:
type: string
description: ISO 4217 currency code of every price, such as `USD`, `MXN` or `CLP`. Required when any price is sent.
example: USD
pricesInCents:
type: object
additionalProperties:
type: integer
format: int64
description: 'Price per service, a whole number of at least 0 in the currency''s smallest unit: USD 149.00 is `14900`, CLP 140.000 is `140000`. Names: `EinCreation` (an EIN added from the dashboard) and `VariantEinExpedited` (the extra on top of a Standard EIN, the price of `variant: "Expedite"`). Any other name is refused.'
example:
EinCreation: 9900
VariantEinExpedited: 14900
CreateCustomerSessionRequest:
type: object
description: Send this from your server, never the browser.
properties:
email:
type: string
description: The customer's email. If no customer exists for it under your tenant, one is created.
example: founder@example.com
minLength: 1
externalCustomerId:
type: string
description: '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.'
example: usr_8f21c
maxLength: 255
minLength: 0
firstName:
type: string
description: Only used when provisioning a new customer.
example: Ada
lastName:
type: string
description: Only used when provisioning a new customer.
example: Lovelace
countryOfResidence:
type: string
description: ISO 3166-1 alpha-3. Only used when provisioning a new customer.
example: USA
phoneNumber:
type: string
description: E.164 format. Only used when provisioning a new customer.
example: '+12125550100'
servicePrices:
$ref: '#/components/schemas/ServicePricesDto'
required:
- email
CustomerSessionDto:
type: object
description: A short-lived token for one of your customers.
properties:
accessToken:
type: string
description: Return this to your frontend and hand it to the SDK. It acts only on this customer.
expiresAt:
type: string
format: date-time
description: When the token stops being accepted. Renew before this, not after.
expiresIn:
type: integer
format: int64
description: '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
securitySchemes:
PartnerApiKey:
type: apiKey
description: 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.
name: Authorization
in: header