---
title: "Undo a decision at its source"
method: POST
path: "/v1/contract-desk/decisions/{id}/undo"
tags: ["Contract Desk"]
---

# Undo a decision at its source

`POST /v1/contract-desk/decisions/{id}/undo`

## Request

- Base URL: `https://api.talonic.com`
- URL: `https://api.talonic.com/v1/contract-desk/decisions/{id}/undo`
- Auth: HTTP bearer

Runs the source app's own reverse call (a key date or step marked open again, a contract outcome back to active), marks the decision undone and puts the item back with its id; the next build makes it exact. It reverses only what the decision set: Contracts must still hold that state, set no later than the decision. Only the latest decision of an item, not undone, while the item is not open again; a value decision has no undo (a later decision replaces it in Contract Check). Requires scope `write` and a person with the `edit` permission.

## Path parameters

- `id` string, uuid, required

## Response `200`

The decision, undone.

- ContractDeskDecision
  - `id` string, uuid
  - `at` string, date-time
  - `by_name` string, nullable: The person; over the API the OAuth person's name, or `api:<key id>` for a key.
  - `mine` boolean
  - `kind` 'value' | 'deadline' | 'step'
  - `action` 'set' | 'crm_add' | 'handled' | 'notice_sent' | 'renewal_declined' | 'terminated' | 'dismiss' | 'accept'
  - `value` string, nullable
  - `note` string, nullable
  - `status` 'decided' | 'suggested'
  - `item` ContractDeskItem
    - `id` string, uuid
    - `kind` 'value' | 'documents_missing' | 'site_check' | 'text_check' | 'deadline' | 'step' | 'issue'
    - `source` 'contract_check' | 'contracts'
    - `crm_key` string, nullable
    - `site_key` string, nullable
    - `team` string, nullable: The team the item belongs to: a process step's department; else the team the workspace's Setup (`GET /v1/contract-desk/settings`) chooses for the value's attribute, then for the item's kind; else the team the configuration names for the kind (`contract_management` by default).
    - `due_date` string, date, nullable: An unhandled key date of a kind the configuration keeps past its day (`overdue_kinds`, notice deadlines by default) stays an item with its past date for up to `overdue_days` (90); a passed key date of any other kind is no item.
    - `critical` boolean
    - `urgency` 'now' | 'month' | 'behind' | 'later' | 'none': On the day of the read: now (critical, or due within the configured days; a passed key date included), month (within `month_days`, 30), behind (a process step whose planned day has passed), later, none (undated).
    - `group_key` string
    - `payload` object: Per kind. value: field_key, label, state, suggested. site_check and text_check: code, severity, params, contract_ids (left out on a `todo/items` page), role, type. deadline: key_date_id, kind, label, contract_id, contract_key. step: process_id, rule_id, rule_no, process_kind, contract_id, contract_key (contract_id and contract_key name the Contracts contract). issue: code, detail, document_ids, contract_id, contract_key. Any kind: info true when the item is information only (no app in the workspace can decide it; section info, no actions).
    - `first_seen_at` string, date-time
  - `contract` object
    - `crm_key` string, nullable
    - `contract_id` string, nullable: The Contracts contract.
    - `number` string, nullable
    - `partner` string, nullable
    - `site_key` string, nullable
    - `site_name` string, nullable
  - `undoable` boolean: The latest decision of its item (for a contract outcome also of its contract), not undone, the source has an undo (a handled key date or step, a contract outcome), and the item is not open again. Read from the desk's log only: a state set in Contracts since then shows at the undo, which answers 409 `not_undoable`.
  - `undone_at` string, date-time, nullable
  - `undone_by_name` string, nullable

## Other responses

- `400`: The id is no uuid.
- `403`: The key lacks the `write` scope, its person lacks the `edit` permission, or may not see every document the index names.
- `404`: The workspace has not added the app or is not in the pilot, or holds no such decision.
- `409`: The decision cannot be undone (`details.reason` `not_undoable`): it is no item's or, for a contract outcome, no contract's latest decision in the desk, it was undone, the item is open again, a value has no undo, or Contracts no longer holds exactly what the decision set (the date's day or label changed, it was reopened or handled again there, the contract has another outcome since). Also another undo holds it or the API process records the most decisions it takes at once (`busy`), the workspace has not added the source app (`source_app_missing`), or switched the app off.
- `422`: The source app refused or failed (`details.reason` `source_refused`); `message` is its own sentence.

## Changes

- **2026-12-04** `88d2070c4878`: 2 warning
  - added the new `dismiss` enum value to the `action` response property for the response status `200`
  - added the new `issue` enum value to the `item/kind` response property for the response status `200`
- **2026-11-30** `2d33873df1fd`: 1 warning
  - added the new `behind` enum value to the `item/urgency` response property for the response status `200`
- **2026-11-19** `27b968c6df42`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/talonic/apis/talonic-api/changes/v1/contract-desk/decisions/:id/undo/post.md)

---

[API](https://skmtc.dev/talonic/apis/talonic-api.md) - [All operations](https://skmtc.dev/talonic/apis/talonic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talonic/apis/talonic-api/revisions/9f6d53e2ab5e?raw)
