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

# Export Formats

> Export Essal Office documents to PDF, DOCX, XLSX, and other formats using the async export API.

Essal Office supports exporting documents to a range of formats. All exports are processed asynchronously — you submit an export job, poll for completion, and download the result.

## Supported Formats

| Source Type  | Supported Export Formats            |
| ------------ | ----------------------------------- |
| Document     | `pdf`, `docx`, `odt`, `txt`, `html` |
| Sheet        | `xlsx`, `csv`, `ods`, `pdf`         |
| Presentation | `pptx`, `odp`, `pdf`                |

## Submitting an Export Job

```bash theme={null}
POST /v1/office/documents/doc_01HXYZABC/exports
{
  "format": "pdf",
  "options": {
    "include_comments": false,
    "page_size": "A4",
    "orientation": "portrait"
  }
}
```

The response returns an export job object:

```json theme={null}
{
  "job_id": "exp_01HXYZEXP1",
  "status": "pending",
  "format": "pdf",
  "created_at": "2026-07-10T10:00:00Z",
  "expires_at": "2026-07-10T22:00:00Z"
}
```

## Polling for Completion

Check the status of the export job:

```bash theme={null}
GET /v1/office/exports/exp_01HXYZEXP1
```

```json theme={null}
{
  "job_id": "exp_01HXYZEXP1",
  "status": "completed",
  "format": "pdf",
  "download_url": "https://cdn.essal.cloud/exports/exp_01HXYZEXP1.pdf?token=...",
  "size_bytes": 182340,
  "expires_at": "2026-07-10T22:00:00Z"
}
```

The `download_url` is a pre-signed URL valid for 12 hours. After expiry, re-submit the export job.

<Tip>
  Subscribe to the `office.export.completed` webhook event to avoid polling. Your endpoint will receive the completed job object as soon as processing finishes.
</Tip>

## Bulk Exports

Export multiple documents in a single job by submitting a bulk export request:

```bash theme={null}
POST /v1/office/exports/bulk
{
  "items": [
    { "document_id": "doc_01HXYZABC", "format": "pdf" },
    { "document_id": "doc_01HXYZ999", "format": "docx" }
  ],
  "archive_format": "zip"
}
```

The bulk job returns a single ZIP archive containing all exported files. Bulk jobs support up to 50 documents per request.

<Warning>
  Bulk export jobs count against your rate limit tier for bulk operations (10 req/min). Large exports may take several minutes to process for complex documents.
</Warning>
