---
title: "Undo a held message (#4359)"
method: POST
path: "/accountant/companies/{customerId}/threads/{threadId}/messages/{messageId}/undo"
tags: ["Accountant Portal"]
---

# Undo a held message (#4359)

`POST /accountant/companies/{customerId}/threads/{threadId}/messages/{messageId}/undo`

## Request

- Base URL: `https://api.medianfi.com/api/v1`
- URL: `https://api.medianfi.com/api/v1/accountant/companies/{customerId}/threads/{threadId}/messages/{messageId}/undo`
- Auth: HTTP bearer

An accountant's send is held 10 seconds (`holdUntil` on the send response). While it is held, its author may undo it: the message is soft-deleted, never shown to the client and never posted to Slack. When the send created the thread, the thread is removed too. Session callers only.

## Path parameters

- `customerId` string, uuid, required
- `threadId` string, uuid, required
- `messageId` string, uuid, required

## Response `200`

The message was undone

- object
  - `success` boolean
  - `data` object
    - `id` string, uuid
    - `undone` boolean

## Other responses

- `401`: Authentication required
- `403`: The caller is not the message's author, or has no access to the thread's company.
- `404`: No such message in this thread, it was already undone, or the caller is a service key.
- `409`: `MESSAGE_ALREADY_SENT`: the hold has passed (or the message was never held). Nothing changes.
- `422`: A path id is not a uuid.

## Changes

- **2026-11-26** `4a2098becaf9`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/medianfi/apis/median-api/changes/accountant/companies/:customerId/threads/:threadId/messages/:messageId/undo/post.md)

---

[API](https://skmtc.dev/medianfi/apis/median-api.md) - [All operations](https://skmtc.dev/medianfi/apis/median-api/llms.txt) - [OpenAPI document](https://skmtc.dev/medianfi/apis/median-api/revisions/4f4c2d34276b?raw)
