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

# Exports

> Take everything out, as JSON, through an authenticated download.

## What this family does

Export is the portability guarantee. You enqueue a full export of a subject's knowledge, or of the whole organization with an admin key, poll until it succeeds, then stream the document.

The download is a normal authenticated request, not a presigned URL, so the document is never reachable by link alone.

## Routes

| Method | Path                                                                         | Scope   | What it does                |
| ------ | ---------------------------------------------------------------------------- | ------- | --------------------------- |
| `GET`  | [`/v1/exports`](/api-reference/exports/list-exports)                         | `read`  | List exports                |
| `POST` | [`/v1/exports`](/api-reference/exports/create-export)                        | `write` | Create an export            |
| `GET`  | [`/v1/exports/{export_id}`](/api-reference/exports/get-export)               | `read`  | Get an export               |
| `GET`  | [`/v1/exports/{export_id}/download`](/api-reference/exports/download-export) | `read`  | Download an export document |

## Headers that apply here

Neither header is declared as an OpenAPI parameter, so neither appears in the generated schema tables.

* **`X-Exo-Subject`** selects which subject the call acts for on the subject-aware routes above. Omit it to act as the key owner. See [Subjects](/api-reference/subjects).
* **`Idempotency-Key`** makes a retry safe on `POST /v1/exports`. See [Idempotency](/platform/idempotency).

## The shape of a call

Create an export.

<CodeGroup>
  ```bash cURL theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  curl -X POST https://api.get-exo.com/v1/exports \
    -H "X-Exo-API-Key: $EXO_KEY" \
    -H "Content-Type: application/json" \
    -H "Idempotency-Key: c4ca4238a0b92382" \
    -d '{"scope": "user", "format": "json"}'
  ```

  ```python Python theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  import httpx

  response = httpx.post(
      "https://api.get-exo.com/v1/exports",
      headers={"X-Exo-API-Key": EXO_KEY, "Idempotency-Key": "c4ca4238a0b92382"},
      json={"scope": "user", "format": "json"},
  )
  export_id = response.json()["exportId"]
  ```

  ```typescript TypeScript theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
  const response = await fetch("https://api.get-exo.com/v1/exports", {
    method: "POST",
    headers: {
      "X-Exo-API-Key": process.env.EXO_KEY!,
      "Content-Type": "application/json",
      "Idempotency-Key": "c4ca4238a0b92382",
    },
    body: JSON.stringify({ scope: "user", format: "json" }),
  });
  const { exportId } = await response.json();
  ```
</CodeGroup>

The response:

```json theme={"theme":{"light":"github-light-default","dark":"github-dark-default"}}
{
  "exportId": "d94f61a3-5c27-4e80-b16d-8f3a2e70c945"
}
```

## Traps

**JSON is the only format in v1.** The contract pins `format` to a single value. Any other value is a 422.

**`scope: "org"` requires `admin`.** The default `scope: "user"` exports the effective subject and needs only `write`.

**Downloading an unfinished export is 409.** `export_not_ready`. Poll `GET /v1/exports/{export_id}` until `status` is `succeeded`.

**Create and poll use different rate-limit families.** Creating an export is the most expensive operation on the surface and is metered tightly. The list and detail polls are metered as reads so a normal poll loop cannot exhaust your own create budget.

## Related

<Columns cols={2}>
  <Card title="API reference" icon="book-open" href="/api-reference/overview">
    Base URL, authentication, and the conventions every route shares.
  </Card>

  <Card title="Errors" icon="circle-alert" href="/platform/errors">
    The problem envelope and the full code catalogue.
  </Card>
</Columns>
