> ## Documentation Index
> Fetch the complete documentation index at: https://docs.doola.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Authenticate with the raw API key in the Authorization header. Never add a Bearer prefix.
> Use the sandbox base URL https://api.test.doola.com and a dk_test_ key in examples unless the user asks for production.
> Send an Idempotency-Key header on POST /v1/partner/customers, POST /v1/partner/companies, POST /v1/partner/companies/import, POST /v1/partner/companies/{companyId}/services and POST /v1/partner/companies/{companyId}/documents. No other endpoint takes one.
> Every response is wrapped as {payload, error}. Read fields from payload and branch on error.code, never on the message.
> Drive formation progress from webhooks plus a reconciliation sweep, never a polling loop.
> Embedded SDK (@doola/js): the dk_ key stays on the server and mints customer sessions; the browser gets only a pk_ key and the session. onFormed carries only companyId and can fire more than once. Before charging, read the company with the dk_ key, require formationSubmissionStatus AWAITING_PAYMENT, check the owner's email, and price on the server. Then POST payment-confirmed, which answers 200 with an empty body, and replace the SDK element with a new doola.create() (never append a second one).
> The doola Formation MCP server at https://mcp.doola.com is for founders forming their own company with their own doola account. Platform partners integrate the Partner API or the Embedded SDK. The /mcp endpoint on this docs site only searches these docs.
> Affiliates refer founders to doola with a PartnerStack referral link and coupon code, or with two doola-branded iframe widgets: the Demo Booking Widget (app.doola.com/embed/book-demo?link=<referral link>) and the Company Formation Widget (app.doola.com/embed/partner/<partner ID>). The widgets need no API key and are not the Embedded SDK. Copy the snippets exactly as documented, never add a sandbox attribute to the formation widget iframe.
> For a full capability summary with the rules above, read https://docs.doola.com/skill.md.

# End-to-end flow

> A full solo-founder formation, call by call.

A typical agent dialogue for a single-member Wyoming LLC, in call order. Each formation response names the step the flow waits on in `nextStep`, with its question for the founder in `nextQuestion`; this is what that sequence looks like.

**1. OAuth handshake**

The host signs the user in to doola (or sends them to sign up at the web app). See [Authentication](https://docs.doola.com/mcp/authentication.md).

**2. get\_company\_onboarding\_status**

Find the suggested next step. For a new customer with no company, it points to `start_formation`.

**3. start\_formation**

`{ firstName, lastName }` with the founder's legal name as it appears on their ID, only when the profile lacks it. Sign-up can create an account from an email alone, and Google SSO does not always supply a surname.

**4. start\_formation**

`{ countryOfResidence }`: where the founder personally lives (ISO 3166-1 alpha-3).

**5. start\_formation**

`{ companyName }`: the primary name, without the `LLC` suffix.

**6. start\_formation**

`{ state, entityType }`: where to form and whether as an LLC or a C-Corp. `{}` forms a Wyoming LLC, the default. The answers in these four steps can go in one call when the founder gives them together.

**7. create\_checkout\_session**

`{}`: accepts the Terms of Service and returns live `pricing` with the Stripe checkout. Quote `pricing.summary` (the first-year list price) and `chargeSummary` (what Stripe charges today) verbatim, share the `checkoutUrl`, and keep `checkoutSessionId`.

**8. User pays**

The founder completes the Stripe checkout and returns saying "I paid".

**9. verify\_payment**

`{ checkoutSessionId }`. Wait for `paymentStatus=Complete` before asking any post-payment question.

**10. search\_industries, then save\_company\_details**

Fetch the list, match the founder's description, let them pick a verbatim entry, then save `{ industry, description, sellingPlatform? }`. Keep `description` to 50 characters or fewer.

**11. save\_company\_details**

`{ alternateNames: [ ... ] }`: up to two backup names. The primary name stays as saved.

**12. save\_company\_details**

`{ registeredAddress: { provider: "registeredAgent" } }`: usually doola's registered agent (included).

**13. save\_company\_details**

`{ mailingAddress: { provider: "registeredAgent" } }` uses the doola registered agent address. It is the default, and the only option for a founder without a US address.

**14. save\_company\_details**

`{ members: [{ legalFirstName, legalLastName, ownershipPercent: 100, address }] }`. Solo founder: auto-fill the name from the profile and ask only for the phone and address. Ownership is saved with the members.

**15. save\_company\_details**

`{ responsibleParty: { legalFirstName, legalLastName, email, address } }`. Offer the members (or a C-Corp's officers) as the choices, defaulting to the sole member or the President, and accept anyone else the founder names. Confirm the email, since the SS-4 and Form 8821 are sent there.

**16. request\_ssn\_entry\_link**

`{}`, only when `nextStep` names it: the responsible party lives in the US and doola has no SSN for them yet. The founder signs in to doola with the same account and types the SSN on a doola-hosted page, opened through URL elicitation or from the `ssnEntryUrl` the agent pastes, never in the chat. Optional: a founder who skips it gets the SS-4 by email as before.

**17. Confirm**

Present a complete markdown summary table of everything collected. Ask the user to reply "submit".

**18. submit\_formation**

`{ userConfirmed: true }` files the formation. **Irreversible.**

> [!TIP]
>
> `save_company_details` saves whatever sections it is given, so an agent can save each answer as it comes or several at once. For co-founders, `members` carries every member with their `ownershipPercent`, and the percentages must total exactly 100. A C-Corp sends `executiveMembers` (at least one President, Secretary, Treasurer and Director) in place of `members`, then `shareStructure` (`authorizedShares` and `parValue`) after the responsible party. Everything else is identical.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.