DocumentsUpdate document metadatapatch

Update document metadata

Renames a document, changes its document type, and optionally queues reprocessing.

curl -X PATCH "https://api.textmine.com/v3/documents/123" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_TOKEN (`tm_<key>`)" \
  -d '{
  "name": "Acme supplier agreement - signed.pdf",
  "document_type_id": 777,
  "reprocess": true
}'
{
  "id": 67890,
  "name": "Acme supplier agreement.pdf",
  "status": "processed",
  "team_id": 321,
  "vault_id": 12345,
  "document_type_id": 777,
  "mime_type": "application/pdf",
  "size_bytes": 245760,
  "page_count": 12,
  "uploaded_at": "2024-12-25T10:00:00Z",
  "processed_at": "2024-12-25T10:00:00Z"
}
PATCH
/v3/documents/{documentId}
PATCH
Base URLstring

Target server for requests. Edit to use your own host.

Bearer Token (`tm_<key>`)
Bearer Tokenstring
Required

Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.

Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.
path
documentIdinteger
Required

Document ID.

Format: int64
Content-Typestring
Required

The media type of the request body

Options: application/json
reprocessboolean

When true, queue the document for processing after updating metadata.

Request Preview
Response

Response will appear here after sending the request

Authentication

header
Authorizationstring
Required

Bearer token (tm_<key>). Use Authorization: Bearer tm_<key> for API-key access to /v3/** endpoints. V3 also accepts Auth0 JWT and HTTP Basic for user-session contexts.

Path Parameters

Body

application/json
namestring
Example:
Acme supplier agreement - signed.pdf
reprocessboolean

When true, queue the document for processing after updating metadata.

Example:
true

Responses

idinteger
namestring
statusstring

Public document status derived from the internal processing state.

team_idinteger
vault_idinteger
document_type_idinteger
mime_typestring
size_bytesinteger
page_countinteger
uploaded_atstring
processed_atstring