---
title: "Edit pages (split and reorganize)"
method: POST
path: "/api/v1/annotations/{annotationID}/edit_pages"
tags: ["Annotation"]
---

# Edit pages (split and reorganize)

`POST /api/v1/annotations/{annotationID}/edit_pages`

Edit document pages, split and re-split already split document.

When using this endpoint, status of the original annotation (when not editing existing split) is switched to `split`,
status of the newly created annotations is `importing` and the extraction phase begins over again.

This endpoint can be used for splitting annotations also from webhook listening to `annotation_content.initialize`
event and action.

**Operations**:
- **edit**: Create new annotations from parent pages with optional rotation and values
- **move**: Move existing child annotations — or the annotation itself — to different queues
- **delete**: Delete child annotations — or the annotation itself
- **stop_reviewing**: Stop review on child annotations without deleting

When `move` or `delete` targets the annotation itself, no other operations
(`edit`, additional `move`/`delete` entries) are allowed in the same request.

## Path parameters

- `annotationID` integer, required

## Request body

- object
  - `edit` object[] — Create new annotations from parent pages
    - `parent_pages` EditPage[] — List of parent pages with rotation.
      - `page` string, uri, required — Page URL
      - `rotation_deg` 0 | 90 | 180 | 270 — Rotation to apply in degrees
      - `deleted` boolean — Indicates whether the page is marked as deleted.
    - `target_queue` string, uri — Target queue URL. When not provided, the new annotation is imported into the same queue as the parent annotation.
    - `metadata` EditMetadata — Metadata will be saved in created/edited annotation/document metadata.
      - `annotation` object
      - `document` object
    - `values` object — Values to be propagated to newly created annotations. Keys must be prefixed with "edit:", e.g. `"edit:document_type"`.
    - `document_name` string — Name for the newly created document. When not provided, generated automatically.
    - `annotation` string, uri — Annotation URL
  - `move` object[] — Move child annotations to different queues. May also reference the annotation itself (in that case, no other operations are allowed in the request).
    - `annotation` string, uri, required — Child annotation to move. May also be the annotation itself.
    - `target_queue` string, uri, required — Target queue URL
  - `delete` string[] — Annotations to delete. May contain child annotations, or the annotation itself (in that case, no other operations are allowed in the request).
  - `stop_reviewing` string[] — Child annotations to stop reviewing. Must be in `reviewing` state.
  - `stop_parent` boolean — Whether to stop reviewing the parent annotation

## Response `200`

Edit pages operation completed successfully

- EditPagesResult
  - `results` object[] — Created or modified annotations
    - `annotation` string, uri — Annotation URL
    - `document` string, uri — Document URL

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