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.
| Scope | annotations:write |
| Asynchronous | No |
| MCP tool | restore_annotation |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
annotation_id | path | string | Required | |
Docwize-Version | header | string (date) | Optional | |
Idempotency-Key | header | string | Optional | max 255 |
Request body
| Content type | Type |
|---|---|
application/json | AnnotationRestoreInput |
Responses
| Status | Description | Body |
|---|---|---|
200 | Success. | application/json Annotation |
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
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). |
AnnotationRestoreInput
| Field | Type | Required | Description |
|---|---|---|---|
annotation | object or null | Optional | Details to restore the annotation with; the stored details are kept when absent. |
UserRef
| Field | Type | Required | Description |
|---|---|---|---|
display_name | string | Required | |
kind | string: user, system, integration or string | Required | |
user_id | string or null | Required |