> ## 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 and POST /v1/partner/companies. 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. Partners integrate the Partner API or the Embedded SDK. The /mcp endpoint on this docs site only searches these docs.
> For a full capability summary with the rules above, read https://docs.doola.com/skill.md.

# Presentation and mobile

> How the SDK sits on your page, how it behaves on phones, and how to serve it from your own domain.

## Inline

By default the SDK is an inline block on your page. `doola.create()` returns a `<doola-embed>` element that takes the full width of its container. Its height follows the content as the founder moves through the wizard, so your page scrolls, never the iframe.

* Give the container the width you want. Below 768px the wizard switches to a compact step indicator.
* Leave the height alone. The element reserves 160px until the first screen renders, then grows. Hidden with `display: none` and shown again, it keeps its height.
* When the founder opens a new step or section, the SDK asks your page to scroll it into view.

## Full screen on phones

On a phone, an inline iframe can end up behind the on-screen keyboard. So with the default `presentation: { mode: 'auto' }`, the SDK switches to a full-screen overlay when the viewport is 640px wide or narrower:

* the iframe covers the whole viewport, above everything else on your page;
* your page stops scrolling while it is open, and the iframe scrolls itself;
* it returns to inline when the viewport grows past 640px.

To use the overlay at every width, pass `{ mode: 'fullScreen' }`:

```ts theme={null}
const doola = await loadDoola({
  // ...
  presentation: { mode: 'fullScreen' },
});
```

Remove the element to close the overlay, for example when you open your checkout from `onFormed`.

<Note>
  If the iframe never starts, for example because a CSP blocks it, the SDK releases the overlay and the scroll lock before it reports `render_error`. The founder is never left on a blank screen they cannot leave.
</Note>

## Language

The SDK is in English. `locale` accepts a BCP 47 tag and `doola.update({ locale })` changes it later, so your integration will pick up new languages without a code change once they ship.

## Your own domain

By default the iframe is served from `sdk.doola.com`. To serve it from a subdomain of yours, such as `formation.example.com`, contact doola. doola adds the domain to its CDN and issues its certificate first. Then pass it as `origin`:

```ts theme={null}
const doola = await loadDoola({
  // ...
  origin: 'https://formation.example.com',
});
```

Keep `origin` a constant in your code. The SDK posts the founder's session token to that origin, so never build it from a URL parameter or user input. Update your [CSP](/sdk/security#content-security-policy) `frame-src` to the new origin.


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