Skip to main content
POST
/
v1
/
documents
/
export
/
email-request
Queue an asynchronous export and email the download link to the recipient.
curl --request POST \
  --url https://api.example.com/v1/documents/export/email-request \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "session_id": "<string>",
  "format": "docx",
  "options": {
    "paper_size": "Letter",
    "orientation": "portrait",
    "margins": "normal",
    "custom_margins_inches": {
      "top": 1.625,
      "right": 1.625,
      "bottom": 1.625,
      "left": 1.625
    },
    "filename": "<string>",
    "embed_images": false,
    "watermark_text": "<string>",
    "watermark_opacity": 0.3
  },
  "filename": "<string>",
  "recipient_email": "<string>"
}
'
{
  "job_id": "<string>",
  "recipient_email": "<string>",
  "status": "queued",
  "eta": "<string>",
  "message": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body for the async email-fallback export. Used when the synchronous export would exceed the 100 MB format cap.

session_id
string
required

Session whose current document state should be exported.

format
enum<string>
default:docx

Output format. docx (default) is Microsoft Word Open XML. pdf is paginated and print-ready. html is a standalone file with inlined CSS. markdown emits .md with ATX headings. txt is plain text. doc is a legacy Word-compatible HTML wrapper accepted as a back-compat alias and will be removed in a future release.

Available options:
docx,
pdf,
html,
markdown,
txt,
doc
options
ExportOptions · object

Per-request customisation for the export pipeline.

filename
string | null

Optional output filename without extension.

recipient_email
string | null

Email to deliver the download link to. Falls back to the authenticated account's email when omitted.

Response

Job queued for background export.

job_id
string
required
recipient_email
string
required
status
enum<string>
required
Available options:
queued
eta
string
required

Service-level commitment, e.g. 24h.

message
string
required