Skip to main content

Endpoint

Authentication

This endpoint requires an OAuth access token. Send it as a bearer token:
Required scope: sor:write The token must belong to a user (a client_credentials token gets a 400). Access is checked at the organization level: any user whose token has sor:write can update any document in the organization.

Path Parameters

document_id is the document’s ID in the Knowledge Center, the same ID that Search and Get Contract Data use. It is not the document_processing_id returned by Upload.

Request Body

Attribute Object

An attribute is identified by its name and data_type. Sending contract_value as number and contract_value as text creates two separate attributes.

Request Example

Response

Success Response

Status Code: 200 OK

Response Fields

The response returns counts only. It doesn’t say which attributes were written or skipped. To see the stored values, call Get Contract Data with include_attributes: true.

How existing attributes are handled

Attributes not included in the request are left unchanged. There’s no way to delete an attribute through the API. If two attributes in the same request have the same name and data_type but different values, the second is stored with a suffix (_1, _2, …).

Error Responses

422 example

Use Cases

  • Sync CRM IDs - Store an opportunity or account ID on the contract so it can be found later with Search (attribute filter, for example opportunity_id_text)
  • Post-upload enrichment - Add metadata after a document has been processed
  • Data correction - Fix an attribute value by resending it with override_existing_fields: true