---
title: "Undo transaction"
method: POST
path: "/transactions/{transactionId}/undo"
tags: ["Transactions"]
---

# Undo transaction

`POST /transactions/{transactionId}/undo`

Atomically reverses all events in the transaction, creating a new transaction representing the inverse operation. Actors with transactions:read can undo their own transactions; transactions:write can undo any actor's. Returns 409 if field-level conflicts exist and force is not set. Returns 400 if the transaction is already undone.

## Query parameters

- `force` boolean

## Headers

- `Idempotency-Key` string, uuid

## Response `200`

Success — returns the newly created undo transaction

- object
  - `data` Transaction, required
    - `id` string, uuid, required
    - `organizationId` string, uuid, required
    - `actorId` string, uuid, required
    - `description` string, required
    - `method` string, required
    - `endpoint` string, required
    - `status` 'committed' | 'undone', required
    - `idempotencyKey` string
    - `undoOfTransactionId` string, uuid — If this IS an undo, points to the original transaction
    - `undoneByTransactionId` string, uuid — If this WAS undone, points to the undo transaction
    - `createdAt` number, required
  - `transactionId` string, uuid, required

## Other responses

- `400` — Bad request or validation error
- `401` — Authentication required
- `403` — Insufficient permissions
- `404` — Resource not found
- `409` — Field-level conflicts exist. The error details include the conflicting event IDs.
- `429` — Rate limit exceeded
- `500` — Internal server error

---

[API](https://skmtc.net/voltairlabs/apis/voltair-api.md) · [All operations](https://skmtc.net/voltairlabs/apis/voltair-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/voltairlabs/voltair-api/revisions/be08f4f706f5/schema)
