Skip to main content
PATCH
Add and/or remove multiple labels from a document in a single atomic operation. When using this endpoint, keep in mind that:
  • All changes succeed or fail together. No partial updates occur.
  • Label matching is case-insensitive.
  • Requests must have at least one operation. Either add or remove must contain at least one label.
  • Labels must already exist to be added to or removed from a document. Create labels via the Create label API.
  • Labels cannot be included in both add and remove in the same request.
  • Organization Admin permissions are required to:
    • Add or remove Verified labels
    • Add or remove Homepage labels

Authorizations

Authorization
string
header
required

Can be either an Organization API Key or Personal Access Token (PAT).

Include in the Authorization header as: Bearer YOUR_TOKEN

Path Parameters

documentId
string<uuid>
required

The document identifier (UUID)

Query Parameters

userId
string

Requires an Organization API key. Optional user ID that attributes the action to the specified user.

Body

application/json
add
string[]

Label names to add to the document

Required string length: 2 - 25
remove
string[]

Label names to remove from the document

Required string length: 2 - 25

Response

Labels updated successfully

labels
string[]

The updated list of labels on the document