---
title: "Undo a bulk owner assignment"
method: PATCH
path: "/internal/api/document/party/undo"
tags: ["DOCUMENT"]
---

# Undo a bulk owner assignment

`PATCH /internal/api/document/party/undo`

## Request

- Base URL: `https://api.signalshq.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.signalshq.io/internal/api/document/party/undo`
- Auth: OAuth 2
  - Password
  - Token URL: `/auth/login`

Restores each document's PRIOR owner. Recorded as UNDO, which is deliberately non-locking: an undo restores a state, it does not make a decision. Sending these back through the normal endpoint would lock documents at 'undecided' forever and promote auto-set suggestions into human decisions.

## Request body

- UndoDocumentPartyRequest: Revert a bulk assign to the exact prior state. A separate shape from the assign request because an undo is NOT a decision: it restores what was there, per document, and must not lock. Sending it back through the normal PATCH would record every entry as MANUAL_EDIT — locking documents at "undecided" forever and promoting mere suggestions into human decisions.
  - `client_id` string, uuid, required
  - `entries` RestorePartyEntry[], required
    - `document_id` string, uuid, required
    - `party_role` string, nullable: What it was before — null means it was undecided.

## Response `200`

Successful Response

- SetDocumentPartyResponse: Result of a party assignment, single or bulk.
  - `applied_count` integer, required
  - `skipped_count` integer, required
  - `outcomes` DocumentPartyOutcome[], required
    - `document_id` string, uuid, required
    - `applied` boolean, required
    - `reason` string, nullable: Why it was skipped. The UI shows these verbatim — assigning 9 of 12 without saying which 3 were skipped is a correctness bug the CPA cannot see.

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/signalshq/apis/signals-api.md) - [All operations](https://skmtc.dev/signalshq/apis/signals-api/llms.txt) - [OpenAPI document](https://skmtc.dev/signalshq/apis/signals-api/revisions/2c22af3b5576?raw)
