Skip to main content

Restore a deleted annotation.

POST/api/v1/annotations/{annotation_id}/restoreannotations:write

Brings a soft-deleted annotation back with its ID, optionally with new details.

Scopeannotations:write
AsynchronousNo
MCP toolrestore_annotation

Parameters​

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

Request body​

Content typeType
application/jsonAnnotationRestoreInput

Responses​

StatusDescriptionBody
200Success.application/json Annotation
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​

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).

AnnotationRestoreInput​

FieldTypeRequiredDescription
annotationobject or nullOptionalDetails to restore the annotation with; the stored details are kept when absent.

UserRef​

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