Skip to content
concord.app
Book a demo
esc
concord.app
Book a demo

API reference

Document management. 31 operations.

The Document management operations of the concord.app REST API, each with its parameters, body fields and responses.

Document management — OCR, comparison, merge fields, hashing and versioning operations.

Every path is on https://app.concord.app.

POST/api/v1/document-management/benchmark-accuracy

Benchmark extraction accuracy

Benchmarks field-extraction accuracy against a reference dataset.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/document-management/bulk-ocr

Run bulk OCR over document pages

Runs OCR over every page of up to 20 documents and returns that job's page counts, status and throughput. Each page is an upload id from POST /v1/uploads with purpose "ocr_page" (or POST /v1/uploads/from-url, the uploads_from_url tool). Answers { status: "done", result } when the job finishes within about 20 seconds, else { status: "processing", workId } — then call ocrResult with that workId until it is done (the result is kept for an hour). The recognized text is NOT returned, NOT stored, and NOT written to any agreement — use recognizeHandwriting, which returns the text for a single page, when the text itself is what you need. An organization runs at most three of these at a time; a fourth concurrent run is refused with 429 until one finishes.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
documents
required
array of object

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/document-management/compare

Compare documents

Compares two documents and returns their differences.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
agreement_id_a
required
string
agreement_id_b
required
string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/document-management/compare-clauses

Compare clauses across documents

Groups clause-level content across 2 to 40 agreements and reports, per clause type, where their wording agrees and where it diverges. Optionally restricted to one clause type.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
agreement_ids
required
array of string
clause_type_filter string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/document-management/crm-merge-fields

List CRM merge field mappings

Lists the caller's organization's configured mappings between Salesforce or HubSpot fields and concord.app field slugs, each with its sync direction and last synced value. With agreementId, lists the mappings of the organization that owns that agreement — the one populateMergeFields reads them in.

Parameters

NameInTypeDescription
agreement_id query string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/document-management/document-file

Read a document's file

Reads the words of ONE file attached to a document (an exhibit, a schedule, a supporting file), by the fileId listAgreementFiles gave. For any question about what an exhibit says, read it. Returns outline (EVERY section heading of the file, in order, always complete), sections (heading + text of those returned), selection ('full', or 'matched' = only the sections matching query), totalCharacters, charactersReturned, truncated, and extraction: its status — only ready has words; pending = not read yet, skipped / unreadable = its words cannot be read, with the reason — say so, never that the file is silent on the point. extraction.textTruncated = the stored words stop early (a very long file). found: false = no such file you can read.

Parameters

NameInTypeDescription
fileId
required
query string
intakeRequestId query string
query query string
maxCharacters query integer

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/document-management/document-files

List a document's files

Lists the files attached to ONE document: exhibits, schedules, supporting files. Each has a fileId, its name, its label (e.g. 'Exhibit A'), type, audience (internal = your team only; external = the other side sees it too), who added it, and textStatus (ready = its words can be read; pending = not read yet; skipped / unreadable = they cannot be). Read a file's words with readAgreementFile on its fileId. found: false means no such record you can read.

Parameters

NameInTypeDescription
agreementId query string
intakeRequestId query string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/document-management/document-permissions

List a document's direct grants

Lists the organization members holding a DIRECT access grant on ONE document, with each grant's level. Folder-inherited and org-role access is NOT listed — use getEffectivePermission to resolve what a specific user can actually do.

Parameters

NameInTypeDescription
agreement_id
required
query string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/document-management/document-text

Read a document's text

