Documents

Describe a document after it was protected

PATCHhttps://backend.immut.io/api/v1/documents/{id}/classification

Required scope: documents:write

This is the only way to classify a file that was uploaded through the web app or protected before it had a classification, and it is what lets an agent backfill a library it did not create.

Parameters

NameInRequiredDescription
idpathyesid of the target record

Request body

Content type: application/json

FieldTypeRequiredDescription
partiesstringnoarray of named counterparties, e.g. ["Acme Corp"] (optional)
documentDatestringnothe date ON the document, ISO 8601 (optional). Agent-read and NOT proven
abstractstringnoone or two lines on what the document holds (optional). Requires the organisation to have enabled abstracts, otherwise this returns 403
docTypestringnocontract | ip_disclosure | policy | board | financial | corporate | other (optional)
docStatestringnoexecuted | issued | draft | template | proposal | superseded | unknown (optional)
reasonstringnoone citable reason (optional)
folderKeystringnothe objective folder key (optional)
objectivestringnothe objective this was judged against (optional)

Responses

StatusMeaning
200Merged. updated names the fields that actually landed. Returns: documentId, updated (the field names that landed) and the merged classification. MERGES rather than replaces, so a partial annotation never blanks what it says nothing about. Returns 409 HUMAN_CLASSIFICATION if a person set the classification: an agent does not overwrite a human. Returns 403 ABSTRACTS_NOT_PERMITTED rather than silently dropping an abstract the organisation has not consented to store.
400BadRequest
401Unauthorized
403Forbidden
429RateLimited

Example

curl -X PATCH "https://backend.immut.io/api/v1/documents/<id>/classification" \
  -H "Authorization: Bearer $IMMUT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"parties":"<parties>","documentDate":"<documentDate>","abstract":"<abstract>","docType":"<docType>","docState":"<docState>","reason":"<reason>","folderKey":"<folderKey>","objective":"<objective>"}'

Generated from the immut API contract, version 1.10.0. Machine-readable: this page as markdown · everything in one file · OpenAPI