Skip to main content
POST
Export a draft as DOCX or PDF

Authorizations

Authorization
string
header
required

Workspace credential issued from the automation console at /automation. Send it as Authorization: Bearer vq_ws_.... This is NOT a Data API key: a vq_key_ credential is refused here and names the other product in the error.

Path Parameters

matterId
string
required

mat_ identifier of the matter to work inside. Everything in this API hangs off a matter, and the matter in the path is what the authorization boundary is checked against. Take it from GET /v1/matters.

draftId
string
required

drf_ identifier of the draft. Take it from the matter's draft list.

Body

application/json

Ask for the draft rendered to a file.

format
enum<string>
required

Which format to render: docx or pdf.

Available options:
docx,
pdf
Example:

"docx"

Response

Successful Response

A rendered draft, returned as bytes rather than as a URL.

Every other artifact on this API is a signed URL over an object a worker already wrote. A draft export is rendered on demand, so a URL would mean writing client work product to storage first, and with encryption on in every deployment that is a choice between a URL the customer cannot decrypt and plaintext in a bucket. content is base64 and bounded by MAX_INLINE_EXPORT_BYTES; docs 10-DRAFT_BODY.md records the trade.

format
enum<string>
required

The format that was rendered.

Available options:
docx,
pdf
Example:

"docx"

filename
string
required

Suggested filename for the rendered file.

Example:

"msa-acme-v3.docx"

sizeBytes
integer
required

Length of the DECODED file in bytes, so you can size storage without doing base64 arithmetic.

Example:

248193

content
string
required

The rendered file, base64 encoded. Bytes rather than a signed URL because a draft is rendered on demand: a URL would mean writing your work product to storage first.

Example:

"UEsDBBQABgAIAAAAIQ..."

unfilledPlaceholders
integer
required

How many [Party Name]-style placeholders are still unfilled. Check it before filing an export unread: a non-zero value means the document is not finished.

Example:

0

Last modified on August 23, 2026