Skip to main content
POST
Extract starter positions from a contract

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.

Headers

Idempotency-Key
string | null

A unique value of your choosing, so a retried launch returns the FIRST operation instead of starting a second billable job. Reusing one with a different body is refused. Retrying with the same key and the same body is free and is the intended way to recover from a timeout.

Body

application/json

The contract to read positions out of. Exactly one source.

documentId or contractText, never both and never neither. Text is accepted for the same reason reviews.create accepts it: the caller usually has the contract in hand, and requiring an upload first would make the cheapest integration a four-call dance. A documentId is the better choice when the file is a DOCX whose structure matters, and it is REQUIRED for tracked-changes extraction.

documentId
string | null

doc_ identifier of a document in this organization to read. Mutually exclusive with contractText.

Example:

"doc_9f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6"

contractText
string | null

The contract as plain text. Mutually exclusive with documentId. Use it when you already hold the text and do not need the file kept.

Maximum string length: 400000
Example:

"MASTER SERVICES AGREEMENT\n\nThis Master Services Agreement is entered into as of 19 August 2026 between Acme Corporation, a Delaware corporation, and the Supplier identified on the signature page.\n\n8. LIMITATION OF LIABILITY. Supplier's total liability arising out of this Agreement shall not exceed the fees paid in the preceding twelve months, except for breach of confidentiality and indemnification for third-party intellectual property claims, which are uncapped.\n\n9. INDEMNIFICATION. Supplier shall defend and indemnify Acme Corporation against any third-party claim that the services infringe a United States patent, copyright or trade secret.\n\n11. TERM AND TERMINATION. The initial term is two years, renewing for successive one-year terms unless either party gives ninety days written notice. Acme Corporation may terminate for convenience on thirty days notice.\n\n12. GOVERNING LAW. This Agreement is governed by the laws of the State of Delaware, without regard to its conflict of laws rules."

contractType
string | null

Pin the contract type instead of detecting it. Omit to have it detected from the opening of the document, which costs nothing extra: it runs concurrently with the extraction.

Maximum string length: 64
Example:

"msa"

useTrackedChanges
boolean
default:false

Read the file's Word revision marks and extract what a reviewer pushed FROM and TO, rather than the final-state positions. Requires a documentId whose filename ends in .docx: revision marks exist only in a DOCX.

Example:

false

Response

Successful Response

One long-running operation, whatever kind of work it is.

Readable for OPERATION_RETENTION_DAYS after creation, per AIP-151.

id
string
required

Public identifier, op_ followed by 32 hex characters. Poll GET /v1/operations/{operationId} with it.

Example:

"op_9f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6"

type
string
required

What kind of work this is, for example matrix.run or draft.generate.

Example:

"matrix.run"

status
enum<string>
required

One of five values: queued, running, succeeded, failed, cancelled. There is no sixth and there are no synonyms. Stop polling once it is succeeded, failed or cancelled.

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

"succeeded"

createdAt
string<date-time>
required

When the operation was accepted (RFC 3339).

Example:

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

completedAt
string<date-time> | null

When the operation reached a terminal status (RFC 3339). Present if and only if the status is terminal.

Example:

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

matterId
string | null

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

Example:

"mat_9f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6"

resource
OperationResource · object | null

What the operation produced. Absent until the underlying job row exists, which an idempotent replay can briefly observe, so treat absence as 'not yet' rather than 'never'.

error
OperationError · object | null

Why the work failed. Present only when status is failed. Partial success is succeeded with progress.done < progress.total, never an error.

progress
OperationProgress · object | null

How far along the work is, when the underlying job reports it. Absent does not mean no progress.

requestId
string | null

The X-Request-ID of the request that created this operation. Quote it in a support ticket.

Example:

"req_5f2c8b1e4a7d43c9b6e0f1a2c3d4e5f6"

Last modified on August 23, 2026