What you need
Before your first request
- An API key for the environment you are targeting, provided by the doola team (looks like
dk_test_...for sandbox ordk_live_...for production). - A webhook signing secret, used to verify incoming webhook events.
- Any REST client (curl, Postman, your backend HTTP library).
Environments
Always build and test against sandbox first. Sandbox keys never trigger real state filings or charges.
Your first call
Authenticate every request with your API key in theAuthorization header.
doolaCustomerId. Save it: you will need it to submit a company formation.
How formation works
Formation is a two step flow, then asynchronous progress delivered over webhooks.1
Create a customer
Call Create customer with the person’s details. You get back a
doolaCustomerId. One customer can own many companies.2
Submit a company formation
Call Create company with that
doolaCustomerId and the company details. Set entityType to LLC (the default) or CCorp — see Company formation for what each one needs. This starts the formation.3
Track progress with webhooks
Formation is asynchronous. Do not poll. Subscribe to webhook events to learn when formation completes and documents are ready.
Key concepts
- Idempotency. The create endpoints require an
Idempotency-Keyheader. Use a unique key per logical operation. Retrying with the same key and body is safe and never duplicates. If a create fails, the key is released — fix the request and retry with the same key. Once a create succeeds, reusing its key with a different body returns409 E_IDEMPOTENCY_KEY_REUSED. See Authentication. - Consistent errors. Every error carries a machine readable
code, so you can branch on it without parsing strings. See Errors. - Reference data. Country, state, NAICS, and fee lookups live in the API reference so your forms always submit valid values.
- Sandbox playground. Two sandbox-only endpoints complete the formation and EIN milestones on demand, firing the real webhooks, so you can exercise your whole integration without waiting on the state or the IRS. See Sandbox playground.
- Non-US founders. doola forms US companies for founders anywhere in the world. A non-US founder signs an SS-4 (and, for an expedited EIN, a Form 8821) before the EIN is issued, and the company response tells you when that applies. See Non-US founders.
- Expedited EIN. Partners whose partner agreement includes Expedited EIN can request prioritized EIN processing for non-US founders at company creation. See Expedited EIN.