Reads the actual text of ONE agreement you know the id of: the read that returns a contract's own words. A search only FINDS contracts (one ranked snippet each, never a named contract's own clause), so for any question ABOUT a particular contract (its governing law, liability cap, notice period, whether a clause is present), read it by its id. Returns outline (EVERY section heading, in order, always complete), sections (heading + full text of those returned), selection ('full', or 'matched' = only the sections matching query), totalCharacters, charactersReturned, truncated, organizationId, the organization the text came from (a reachable subsidiary's agreement is read too, not only the caller's own organization's), and recordNotice, the renewal notice period and expiry date the contract's record holds (where the text's clause differs, the record's period is the one that counts). The outline — and only the outline — tells 'this contract does not contain that clause' apart from 'I did not find it': no relevant heading AND no coverage in the text you read means the clause is absent and you may say so. With no successful read, say you could not read the contract, never that the term is missing. found: false means no stored body — report that.

Parameters

NameInTypeDescription
agreement_id
required
query string
query query string
max_characters query integer

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/document-management/draft

Generate a contract draft from a prompt

Generates a contract draft with a language model from a free-text prompt and returns it as HTML plus a section outline, a suggested title and type. It CREATES NO AGREEMENT and stores nothing — pass the returned HTML to an agreement-creating operation to keep it.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
prompt
required
string
contract_type string
jurisdiction string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/document-management/duplicate-content

Check for duplicate content

Reports whether an agreement with this content hash already exists.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
content_hash
required
string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/document-management/effective-permission

Get a user's effective permission

Resolves the access level one user actually holds on ONE document and where it comes from — a direct grant, a folder they inherit from, or an org role. Defaults to the calling user when userId is omitted.

Parameters

NameInTypeDescription
agreement_id
required
query string
user_id query string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/document-management/extract-tables

Extract document tables

Extracts structured tables from a document.

Parameters

NameInTypeDescription
agreement_id
required
query string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/document-management/field-feedback

Record field feedback

Records human corrections to AI-extracted field values on agreements.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
corrections
required
array of object

Responses

StatusDescription
201OK
400The document-management request payload is invalid, Request payload failed schema validation; BAD_REQUEST: The document-management request payload is invalid; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: The caller's organization does not own the targeted storage object
404404 — NOT_FOUND: The agreement or storage object referenced by the operation was not found
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/document-management/fields-to-crm

Stage document fields for CRM

Stages ONE agreement's title, contract value and effective and expiry dates for push into a linked Salesforce or HubSpot record. A downstream integration job performs the send; nothing here recalls it.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
agreement_id
required
string
crm_provider
required
one of "salesforce", "hubspot"
crm_record_id
required
string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/document-management/file

Download one stored file

Streams one stored file of your organization by its storage key (the key a document, attachment or version names), from our own origin, with Content-Disposition: attachment. The key must start with your organization's prefix (else 403) and belong to a real object of it (else 404). A file that belongs to a document (its original file or an attachment) is served only when you can read that document (else the same 404). There is no signed storage link: the bytes come through this call.

Parameters

NameInTypeDescription
storage_key
required
query string The file's storage key.

Responses

StatusDescription
200The file's bytes
400Invalid request — see error.code for the specific failure mode
401Missing or invalid Bearer token
403Authenticated but not permitted to perform this action
404Resource not found
429Rate limit exceeded — see Retry-After and RateLimit-* headers

GET/api/v1/document-management/in-document

Search within a document

Finds occurrences of a literal string or regular expression in the body text of ONE agreement and returns each match with its position. Scoped to that document — use the search tag's operations to search across documents.

Parameters

NameInTypeDescription
agreement_id
required
query string
query
required
query string
is_regex query boolean
case_sensitive query boolean
whole_word query boolean
max_matches query integer

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/document-management/integrity

Verify a document's hash chain

Recomputes the content hash of every stored version of one agreement and reports whether the chain is intact, naming the first version at which it breaks. Reads and compares; it repairs nothing and writes nothing.

Parameters

NameInTypeDescription
agreement_uid
required
query string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/document-management/integrity-certificate

Get a document integrity certificate

Returns a tamper-evidence certificate for one agreement: the chain root hash, the hash of each version, the hash algorithm, and the verifier's own verdict on whether the chain still holds.

Parameters

NameInTypeDescription
agreement_uid
required
query string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

DELETE/api/v1/document-management/label-from-version

Remove a version label

Clears the label on one document version; the version itself is kept.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
version_id
required
string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/document-management/label-version

Label a document version

Assigns a human-readable label to a document version.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
version_id
required
string
label
required
string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/document-management/mobile-editor-config

Get mobile editor config

Returns what the mobile editor needs to open ONE agreement: its title and stage, the caller's own view/comment/sign/edit capabilities on it, the number of comments the caller may see on it, and its signature-request count.

Parameters

NameInTypeDescription
agreement_id
required
query string

Responses

StatusDescription
200OK
400The document-management request payload is invalid, Request payload failed schema validation; BAD_REQUEST: The document-management request payload is invalid; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: The caller's organization does not own the targeted storage object
404404 — NOT_FOUND: The agreement or storage object referenced by the operation was not found
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/document-management/named-versions

List a document's named versions

Lists the LABELLED versions of one agreement — each with its label, comment, AI summary, author and creation time. Unlabelled versions are not returned, so this is a milestone history rather than the full version list.

Parameters

NameInTypeDescription
agreement_uid
required
query string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/document-management/ocr-result

Get an OCR result

The result of a recognizeHandwriting or processBulkOcr call that answered { status: "processing", workId }: { status: "processing", workId } while it runs, then { status: "done", result } — the same result the call would have returned. Only the caller who started it can read it, for an hour after it was started.

Parameters

NameInTypeDescription
work_id
required
query string (uuid)

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/document-management/permission/grant

Grant a document permission

Shares one document with one person — the same grant the Share window makes: the person appears in the document's access list and is emailed that it was shared. Either level is refused unless the caller ALREADY holds, on this document, every capability that level confers — so you cannot grant access wider than your own.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
agreement_id
required
string
target_user_id
required
string
permission_level
required
one of "view", "edit"

Responses

StatusDescription
201OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/document-management/permission/revoke

Revoke a document permission

Removes one person's own share of one document — the same removal the Share window makes — and drops any live editing session it gave them. revoked is false when they had no share of their own to remove; access through a team, everyone at an organization, a folder or a role is untouched either way, so a person may still reach the document after a successful revoke.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
agreement_id
required
string
target_user_id
required
string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/document-management/populate-merge-fields

Populate document fields from CRM

Overwrites ONE agreement's title, contract value and mapped smart fields with values read from its linked Salesforce or HubSpot record. Writes to the agreement, not to a template, and nothing on this surface restores the previous values.

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
agreement_id
required
string
crm_provider
required
one of "salesforce", "hubspot"
crm_record_id
required
string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/document-management/processing-status

Get document processing status

Returns the ingestion pipeline's current stage, percentage progress, retry count, last error and per-phase timings for ONE agreement. Null when that agreement has never been processed.

Parameters

NameInTypeDescription
agreement_id
required
query string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

POST/api/v1/document-management/recognize-handwriting

Recognize handwriting

Runs handwriting recognition over one scanned page and returns its text. The page is an upload id from POST /v1/uploads with purpose "ocr_page" (png, jpeg, tiff, webp or pdf) — or from POST /v1/uploads/from-url (the uploads_from_url tool) for a page already on the web —, once that upload is ready. Answers { status: "done", result } when the recognition finishes within about 20 seconds, else { status: "processing", workId } — then call ocrResult with that workId until it is done (the result is kept for an hour).

Parameters

NameInTypeDescription
Idempotency-Key header string Optional idempotency key. When supplied, a repeat of the same request replays the original response instead of performing the write twice. A retry sent WITHOUT the header is a second write and CAN duplicate its effect — always send one on retries.

Request body

NameTypeDescription
upload_id
required
string

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/document-management/retention-policy

Get version retention policy

Returns the version-retention limits for the caller's organization's current plan tier: how many days versions are kept and how many versions each document may hold (null means unlimited). Version history is never deleted by plan, so both are null on every plan.

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

GET/api/v1/document-management/storage-usage

Get storage usage by tier

Returns the caller's organization's document count and estimated byte size in each of the hot, warm and cold storage tiers.

Responses

StatusDescription
200OK
400Malformed request or invalid parameters, Request payload failed schema validation; BAD_REQUEST: Malformed request or invalid parameters; VALIDATION: Request payload failed schema validation
401401 — UNAUTHORIZED: Missing or invalid authentication credentials
403403 — FORBIDDEN: Authenticated but not authorized for this resource
404404 — NOT_FOUND: Requested resource does not exist
405405 — METHOD_NOT_SUPPORTED: HTTP method not supported for this resource
406406 — NOT_ACCEPTABLE: Requested representation is not acceptable
408408 — TIMEOUT: Request timed out
409409 — CONFLICT: Resource state conflict — concurrent modification or duplicate
412412 — PRECONDITION_FAILED: Resource state does not allow the requested operation
413413 — PAYLOAD_TOO_LARGE: Request payload exceeds the allowed size
415415 — UNSUPPORTED_MEDIA_TYPE: Request media type is not supported
422422 — UNPROCESSABLE_CONTENT: Request semantically valid but unprocessable — e.g. file format mismatch
429429 — TOO_MANY_REQUESTS: Rate limit exceeded — wait retryAfterSeconds before retrying
499499 — CLIENT_CLOSED_REQUEST: Client closed the request before the server finished
500500 — INTERNAL_SERVER_ERROR: Unexpected server error — the request should not be retried
501501 — NOT_IMPLEMENTED: The requested operation is not implemented
502502 — BAD_GATEWAY: Invalid response from an upstream dependency
503503 — SERVICE_UNAVAILABLE: Service temporarily unavailable — may be retried after Retry-After
504504 — GATEWAY_TIMEOUT: Timed out waiting for an upstream dependency

See it on your contracts.

Book a demo

Trusted by teams at

  • 4M+ documents signed since 2014