Approval Queues
Review, approve, reject, edit, and escalate held messages using the override queue API.
When a mailbox is set to autonomy level L1 or L2, outbound sends are held for review before delivery (a reply on a thread with flagged inbound mail is held at any level, see Holds that apply at every level). The approval queue API lets your agents or human operators inspect held messages and take action on each one.
How queues work
After the policy engine approves a send, the mailbox's autonomy level is evaluated:
- L3 - send executes immediately
- L2 - first message to a new contact is held; subsequent messages to known contacts execute immediately
- L1 - every send is held regardless of contact history
Held messages appear in the approval queue. Inbound messages flagged by the safety classifier (spam, phishing, malware, abuse, impersonation -- any verdict whose action is quarantine or reject) are also routed to needs_approval, tagged with metadata.safety_verdict/safety_action. There is no separate spam-verdict routing at classification time (#1644): the dedicated spam queue below is filled only by a manual report-spam, which itself refuses to move a thread already under review (needs_approval, high_risk, blocked_by_policy) into spam. A classifier false positive is corrected via POST /v1/agent/override/:threadId/not-spam, which accepts a spam thread or a spam-flagged needs_approval thread and refuses anything else. It answers 409 quarantine_verdict for a thread with a phishing, malware, abuse or impersonation verdict, whatever its queue: that is Release (approve with quarantine: true), which carries its own warning. Report-spam refuses a trashed thread (409); restore it first -- and for an agent, releases directly ONLY for a thread currently in spam that the classifier never held (a plain inbox thread manually reported as spam). Anything the classifier held is gated exactly like approve/edit/release below, including a needs_approval thread whose verdict happens to read spam: a thread's safety_verdict reflects only the LATEST classified message on it, so it can't be trusted to tell a corrected false positive apart from a thread that's still dangerous. See Inbound Email for full spam-triage documentation.
In the portal, a person reviews these on two pages: spam-verdict threads (and reported spam) on Spam (/app/spam), every other safety verdict (phishing, malware, abuse, impersonation, and prompt injections, which the classifier records as phishing) on Quarantine (/app/quarantine). Quarantine never renders the message as HTML or offers its links or attachments; a person can read a plain-text copy with links neutered, then Release (the human approve) or Delete (the human reject, to the trash). A Quarantine decision passes quarantine: true to approve/reject: it is refused (409) unless the thread is still a non-spam safety quarantine with no draft waiting for approval, and a release moves the verdict to metadata.released_safety_verdict/released_safety_action, so the agent still sees what the thread was flagged as. Until a person releases it, an agent key without operator scope gets a placeholder for every inbound message on the thread and can't list, download or send its attachments (see Inbound); release opens them (attachments the file scan blocked stay blocked), delete never does. A message quarantined for prompt injection stays quarantined after release: the agent gets the conversation with a placeholder for that message's text.
Home (/app) shows the same mail inline: every conversation is labelled (spam, held as phishing or another verdict, or in the trash), a filter shows All, Clean, Spam, Quarantine or Trash, and a person can mark Not spam, Release (with the same warning) or Restore a trashed conversation right on the row. Restore puts a conversation back where it was: deleted spam back in Spam, a deleted quarantine back in Quarantine, still gated. Like the pages, all of it is for a person: an agent-held session can't load it. Any approve that takes a thread out of review (Release, a plain approve, an approved decision) moves its spam or safety verdict to released_safety_verdict, so nothing puts a thread a person approved back in review.
Queue types
Four queues carry held items; needs_approval is split across two count fields so dashboards can show inbound vs outbound pressure separately.
| Queue (for drill-down) | Count fields | Contents |
|---|---|---|
needs_approval | needs_approval_outbound, needs_approval_inbound | Outbound sends held by autonomy level + inbound messages quarantined/rejected by the safety classifier (any verdict, including spam). Filter with ?direction=inbound|outbound. |
blocked_by_policy | blocked_by_policy | Sends blocked hard by the policy engine |
high_risk | high_risk | Messages flagged as high-risk |
spam | spam | Threads manually reported spam (POST .../report-spam) -- never populated automatically by classification |
The left column is the queue name you pass to GET /v1/agent/override/queues/:queue (or molted overrides queue <name>); the right column lists the field names you'll see in counts.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /v1/agent/override/queues/counts | Get counts per queue |
| GET | /v1/agent/override/queues/:queue | List items in a queue |
| GET | /v1/agent/override/held-messages | List held messages |
| POST | /v1/agent/override/held-messages/:messageId/release | Release a held message |
| POST | /v1/agent/override/held-messages/:messageId/reject | Reject a held message |
| POST | /v1/agent/override/:threadId/approve | Approve a thread for sending |
| POST | /v1/agent/override/:threadId/reject | Reject a thread |
| POST | /v1/agent/override/:threadId/edit | Edit a held message before release |
| POST | /v1/agent/override/:threadId/escalate | Escalate to a human reviewer |
| POST | /v1/agent/override/:threadId/not-spam | Mark a thread not spam, optional body { "reason" } (gated for an agent unless it's a plain, never-classifier-held spam-queue thread, see below) |
| POST | /v1/agent/override/:threadId/report-spam | Move a thread into the spam queue (refuses needs_approval/high_risk/blocked_by_policy; refused on a taken-over thread) |
| POST | /v1/agent/override/:threadId/delete-spam | Resolve and trash a spam-queue thread, or a classifier-held spam-verdict thread (that case is gated like reject; refused on a taken-over thread) |
| GET | /v1/agent/override/spam-feedback/stats | Tenant-wide spam feedback stats |
| GET | /v1/agent/override/sender-reputation?domain=X | Reputation for a sender domain |
| GET | /v1/agent/override/allowlist | List sender allow-list entries (admin or scope-all-mailboxes key only; limit 1-200, default 100, and offset) |
| DELETE | /v1/agent/override/allowlist/:id | Remove a sender allow-list entry (admin or scope-all-mailboxes key only) |
| POST | /v1/agent/override/messages/:messageId/label-correction | Say an inbound message's platform label was wrong: { "label": "opt_out" | "auto_reply" | "delivery_notice" | "none" }. Feedback only, not a human decision. |
Thread and message ids are UUIDs (anything else is a 400). The examples use the mailbox service (https://mailbox.molted.email, the host the CLI and MCP use), which serves every route on this page. api.molted.email serves the same routes (with tenantId).
All endpoints require Bearer authentication and operator API key scope; the allow-list additionally requires an admin or scope-all-mailboxes key -- a mailbox-scoped key gets 403 there, since the list isn't mailbox-scoped data. Report-spam, delete-spam on a spam-queue thread, the feedback/reputation reads, and the allow-list are not human decisions -- none of them loosen a control an agent couldn't already affect (though report-spam/delete-spam still refuse an agent on a taken-over thread). Not-spam is a partial exception (see below).
Decisions need a human
Reading the queues, escalating, report-spam, delete-spam (on a spam-queue thread), spam-feedback stats, sender-reputation, and the allow-list (list + remove) are all open to agents. Deciding is not: approve, reject, edit, release and held-message reject are human decisions, and so are PATCH /v1/send/approvals/:id, POST /v1/inbound/:id/approve, POST /v1/inbound/:id/reject, POST /v1/inbound/bulk-approve and PATCH /v1/templates/approvals/:id. A person makes them in the portal; Supervising your agents shows what they see and click.
Held sends in the portal
A send held for approval, by a mailbox's autonomy level or by one of the holds that apply at every level, shows on the portal's Home (/app) as an Approve a send card with the recipient and the agent or journey that wrote it. Approve (A) queues it for delivery and Reject (R) drops it. The person can read the draft first: its conversation page shows the held draft with the same two buttons, and View email opens it in the email viewer.
- Sends from the same agent, journey and mailbox that are held together become one Approve these sends card. It opens a review page that lists them riskiest first, where a person decides one send at a time or all that remain; see Bulk send review. One decision covers at most 500 sends, and it decides exactly the sends the person was shown: if any was added, removed or decided meanwhile, nothing is decided (
409 batch_changed). - A pending approval expires after 24 hours and the send is not delivered. A card whose send expired or was decided elsewhere clears with "Already handled."
- A person's own reply on a conversation, or a send they write after taking it over, is never held again, and it is not rewritten by the humanizer. It also takes the conversation over, so your agent stops sending to that contact from that mailbox until the person hands it back, see Threads.
Inbound and template approvals in the portal
Two more kinds of decision show up as cards on the portal's Home (/app), next to held sends:
- Inbound approvals. An incoming email the classifier routed to a person: an email it wasn't sure about (low confidence, or one that reads as more than one request), one that looks written to steer your agent, one the safety check flagged, and billing, legal or security mail your safety settings let through anyway. The card says why, names the email's platform label in plain words (for example "Asked to stop receiving mail"), and quotes the start of the email itself (its new text, without the quoted history or the signature). Approve records that a person signed off; for a request to stop receiving mail it also stops all email from your workspace to that sender, and the card says so. When the classifier wasn't confident (below 0.6), the card opens with "Low confidence: this may not be an unsubscribe request", and Not an unsubscribe is its main button. When the sender is in a conversation with you (they wrote to you and you replied in the last 30 days), the card warns about that too. If you approve one by mistake, Undo next to the outcome undoes it for 10 minutes: the email waits for your decision again, and the suppression that approval added is removed (an older suppression of the same address is put back as it was, and a newer one is left alone). After 10 minutes, remove the suppression from the contact instead. The phone app shows the same card with the same wording: when approving would stop all email to the sender, its buttons read Unsubscribe them and Not an unsubscribe (the second is the main button on a low-confidence card), a line under the card says what Unsubscribe them does, and the start of the email shows on the card as plain text. After you approve, the app shows "Stopped all email to" the sender with Undo for 10 minutes; a late Undo is refused and the suppression stays. Reject records that a person said no: the email stays where it is and nothing runs. Either way the decision records who made it and when, and a rejected approval keeps the status
rejected, so you can filter on it (GET /v1/inbound?status=rejected). Approving one at a time is for the portal and the phone app; approving every email with one platform label at once (POST /v1/inbound/bulk-approve?label=) is only available through the API. Home shows the ones routed in the last 30 days; an older one that is still pending stays listed (GET /v1/inbound?status=pending) and can still be decided. - Template approvals. A template with approval required waits here after it is published. An older version can't be approved once a newer one is live or waiting for review; reject it to clear it. Preview opens the version as written (its
{{variables}}in place) in the email viewer, with its lint results above it. A lint error is a warning, not a block: the person approving can still approve it. Approve makes that version the template's live one; Reject keeps the template as it was.
Only a pending approval can be decided. Deciding one that was already decided the other way returns 409 with { "error": "already_decided", "status": "..." } (a rejected template approval can never be flipped to approved later); repeating the same decision is a no-op.
Not-spam splits the difference: for an agent, it releases directly ONLY for a thread currently in the spam queue that the classifier never held (a plain inbox thread a human or agent manually reported as spam). Anything the classifier itself held -- needs_approval, high_risk, blocked_by_policy, or any safety verdict at all, even one that currently reads spam -- is gated exactly like approve/edit/release, same 403 human_decision_required response below. A thread's safety_verdict reflects only the LATEST classified message on it (an earlier phishing message followed by a later spam-only one flips the thread's own verdict to spam while the phishing message is still there), so a per-verdict exemption would be bypassable; this drops it rather than analyze per message. Also refused (403) whenever a human has taken the thread over, regardless of verdict or gate mode. Humans are unaffected either way.
POST /v1/threads/restore (manage scope) is conditionally gated the same way: restoring a thread a human rejected, or that a spam-triage decision (delete-spam) removed, is a triage decision, gated exactly like approve/edit/release (kind thread). Otherwise a rejected phishing message a human reviewed, or a message a spam decision removed, could go straight back into the agent's inbox with no queue and no further review -- and delete-spam then restore would be a second way around the spam-triage gate above. An agent may restore, without a human decision, only a thread that an agent trashed itself, via the plain POST /v1/threads/trash action or a mailbox deletion; a thread a human trashed (by any of those same paths), rejected, or deleted as spam always needs a human. Re-trashing an already-trashed thread never changes its recorded reason -- an agent can't launder a human's rejection into a plain trash by calling trash on it again -- and archive never touches a trashed thread at all, so it can't be used to slip around the gate either. Every thread trashed before this gate shipped has no recorded reason and reads as needing a human too, even one an agent trashed itself: a real, one-time behaviour change on upgrade. Humans are unaffected. See Threads.
What an agent key gets depends on the account's mode:
| Mode | Agent calls | Who has it |
|---|---|---|
enforce | 403 human_decision_required with a decisionUrl to the portal page for that item. Nothing is decided. | Every account created from now on. |
warn | The call still works. The response carries a Molted-Deprecation: human-gate header, and the account owner gets one email a day listing the decisions agents made. | Accounts that existed before this change, for 30 days. After that they behave as enforce. |
off | The call works as before. | Only when set explicitly. |
{
"error": "human_decision_required",
"message": "This decision needs a human. Share the decisionUrl with a person on your team; they can approve or reject it in the Molted portal.",
"decisionUrl": "https://molted.email/app/decide/thread/THREAD_ID",
"kind": "thread",
"id": "THREAD_ID",
"reason": "enforce"
}decisionUrl always has the form <portal>/app/decide/<kind>/<id>, where kind is send (a send approval), thread (a thread in a review queue), held (a held message), inbound (an inbound routing action), inbound-intent (bulk approval by intent) or template (a template approval). Outside the queues the same shape carries billing and the kinds for loosening a control (autonomy, humanizer, mailbox-resume and others, see Loosening a control). reason is enforce, warn_expired (the account's warning period is over) or thread_taken_over.
What your agent should do: stop, don't retry, and hand the decisionUrl to a person (chat, ticket or email). To pass a whole conversation to a person, use a handoff.
CLI and MCP never call these endpoints on your behalf, whatever the account's mode. molted overrides approve, edit, release and reject-held (alias: reject) build the same decisionUrl locally and print it, unconditionally: they don't try the API first. molted overrides reject-send still calls through (POST /v1/agent/override/:threadId/reject), but that route has no own-withdrawal exception: once the account enforces the gate it returns 403 with a decisionUrl (and a hint pointing at the withdraw command), even for a send your own key created. To withdraw your own pending send use molted approvals withdraw (CLI) or withdraw_send (MCP, policy toolset: add ?toolsets=policy). (molted templates approve and reject do call PATCH /v1/templates/approvals/:id, so on an enforcing account they come back 403 with the decisionUrl.) The MCP server has no approve tool and no tools for reading the override queues (its one decision tool is withdraw_send, for your own send); call request_decision with the item's kind and id (and an optional note) to get the link, and every other MCP tool surfaces decisionUrl in its result if it happens to hit a gated route. The spam-triage routes are MCP tools too: mark_not_spam, report_spam, delete_spam, spam_feedback_stats, sender_reputation, list_sender_allowlist and remove_sender_allowlist_entry. See CLI Quickstart and MCP Server for the full command/tool reference. This is the sanctioned exception to "every customer feature goes through the mailbox API" (D3): decisions and loosening controls stay in the API/portal and need a human; for a decision on anyone else's item the CLI and MCP only ever hand back a link; the one thing they decide is withdrawing your own pending send.
Two rules apply in every mode:
- An agent may withdraw its own send. With
molted approvals withdraw, the MCP toolwithdraw_send(in thepolicytoolset,?toolsets=policy), orPATCH /v1/send/approvals/:idwith{"decision": "rejected", "withdraw": true}. It works when the pending send was created with the same API key (or a key linked to the same agent); anyone else's send is403 not_own_sendand an unknown id404, whatever the account's gate mode. (Without"withdraw": truethe raw PATCH is only gated inenforcemode, so always send it when withdrawing.) Approving it is still a human decision. - A taken-over thread is off limits. While a person has taken a thread over, agents can't approve or release anything on it (
403,reason: "thread_taken_over").
List send approvals
A plain, read-only list of this tenant's send approvals, scoped to the mailboxes the calling key can read. This is distinct from the override queues above: a send approval is the record PATCH /v1/send/approvals/:id decides, not an override-queue item. Each approval carries contentTrust: "untrusted" when its payload_json.subject is Re: <the contact's subject> (a reply sent without a subject of its own), "tenant" when your agent or a person wrote it. A reply held on a quarantined thread would echo the quarantined subject, so that payload_json.subject is the quarantine placeholder unless the key has operator scope and asks with ?includeQuarantined=true.
GET https://mailbox.molted.email/v1/send/approvalscurl "https://mailbox.molted.email/v1/send/approvals?status=pending" \
-H "Authorization: Bearer YOUR_API_KEY"Query parameters
| Parameter | Type | Description |
|---|---|---|
tenantId | string | Only on api.molted.email, where it is required; mailbox.molted.email fills it in from your key. |
status | string | Filter by approval status: pending, approved, rejected or expired |
mailboxId | string | Filter to a specific mailbox (a UUID; 403 outside the calling key's scope) |
requestId | string | Only the approval of this send request, the requestId a held send returned (a UUID, else 400 invalid_request_id). Resolved in the database, so it finds the approval however many newer ones exist; a request on a mailbox outside the key's scope is not in the result |
It returns the 100 most recent approvals, newest first, each with exactly these fields: id, request_id, mailbox_id, status, decision_reason, decided_at, decided_by, expires_at, created_at, and the send's recipient_email, template_id, reply_to, send_reason, scheduled_at, attachments ([{ id, filename, contentType }]) and payload_json (the content to be sent; Molted's internal _-prefixed keys are removed). Nothing else is returned. GET /v1/send/approvals/:id reads one (404 approval_not_found when there is none). A pending approval expires 24 hours after the send was held.
Deciding one (PATCH /v1/send/approvals/:id, body { "decision": "approved" | "rejected", "reason"? }) answers 409 already_decided for an approval that is no longer pending (a repeat of the same decision included) and 410 approval_expired once it has expired. An approved send that can't be queued puts the approval back to pending: 429 (quota_exceeded, or free_sends_paused) when the send quota is used up, 502 enqueue_failed otherwise; 422 attachment_blocked when one of its attachments may no longer be sent. A rejected or expired approval also gives back the warmup slot and the recipient-domain and sender-domain limit units the held send was counting; an approved one keeps them. A soft-bounce retry of an approved send whose rewritten text was erased by content retention is blocked with content_expired rather than sent with different words.
CLI
molted approvals list
molted approvals list --status pending
molted approvals list --mailbox MAILBOX_IDApproving an approval is human-only (D3) and is not exposed here, matching molted overrides approve/edit/release/reject-held above. Withdrawing your own pending send (D4) is molted approvals withdraw:
molted approvals withdraw APPROVAL_ID
molted approvals withdraw --request REQUEST_ID --reason "Sent to the wrong list"Give exactly one of the approval id or --request. A send held for approval returns { requestId, status: "pending_approval" } with no approval id; --request looks up its pending approval for you with GET /v1/send/approvals?status=pending&requestId=... (no cap on how many newer approvals exist). It calls PATCH /v1/send/approvals/:id with {"decision": "rejected"}. A send you didn't create (with your key or another key of your agent) is 403 not_own_send, an approval that is no longer pending is 409, and an expired one is 410.
Queue counts
Get the current item count for each queue. Use this as a lightweight check before listing queue contents.
GET https://mailbox.molted.email/v1/agent/override/queues/countscurl "https://mailbox.molted.email/v1/agent/override/queues/counts" \
-H "Authorization: Bearer YOUR_API_KEY"Query parameters
| Parameter | Type | Description |
|---|---|---|
tenantId | string | Only on api.molted.email, where it is required; mailbox.molted.email fills it in from your key. |
mailboxId | string | Scope counts to a specific mailbox (a UUID; the key needs manage on it). Without it, a mailbox-scoped key counts only its own mailboxes. |
Response
{
"needs_approval_outbound": 3,
"needs_approval_inbound": 1,
"blocked_by_policy": 0,
"high_risk": 0,
"spam": 5
}CLI
molted overrides countsList queue items
List the items in a specific queue.
GET https://mailbox.molted.email/v1/agent/override/queues/:queuecurl "https://mailbox.molted.email/v1/agent/override/queues/needs_approval?direction=outbound&limit=25" \
-H "Authorization: Bearer YOUR_API_KEY"Path parameters
| Parameter | Description |
|---|---|
queue | Queue name: needs_approval, blocked_by_policy, high_risk, spam. The needs_approval_outbound and needs_approval_inbound counts both roll up under the single needs_approval queue -- use ?direction=inbound|outbound to filter. |
Query parameters
| Parameter | Type | Description |
|---|---|---|
tenantId | string | Only on api.molted.email, where it is required; mailbox.molted.email fills it in from your key. |
mailboxId | string | Filter to a specific mailbox |
direction | string | Filter needs_approval by direction: inbound, outbound |
limit | integer | Max items (1-50, default 25) |
offset | integer | Pagination offset |
CLI
molted overrides queue needs_approval --direction outbound --limit 10List held messages
List messages that are held pending approval for a tenant or thread.
GET https://mailbox.molted.email/v1/agent/override/held-messagescurl "https://mailbox.molted.email/v1/agent/override/held-messages" \
-H "Authorization: Bearer YOUR_API_KEY"Query parameters
| Parameter | Type | Description |
|---|---|---|
tenantId | string | Only on api.molted.email, where it is required; mailbox.molted.email fills it in from your key. |
threadId | string | Filter to messages in a specific thread |
A held message that is also quarantined for high prompt-injection risk has its body replaced with "[quarantined -- injection risk]", the same placeholder used on get a thread. One on a thread in a safety quarantine (phishing, malware, ...) gets "[quarantined -- flagged as unsafe, held until a person releases it]". Only a human release or reject (below) sees or acts on the real content.
CLI
molted overrides held-messages
molted overrides held-messages --thread-id THREAD_IDRelease a held message
Let a held inbound message through: it stops being hidden, so agents can read it in its thread. Nothing is sent. A message held because the inbound allowance is used up can't be released by hand (409 inbound_quota_held); it is released automatically at the start of next month, or when the workspace moves to a paid plan.
POST https://mailbox.molted.email/v1/agent/override/held-messages/:messageId/releasecurl -X POST "https://mailbox.molted.email/v1/agent/override/held-messages/MESSAGE_ID/release" \
-H "Authorization: Bearer YOUR_API_KEY"CLI
Releasing is a human decision (D3). The CLI does not call this endpoint, it prints the decisionUrl and exits non-zero:
molted overrides release MESSAGE_ID
# → { "error": "human_decision_required", "decisionUrl": "https://molted.email/app/decide/held/MESSAGE_ID", ... }Reject a held message
Keep a held inbound message away from agents: it moves to quarantine instead of being released. The same 409 inbound_quota_held applies.
POST https://mailbox.molted.email/v1/agent/override/held-messages/:messageId/rejectcurl -X POST "https://mailbox.molted.email/v1/agent/override/held-messages/MESSAGE_ID/reject" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "reason": "Content not appropriate for this contact" }'Request body
| Field | Type | Description |
|---|---|---|
reason | string | Optional reason for rejection |
CLI
Rejecting a held message is a human decision (D3). The CLI does not call this endpoint, it prints the decisionUrl and exits non-zero:
molted overrides reject-held MESSAGE_ID
# alias: molted overrides reject MESSAGE_ID
# → { "error": "human_decision_required", "decisionUrl": "https://molted.email/app/decide/held/MESSAGE_ID", ... }Approve a thread
Approve a held outbound send on a thread. The message is released for delivery.
POST https://mailbox.molted.email/v1/agent/override/:threadId/approvecurl -X POST "https://mailbox.molted.email/v1/agent/override/THREAD_ID/approve" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "Content reviewed - looks good",
"recipientEmail": "alice@example.com",
"templateId": "welcome",
"dedupeKey": "welcome-alice-approved-1",
"payload": { "name": "Alice" }
}'Request body
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | Yes | Why you are approving this send |
approvalId | string (UUID) | No | The send approval to approve, when the thread has more than one pending |
templateId | string | No | Override the template for this send |
recipientEmail | string | No | Override the recipient |
dedupeKey | string | No | Override the deduplication key |
payload | object | No | Override the template payload |
quarantine | boolean | No | true for a Quarantine release (see above): refused (409) unless the thread is a non-spam safety quarantine with no draft waiting |
CLI
Approving is a human decision (D3). The CLI does not call this endpoint, it prints the decisionUrl and exits non-zero:
molted overrides approve THREAD_ID
# → { "error": "human_decision_required", "decisionUrl": "https://molted.email/app/decide/thread/THREAD_ID", ... }Reject a thread
Reject a held send on a thread. The message is discarded, and any pending send approval(s) linked to the thread are rejected along with it, so a rejected send can no longer be approved and dispatched afterward.
POST https://mailbox.molted.email/v1/agent/override/:threadId/rejectcurl -X POST "https://mailbox.molted.email/v1/agent/override/THREAD_ID/reject" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "reason": "Wrong template selected" }'Request body
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | Yes | Why you are rejecting this send |
quarantine | boolean | No | true for a Quarantine delete (see above) |
CLI
reject-send calls this route, which is gated like approve and has no own-withdrawal exception: once the account enforces the gate it returns 403 human_decision_required with a decisionUrl, even for a send your own key created. To withdraw your own pending send, use molted approvals withdraw (see Decisions need a human) instead; the 403 body carries a hint saying so.
molted overrides reject-send THREAD_ID --reason "Wrong template"Edit a held message
Modify a held message before releasing it. Use this to adjust routing or metadata without discarding the message entirely.
POST https://mailbox.molted.email/v1/agent/override/:threadId/editcurl -X POST "https://mailbox.molted.email/v1/agent/override/THREAD_ID/edit" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "Adjusted tone before sending",
"metadata": { "reviewed_by": "supervisor-agent" }
}'Request body
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | Yes | Why you are editing the message |
assignedAgentId | string | No | Reassign the thread to a different agent |
metadata | object | No | Update thread metadata |
CLI
Editing is a human decision (D3). The CLI does not call this endpoint, it prints the decisionUrl and exits non-zero:
molted overrides edit THREAD_ID
# → { "error": "human_decision_required", "decisionUrl": "https://molted.email/app/decide/thread/THREAD_ID", ... }Escalate a thread
Route a thread to a human reviewer or a named team when the agent cannot
decide. Escalating does not reject anything: a pending send approval on the
thread stays pending for that human to decide, and the thread stays visible
in its original queue (and in queue counts) with status escalated.
Escalating is a handoff: it creates the
thread's handoff (or reuses an open one) with your reason as its note, so
the person's card says why. The response adds handoff and
handoffCreated. A handoff (POST /v1/agent/threads/:id/handoff) also takes
a one-line ask, so prefer it.
POST https://mailbox.molted.email/v1/agent/override/:threadId/escalatecurl -X POST "https://mailbox.molted.email/v1/agent/override/THREAD_ID/escalate" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"reason": "Complex legal question - needs human review",
"assignTo": "legal-team"
}'Request body
| Field | Type | Required | Description |
|---|---|---|---|
reason | string | Yes | Why you are escalating |
assignTo | string | No | Name or identifier of the team or person to escalate to |
CLI
molted overrides escalate THREAD_ID \
--reason "Complex legal question" \
--assign-to "legal-team"Supervisor agent pattern
A common pattern for agents managing L1 or L2 mailboxes is a periodic supervisor loop:
# 1. Check queue depth
molted overrides counts
# 2. Review pending items (needs_approval covers both inbound and outbound)
molted overrides queue needs_approval --direction outbound --limit 25
# 3. For each item: share the decisionUrl with a human, or escalate
molted overrides approve THREAD_ID # prints a decisionUrl for a human
molted overrides escalate THREAD_ID_3 --reason "Needs legal sign-off"
# 4. Repeat on intervalTo integrate programmatically, poll the queues/counts endpoint and trigger your review logic when counts exceed a threshold. Use webhooks or events to get notified without polling.