Skip to main content
POST
Undo or send a held message now
The Try it panel runs against production (https://app.tuco.ai) with the key you paste into it. There is no sandbox: send_now sends a real message, and cancel cancels a real one.

What this endpoint does

A message can be held before it goes out:
  • In its Undo window. A reply sent with an Undo delay, or an Autopilot reply your workspace holds for Undo.
  • In the per-contact queue. It waits behind an earlier message to the same contact on the same line. See Message order (FIFO) and Send now.
This endpoint acts on one held message:

Authentication

You can act on a message you sent (with this API key’s user) in this workspace. An Autopilot reply held for Undo can be undone or sent now with any API key of that workspace.

Request body

string
required
The id of the held message (the _id returned when you sent it, or from GET /api/messages).
string
required
cancel or send_now.
boolean
default:"false"
Only with send_now. Lets this one message skip the per-contact queue. It also works on a message the queue is holding after its Undo window ended (rescheduleReason: "fifo:serial_lock_blocked"). It is refused on a first message: if nothing has been delivered to this contact on this line yet, the message keeps waiting and the response says fifo.passFifoRefused: "first_message".

Example

Responses

Cancelled
Sending now
Send now + passFifo
passFifo refused (first message)
Too late
boolean
true when the action was applied.
string
cancelled, sending (it goes now), held (it still waits behind an earlier message), or too_late (it was already being sent, or already sent).
object
Only when passFifo was sent. blocked: still waiting behind an earlier message. behind: that message’s id. behindDueAt: when it is due, if it is planned for a set time. passFifoRefused: first_message when skipping was refused. checked: false if the check could not run (then blocked is unknown).
string
On too_late or cancelled from an earlier call: the message’s current status.

Errors

Cancel and send now are atomic: they only act while the message is still waiting. If Tuco has already started sending it, the answer is state: "too_late" and the message goes out (or went).