---
title: "Validate annotation content"
method: POST
path: "/api/v1/annotations/{annotationID}/content/validate"
tags: ["Annotation Content"]
---

# Validate annotation content

`POST /api/v1/annotations/{annotationID}/content/validate`

Validate the content of an annotation.
At first, the content is sent to the validate hook of connected extension.
Then some standard validations (data `type`, `constraints` are checked) are carried out in Rossum.
Additionally, if the annotation's respective queue has enabled delete recommendation conditions,
they are evaluated as well.

By default, messages for hidden datapoints are omitted. The behavior could be changed using the `messages_for_hidden_datapoints=true` query parameter.

## Query parameters

- `messages_for_hidden_datapoints` boolean

## Request body

- object
  - `actions` string[] — Validation actions. Possible values: `["user_update"]`, `["user_update", "updated"]` or `["user_update", "started"]`
  - `updated_datapoint_ids` integer[] — List of IDs of datapoints that were changed since last call of this endpoint.

## Response `200`

Validation results

- object
  - `messages` object[] — Validation messages
    - `id` string — ID of the concerned datapoint; "all" for a document-wide issues
    - `type` 'error' | 'warning' | 'info' | 'aggregation' — Message type
    - `content` string — A message shown in UI. Limited to 4096 characters.
    - `detail` object — Detail object that gives more context to the message
      - `hook_id` integer, nullable — ID of the hook, null for computed fields
      - `hook_name` string — Name of the hook
      - `request_id` string — ID of the request preceding this hook's response
      - `timestamp` string — Timestamp of the request preceding this hook's response
      - `is_exception` boolean — Flag signaling non-200 response from the hook or error during computed field evaluation
      - `traceback_line_number` integer — Line of the error in the computed field code
      - `source_id` integer — ID of the datapoint which created this message
      - `source_schema_id` string — Schema id of the datapoint which created this message
    - `aggregation_type` string — Type of aggregation (present only in message with type "aggregation")
    - `schema_id` string — Identifier of schema datapoint for which is aggregation computed (present only in message with type "aggregation")
  - `updated_datapoints` object[] — The subtrees of datapoints updated from an extension
  - `suggested_operations` object[] — Datapoint operations suggested as a result of validation
  - `matched_trigger_rules` object[] — Delete Recommendation rules that matched

## Other responses

- `400` — Invalid input data.
- `401` — The username/password is invalid or token is invalid (e.g. expired).
- `403` — Insufficient permission, missing authentication, invalid CSRF token and similar issue.
- `404` — The specified resource was not found.
- `409` — Conflict
- `413` — Payload too large (especially for files uploaded).
- `429` — Request rate is too high, wait before sending more requests. See [Rate Limiting](/guides/overview#rate-limiting) for more details.
- `500` — Server failure while processing the request.
- `502` — Invalid response from the upstream server.
- `503` — We're temporarily offline for maintenance. Please try again later.
- `504` — Upstream server could not complete the request in time.

---

[API](https://skmtc.dev/rossum/apis/rossum-api.md) · [All operations](https://skmtc.dev/rossum/apis/rossum-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/rossum/rossum-api/revisions/f1b5a910991d/schema)
