Documents

Export content and store it as a document

POST
/documents/export-save

Convert content into an official file format: PDF, Word (docx), Excel (xlsx), CSV, HTML or Markdown. The source is exactly one of: an existing document (document_id), inline markdown, inline html, one table or several sheets. Tables over 2,000 rows only export as xlsx or csv. Stores the file as a new document in a Space (upload permission required). space_id and folder_id default to the source document's location. Use documents.export when the user only needs a download.

Authorization

bearerApiKey
AuthorizationBearer <token>

Create a scoped API key in the Adlass settings.

In: header

Header Parameters

X-Request-Id?string

Optional correlation identifier.

Lengthlength <= 128
Idempotency-Key*string

A unique key for this intended write. Reuse it only for an identical retry.

Length1 <= length <= 200

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/documents/export-save" \  -H "Idempotency-Key: 123e4567-e89b-42d3-a456-426614174000" \  -H "Content-Type: application/json" \  -d '{    "format": "pdf"  }'
{  "document_id": "123e4567-e89b-42d3-a456-426614174000",  "space_id": "123e4567-e89b-42d3-a456-426614174000",  "folder_id": "123e4567-e89b-42d3-a456-426614174000",  "file_name": "invoice-2026-09.pdf",  "media_type": "example",  "size_bytes": 0,  "processing_job_id": "123e4567-e89b-42d3-a456-426614174000"}