Skip to main content

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.

Scopeannotations:write
AsynchronousNo
MCP toolcreate_document_annotation

Parameters​

NameInTypeRequiredDescription
document_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
Idempotency-KeyheaderstringOptionalmax 255

Request body​

Content typeType
application/jsonAnnotationCreateInput

Responses​

StatusDescriptionBody
201Success.application/json Annotation or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409idempotency_in_progressapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

AccessGrantInputInput​

FieldTypeRequiredDescription
permissionstringOptionalread or write; read when absent.
principalobject or objectRequired

Annotation​

FieldTypeRequiredDescription
annotationobjectRequiredThe details the viewer draws: format annotation_details, body a non-empty list of objects.
annotation_idstringRequired
annotation_typestringRequired
created_byUserRefRequired
deleted_atstring (date-time) or nullRequirednull while live; the time it was deleted otherwise (restore brings it back).
document_idstringRequired
pageintegerRequired1-based page of the file version. ≥ -2147483648; ≤ 2147483647
version_idstringRequiredThe file version the annotation is drawn on (opaque, derived from document and stored file).

AnnotationCreateInput​

FieldTypeRequiredDescription
access_grantsarray of AccessGrantInputInputOptionalWho 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.
annotationobjectRequired
annotation_typestringRequiredRectangle, Cloud, Circle, Text, Textbox, Callout, Image, VectorStamp, Highlight, StrikeThrough, Redaction, Line or Arrow.
pageintegerRequired1-based. ≥ -2147483648; ≤ 2147483647
version_idstringRequired

UserRef​

FieldTypeRequiredDescription
display_namestringRequired
kindstring: user, system, integration or stringRequired
user_idstring or nullRequired