Add an annotation to a file version.
POST/api/v1/documents/{document_id}/annotationsannotations:write
Adds an annotation to one file version of a document you can read; people viewing the file see it appear. Signature annotations are made by signing and cannot be created here.
| Scope | annotations:write |
| Asynchronous | No |
| MCP tool | create_document_annotation |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
document_id | path | string | Required | |
Docwize-Version | header | string (date) | Optional | |
Idempotency-Key | header | string | Optional | max 255 |
Request body
| Content type | Type |
|---|---|
application/json | AnnotationCreateInput |
Responses
| Status | Description | Body |
|---|---|---|
201 | Success. | application/json Annotation or object |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
404 | not_found | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
409 | idempotency_in_progress | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | idempotency_key_reused, validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
AccessGrantInputInput
| Field | Type | Required | Description |
|---|---|---|---|
permission | string | Optional | read or write; read when absent. |
principal | object or object | Required |
Annotation
| Field | Type | Required | Description |
|---|---|---|---|
annotation | object | Required | The details the viewer draws: format annotation_details, body a non-empty list of objects. |
annotation_id | string | Required | |
annotation_type | string | Required | |
created_by | UserRef | Required | |
deleted_at | string (date-time) or null | Required | null while live; the time it was deleted otherwise (restore brings it back). |
document_id | string | Required | |
page | integer | Required | 1-based page of the file version. ≥ -2147483648; ≤ 2147483647 |
version_id | string | Required | The file version the annotation is drawn on (opaque, derived from document and stored file). |
AnnotationCreateInput
| Field | Type | Required | Description |
|---|---|---|---|
access_grants | array of AccessGrantInputInput | Optional | Who may see or change the annotation, saved with it (the viewer's security list). Absent or empty leaves it open to everyone who can read the document. Must include you or one of your groups. |
annotation | object | Required | |
annotation_type | string | Required | Rectangle, Cloud, Circle, Text, Textbox, Callout, Image, VectorStamp, Highlight, StrikeThrough, Redaction, Line or Arrow. |
page | integer | Required | 1-based. ≥ -2147483648; ≤ 2147483647 |
version_id | string | Required |
UserRef
| Field | Type | Required | Description |
|---|---|---|---|
display_name | string | Required | |
kind | string: user, system, integration or string | Required | |
user_id | string or null | Required |