Documents
Describe a document after it was protected
PATCH
https://backend.immut.io/api/v1/documents/{id}/classificationRequired 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
| Name | In | Required | Description |
|---|---|---|---|
id | path | yes | id of the target record |
Request body
Content type: application/json
| Field | Type | Required | Description |
|---|---|---|---|
parties | string | no | array of named counterparties, e.g. ["Acme Corp"] (optional) |
documentDate | string | no | the date ON the document, ISO 8601 (optional). Agent-read and NOT proven |
abstract | string | no | one or two lines on what the document holds (optional). Requires the organisation to have enabled abstracts, otherwise this returns 403 |
docType | string | no | contract | ip_disclosure | policy | board | financial | corporate | other (optional) |
docState | string | no | executed | issued | draft | template | proposal | superseded | unknown (optional) |
reason | string | no | one citable reason (optional) |
folderKey | string | no | the objective folder key (optional) |
objective | string | no | the objective this was judged against (optional) |
Responses
| Status | Meaning |
|---|---|
200 | Merged. 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. |
400 | BadRequest |
401 | Unauthorized |
403 | Forbidden |
429 | RateLimited |
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