Skip to main content
POST
Create a draft from an uploaded document

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.

Body

application/json

Turn a document you already uploaded into an editable draft.

Takes a documentId rather than a file, for the reason every other file on this surface does: bytes reach this API through uploads.initiate and the presigned part PUTs, so there is one media allowlist, one size ceiling and one answer to encryption at rest.

The ORIGINAL file is what gets converted, not the text the ingest pipeline extracted for retrieval. That text is chunk-shaped and has already lost the headings a contract is navigated by.

No AI runs. This is a format conversion, so it answers 201 with the draft rather than 202 with an operation.

documentId
string
required

doc_ identifier of a document in this matter to convert into a draft.

Example:

"doc_9f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6"

title
string | null

Title for the draft. Defaults to the document's filename.

Required string length: 1 - 200
Example:

"Master Services Agreement"

category
string
default:custom

What kind of document this is, as a category slug from draftCategories.list. Defaults to custom, which is always accepted.

Required string length: 1 - 64
Example:

"commercial"

Response

Successful Response

One draft with its body, section by section.

id
string
required

Public identifier, drf_ followed by 32 hex characters.

Example:

"drf_9f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6"

title
string
required

The draft's title.

Example:

"Master Services Agreement"

category
string
required

What kind of document this is, as a category slug.

Example:

"commercial"

practiceArea
string
required

Practice area the draft sits in.

Example:

"commercial"

status
string
required

Where the DOCUMENT is in its own lifecycle: draft, review, final or archived. Set by you. This is not the same as generationStatus.

Example:

"draft"

source
string
required

How the draft came to exist: generated by the pipeline, uploaded from a file, imported from editor content, or analysis where an analysis produced it.

Example:

"generated"

version
integer
required

Current version number, counting from 1. Pass it as expectedVersion on a replace to avoid a lost update.

Example:

3

generationStatus
enum<string>
required

Where the JOB that produced this draft got to, in the five public statuses. Set only by the pipeline. A draft the pipeline never touched reads succeeded.

Available options:
queued,
running,
succeeded,
failed,
cancelled
Example:

"succeeded"

createdAt
string<date-time>
required

When the draft was created (RFC 3339).

Example:

"2026-08-19T14:32:10Z"

updatedAt
string<date-time>
required

When the draft was last modified (RFC 3339).

Example:

"2026-08-19T14:32:10Z"

sections
DraftSection · object[]
required

The draft body, section by section. Send edits back as contentMarkdown; request bytes from the export route.

matterId
string | null

mat_ identifier of the matter this draft belongs to, when it belongs to one.

Example:

"mat_9f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6"

governingLawState
string | null

The governing law pinned on the draft, for example ca or federal.

Example:

"ca"

Last modified on August 23, 2026