Document Access

Export Document Asynchronously

Changed on

Starts an asynchronous export of one or more document pages. Use the returned job ID with the Get Document Export Job Status endpoint to check progress and obtain a download URL after the export succeeds.

The Accept header selects the export format. The Idempotency-Key header marks a job as unique: using a different idempotency key will trigger a new job request, even if the request is identical to a previous one

Admin flow: Account owners and document admins can export any document in their account by setting Lucid-Request-As: admin and authenticating with an admin scope or DocumentAdmin API key grant.

Synchronous and asynchronous exports share a per-account rate limit.

post/v1/documents/{id}/export/jobs

Request

  • Base URL
    https://api.lucid.co
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://lucid.app/oauth2/authorize
      Token URLhttps://api.lucid.co/oauth2/token
      Scopeslucidchart.document.content:readonly, lucidchart.document.content:admin.readonly, lucidchart.document.app.picker:readonly, lucidchart.document.app.folder, lucidscale.document.content:readonly, lucidscale.document.content:admin.readonly, lucidscale.document.app.picker:readonly, lucidscale.document.app.folder, lucidspark.document.content:readonly, lucidspark.document.content:admin.readonly, lucidspark.document.app.picker:readonly, lucidspark.document.app.folder
  • TypeScript
    A function with typed inputs. Its response is checked against the schema.

Path parameters

idstring uuid required

ID of the document to export.

Query parameters

pageIdstring[]

ID of a document page to export. Provide multiple pageId query parameters to export multiple pages. Cannot be provided with page.

pageinteger[]

One-based index of a document page to export. Provide multiple page query parameters to export multiple pages. Cannot be provided with pageId.

cropstring

Specifies the crop settings for the document export. Optional for export operation. Possible values are

  • Default (no crop parameter) - Exports the entire page canvas area that contains your content. Automatically adjusts to include all items on the page, including the space between them and maintains the relative positioning and spacing of your document elements
  • x, y, width, height - Crop to the specified region (in pixels) on the page. Example crop=1000,300,30,7
    • Note: The region (in pixels) is accurate to the number of pixels on the canvas. The number of pixels of the outputted image will only match the crop window at a DPI of 160.
  • content - Crop to page content. Example crop=content
dpiinteger

Output resolution in dots per inch.

widthinteger

Output width in pixels.

aspectRatio'inherit' | '1:1'

Aspect-ratio handling for the exported image.

Headers

Lucid-Request-As'admin'

Make the request with account-admin permissions. Requires a valid admin scope or DocumentAdmin API key grant.

Acceptstring

Export format. Defaults to image/png. Image formats may include a dpi parameter, for example image/png;dpi=256.

Idempotency-Keystring

Distinguishing key for duplicate job requests. Use a different value if intending to run the same job twice.

Response

OK. Returns the identifier of the queued or existing export job.

jobIdstring required

Unique identifier for an asynchronous job

Example response

{
  "jobId": "jobr_2f5e5b82-6f1d-4c9f-932a-14e43cf30454"
}

Changes