Outbox
The one outbound record — every message from creation to engagement, on two states: draft → sent (opened/clicked/replied/bounced refine it) | failed (+ declined). You always create rows at status draft; Approve or a live agent's mint SENDS right then, and each row ends sent or failed with the reason on it. Writing declined/sent yourself is refused at the boundary (outbox_status_requires_dash_action).
Base path /api/v1/outbox on https://moabcrm.com. Authenticate with Authorization: Bearer $DASH_API_KEY and name the project with the Project-ID header. Writes are validated in strict mode; an operation this resource does not declare answers 405 operation_not_supported.
List outbox
GET /api/v1/outbox
curl "https://moabcrm.com/api/v1/outbox?status=draft" \
-H "Authorization: Bearer $DASH_API_KEY" \
-H "Project-ID: pr_zest"Show me the draft messages from the last rundata_query {
"collection": "outbox",
"where": {
"status": "draft"
}
}Returns a paginated list of outbox objects, newest first.
{
"object": "list",
"data": [
{
"object": "outbox",
"id": "obj_123",
"subject": "Hermes joins the team",
"body": "Hi Dana — saw Riverside just opened a second pit…",
"status": "draft",
"sent_at": "2026-07-25T12:00:00.000Z",
"sent_via": "resend",
"opened_at": "2026-07-25T12:00:00.000Z",
"clicked_at": "2026-07-25T12:00:00.000Z",
"status_reason": "status reason",
"status_detail": "status detail",
"copy_gap": "copy gap",
"channel": "email",
"content_type": "content type",
"employee_id": "employee_123",
"from": "from",
"to": "dana@riversideenv.com",
"recipient_company_domain": "recipient company domain",
"reason": "reason",
"followup": true,
"step_number": 1,
"total_steps": 1,
"scheduled_for": "2026-07-25T12:00:00.000Z",
"review_context": {
"company_summary": "company summary",
"company_stage": "company stage",
"company_category": "company category",
"person_name": "person name",
"person_title": "person title",
"persona_reason": "persona reason",
"content_angle": "content angle",
"message_summary": "message summary",
"why_this_company": "why this company",
"why_this_person": "why this person",
"why_this_message": "why this message",
"checks": [],
"review_signal": "review signal"
},
"created_at": "2026-07-25T12:00:00.000Z",
"updated_at": "2026-07-25T12:00:00.000Z"
}
],
"has_more": false,
"next_cursor": null
}Parameters
| Parameter | Type | Kind | Description |
|---|---|---|---|
status | string | filter | The message's one status (2026-08-21 send simplification §2). You only ever write draft. The send road judges every row: it lands sent (handed off — sent_at is our own handoff stamp), failed (the wire refused it), or held (the road declined pre-wire). Either way the named code lands in the ONE status_reason field. A held row is re-evaluated on every later pass and releases when its cause clears (or when the operator presses Approve). The engagement states (opened, clicked, replied, bounced) are appended refinements of sent, server-written on provider or first-party-link evidence. Any other status from you is refused (outbox_status_requires_dash_action). One of draft, held, sent, opened, clicked, replied, bounced, failed, declined. |
run_id | string | filter | The campaign-agent run that produced this message — draft rows are reviewed a run at a time. |
channel | string | filter | Delivery channel this message goes through. One of email, linkedin. |
agent_id | string | filter | Campaign agent that wrote the message. |
person_id | string | filter | The person this message is addressed to. |
company_id | string | filter | The company the recipient works at. |
content_id | string | filter | The content row this message's copy was generated from. |
sequence_id | string | filter | The sequences row this message is one step of, when it belongs to a sequence. |
campaign_id | string | filter | The provider campaign this message was preloaded into, stamped by the send road at handoff — the real matching key for provider-activity stamps (the reconciler's campaign universe reads THIS, §5.1). |
link_code | string | filter | The link_codes code minted for this message's tracked/offer link (e.g. MIKE20). Stamped by the draft-time link-rewrite pass; absent in plain mode with no offer. |
sent_at | date | filter | When WE handed the message off (transactional 200, or the completed campaign preload) — our own clock, the daily counter's basis (§11). Equals delivered_at: the handoff IS the send (one clock, 2026-09-10). |
delivered_at | date | filter | The ONE clock "sent" means on every tile, chart and lane rate — stamped at the handoff for every provider (outbox-settlement.ts, 2026-09-10), so it equals sent_at. Before that day a campaign row waited for the provider's own per-lead confirmation (HeyReach 8.6 days on average, lemlist 4.8) and read as "queued" the whole time; nothing waits on a provider any more. |
q | string | search | Free-text search across subject, to. |
sort | string | sort | One of status, scheduled_for, sent_at; prefix with - to reverse. |
limit | number | page | Rows to return, 1–100. Defaults to 20. |
cursor | string | page | next_cursor from the previous page. |
Retrieve a outbox
GET /api/v1/outbox/draft-001
curl "https://moabcrm.com/api/v1/outbox/draft-001" \
-H "Authorization: Bearer $DASH_API_KEY" \
-H "Project-ID: pr_zest"Open message {id} and show me why this persondata_get {
"collection": "outbox",
"object_id": "draft-001"
}Returns the outbox object.
{
"object": "outbox",
"id": "obj_123",
"subject": "Hermes joins the team",
"body": "Hi Dana — saw Riverside just opened a second pit…",
"status": "draft",
"sent_at": "2026-07-25T12:00:00.000Z",
"sent_via": "resend",
"opened_at": "2026-07-25T12:00:00.000Z",
"clicked_at": "2026-07-25T12:00:00.000Z",
"status_reason": "status reason",
"status_detail": "status detail",
"copy_gap": "copy gap",
"channel": "email",
"content_type": "content type",
"employee_id": "employee_123",
"from": "from",
"to": "dana@riversideenv.com",
"recipient_company_domain": "recipient company domain",
"reason": "reason",
"followup": true,
"step_number": 1,
"total_steps": 1,
"scheduled_for": "2026-07-25T12:00:00.000Z",
"review_context": {
"company_summary": "company summary",
"company_stage": "company stage",
"company_category": "company category",
"person_name": "person name",
"person_title": "person title",
"persona_reason": "persona reason",
"content_angle": "content angle",
"message_summary": "message summary",
"why_this_company": "why this company",
"why_this_person": "why this person",
"why_this_message": "why this message",
"checks": [],
"review_signal": "review signal"
},
"created_at": "2026-07-25T12:00:00.000Z",
"updated_at": "2026-07-25T12:00:00.000Z"
}Parameters
| Parameter | Type | Kind | Description |
|---|---|---|---|
id | string | path | The outbox's id or slug. |
Create a outbox
POST /api/v1/outbox
curl -X POST "https://moabcrm.com/api/v1/outbox" \
-H "Authorization: Bearer $DASH_API_KEY" \
-H "Project-ID: pr_zest" \
-H "Content-Type: application/json" \
-d '{"subject":"Hermes joins the team","body":"Hi Dana — saw Riverside just opened a second pit…","to":"dana@riversideenv.com","channel":"email","status":"draft","agent_id":"agent-eplan-smallenv","person_id":"person-dana-holt","company_id":"company-riverside-env","content_id":"content-eplan-smallenv-intro"}'Draft an email to Dana at Riverside about the new pitdata_set {
"collection": "outbox",
"object_id": "draft-001",
"data": {
"subject": "Hermes joins the team",
"body": "Hi Dana — saw Riverside just opened a second pit…",
"to": "dana@riversideenv.com",
"channel": "email",
"status": "draft",
"agent_id": "agent-eplan-smallenv",
"person_id": "person-dana-holt",
"company_id": "company-riverside-env",
"content_id": "content-eplan-smallenv-intro"
}
}Returns the outbox object.
{
"object": "outbox",
"id": "obj_123",
"subject": "Hermes joins the team",
"body": "Hi Dana — saw Riverside just opened a second pit…",
"status": "draft",
"sent_at": "2026-07-25T12:00:00.000Z",
"sent_via": "resend",
"opened_at": "2026-07-25T12:00:00.000Z",
"clicked_at": "2026-07-25T12:00:00.000Z",
"status_reason": "status reason",
"status_detail": "status detail",
"copy_gap": "copy gap",
"channel": "email",
"content_type": "content type",
"employee_id": "employee_123",
"from": "from",
"to": "dana@riversideenv.com",
"recipient_company_domain": "recipient company domain",
"reason": "reason",
"followup": true,
"step_number": 1,
"total_steps": 1,
"scheduled_for": "2026-07-25T12:00:00.000Z",
"review_context": {
"company_summary": "company summary",
"company_stage": "company stage",
"company_category": "company category",
"person_name": "person name",
"person_title": "person title",
"persona_reason": "persona reason",
"content_angle": "content angle",
"message_summary": "message summary",
"why_this_company": "why this company",
"why_this_person": "why this person",
"why_this_message": "why this message",
"checks": [],
"review_signal": "review signal"
},
"created_at": "2026-07-25T12:00:00.000Z",
"updated_at": "2026-07-25T12:00:00.000Z"
}Parameters
| Field | Type | Required | Description |
|---|---|---|---|
subject | string | no | Subject line the recipient sees. |
body | text | no | Message body, already personalised for the recipient. |
status | string | no | The message's one status (2026-08-21 send simplification §2). You only ever write draft. The send road judges every row: it lands sent (handed off — sent_at is our own handoff stamp), failed (the wire refused it), or held (the road declined pre-wire). Either way the named code lands in the ONE status_reason field. A held row is re-evaluated on every later pass and releases when its cause clears (or when the operator presses Approve). The engagement states (opened, clicked, replied, bounced) are appended refinements of sent, server-written on provider or first-party-link evidence. Any other status from you is refused (outbox_status_requires_dash_action). One of draft, held, sent, opened, clicked, replied, bounced, failed, declined. |
agent_id | string | no | Campaign agent that wrote the message. |
person_id | string | no | The person this message is addressed to. |
channel | string | no | Delivery channel this message goes through. One of email, linkedin. |
content_type | string | no | The content piece's own type ("email" / "linkedin_message" / …), copied from the content row this message was generated from. |
employee_id | string | no | The employees persona this message is written AS. The sender pick resolves the wire from-address from the moab.channels sender tagged with this id; a message naming no employee gets the provider's first declared sender. |
from | string | no | The employee's display NAME — what the review card's From line renders, so the visible sender and the wire sender agree by construction. |
to | string | no | Recipient address (email) or profile (linkedin). |
recipient_company_domain | string | no | The recipient's company domain, denormalised so the review card needs no join. |
reason | text | no | Why this person, this company, this message — shown in the review card. |
followup | boolean | no | Operator-directed follow-up marker. Set by prospect-agent ONLY when the operator explicitly asked to re-contact this audience (a named follow-up campaign); it passes the person_already_contacted stop so the draft reaches review, where the human decides at Approve. Never set during autonomous cold sourcing — the delivered-contact stop stays binding there. |
content_id | string | no | The content row this message's copy was generated from. |
step_number | number | no | This message's 1-based position in its sequence. |
total_steps | number | no | How many steps the owning sequence has, so a card can read "2 of 4". |
scheduled_for | date | no | When the sequence releases this step. |
company_id | string | no | The company the recipient works at. |
declined_reason | text | no | Why the reviewer declined, written by the outbound-sync review pass. |
review_context | object | no | The review dossier: the denormalised recipient facts and the why-this-company / why-this-person / why-this-message evidence a human reads before approving, plus the saved write-time checks and the reviewer's verdict signal. An object write replaces the whole dossier. |
review_context.company_summary | text | no | What the recipient's company does, denormalised onto the draft for review. |
review_context.company_stage | string | no | Funding/maturity stage of the recipient's company, as researched. |
review_context.company_category | string | no | The recipient company's category or vertical. |
review_context.person_name | string | no | The recipient's name, denormalised so the review card needs no join. |
review_context.person_title | string | no | The recipient's job title at that company. |
review_context.persona_reason | text | no | Why this ROLE is the right buyer for this product. |
review_context.content_angle | string | no | The one-line angle this message takes. |
review_context.message_summary | text | no | A one-sentence summary of the body, for reviewing a batch without opening each. |
review_context.why_this_company | text | no | The evidence that this company fits the ICP, in the reviewer's words. |
review_context.why_this_person | text | no | The evidence that this person is the buyer at that company. |
review_context.why_this_message | text | no | Why this angle for this reader, rather than the generic pitch. |
review_context.checks | array | no | Saved write-time checks, one row per check — \{ id, status: pass|warn|fail, note? \}. The first is cross_agent_dedup (the same person/company must not be worked by two agents). Rendered collapsed inside the review card. |
review_context.review_signal | string | no | The reviewer's verdict signal on this draft, fed back to the planner so a losing angle is not re-run. |
reviewed_at | date | no | When a review pass last looked at this draft. |
review_notes | text | no | The reviewer's free-text notes for the next pass. |
Update a outbox
PATCH /api/v1/outbox/draft-001
curl -X PATCH "https://moabcrm.com/api/v1/outbox/draft-001" \
-H "Authorization: Bearer $DASH_API_KEY" \
-H "Project-ID: pr_zest" \
-H "Content-Type: application/json" \
-d '{"status":"draft","channel":"email"}'Change the channel on message {id} to linkedindata_set {
"collection": "outbox",
"object_id": "draft-001",
"data": {
"status": "draft",
"channel": "email"
}
}Returns the outbox object.
{
"object": "outbox",
"id": "obj_123",
"subject": "Hermes joins the team",
"body": "Hi Dana — saw Riverside just opened a second pit…",
"status": "draft",
"sent_at": "2026-07-25T12:00:00.000Z",
"sent_via": "resend",
"opened_at": "2026-07-25T12:00:00.000Z",
"clicked_at": "2026-07-25T12:00:00.000Z",
"status_reason": "status reason",
"status_detail": "status detail",
"copy_gap": "copy gap",
"channel": "email",
"content_type": "content type",
"employee_id": "employee_123",
"from": "from",
"to": "dana@riversideenv.com",
"recipient_company_domain": "recipient company domain",
"reason": "reason",
"followup": true,
"step_number": 1,
"total_steps": 1,
"scheduled_for": "2026-07-25T12:00:00.000Z",
"review_context": {
"company_summary": "company summary",
"company_stage": "company stage",
"company_category": "company category",
"person_name": "person name",
"person_title": "person title",
"persona_reason": "persona reason",
"content_angle": "content angle",
"message_summary": "message summary",
"why_this_company": "why this company",
"why_this_person": "why this person",
"why_this_message": "why this message",
"checks": [],
"review_signal": "review signal"
},
"created_at": "2026-07-25T12:00:00.000Z",
"updated_at": "2026-07-25T12:00:00.000Z"
}Parameters
| Field | Type | Required | Description |
|---|---|---|---|
subject | string | no | Subject line the recipient sees. |
body | text | no | Message body, already personalised for the recipient. |
status | string | no | The message's one status (2026-08-21 send simplification §2). You only ever write draft. The send road judges every row: it lands sent (handed off — sent_at is our own handoff stamp), failed (the wire refused it), or held (the road declined pre-wire). Either way the named code lands in the ONE status_reason field. A held row is re-evaluated on every later pass and releases when its cause clears (or when the operator presses Approve). The engagement states (opened, clicked, replied, bounced) are appended refinements of sent, server-written on provider or first-party-link evidence. Any other status from you is refused (outbox_status_requires_dash_action). One of draft, held, sent, opened, clicked, replied, bounced, failed, declined. |
agent_id | string | no | Campaign agent that wrote the message. |
person_id | string | no | The person this message is addressed to. |
channel | string | no | Delivery channel this message goes through. One of email, linkedin. |
content_type | string | no | The content piece's own type ("email" / "linkedin_message" / …), copied from the content row this message was generated from. |
employee_id | string | no | The employees persona this message is written AS. The sender pick resolves the wire from-address from the moab.channels sender tagged with this id; a message naming no employee gets the provider's first declared sender. |
from | string | no | The employee's display NAME — what the review card's From line renders, so the visible sender and the wire sender agree by construction. |
to | string | no | Recipient address (email) or profile (linkedin). |
recipient_company_domain | string | no | The recipient's company domain, denormalised so the review card needs no join. |
reason | text | no | Why this person, this company, this message — shown in the review card. |
followup | boolean | no | Operator-directed follow-up marker. Set by prospect-agent ONLY when the operator explicitly asked to re-contact this audience (a named follow-up campaign); it passes the person_already_contacted stop so the draft reaches review, where the human decides at Approve. Never set during autonomous cold sourcing — the delivered-contact stop stays binding there. |
content_id | string | no | The content row this message's copy was generated from. |
step_number | number | no | This message's 1-based position in its sequence. |
total_steps | number | no | How many steps the owning sequence has, so a card can read "2 of 4". |
scheduled_for | date | no | When the sequence releases this step. |
company_id | string | no | The company the recipient works at. |
declined_reason | text | no | Why the reviewer declined, written by the outbound-sync review pass. |
review_context | object | no | The review dossier: the denormalised recipient facts and the why-this-company / why-this-person / why-this-message evidence a human reads before approving, plus the saved write-time checks and the reviewer's verdict signal. An object write replaces the whole dossier. |
review_context.company_summary | text | no | What the recipient's company does, denormalised onto the draft for review. |
review_context.company_stage | string | no | Funding/maturity stage of the recipient's company, as researched. |
review_context.company_category | string | no | The recipient company's category or vertical. |
review_context.person_name | string | no | The recipient's name, denormalised so the review card needs no join. |
review_context.person_title | string | no | The recipient's job title at that company. |
review_context.persona_reason | text | no | Why this ROLE is the right buyer for this product. |
review_context.content_angle | string | no | The one-line angle this message takes. |
review_context.message_summary | text | no | A one-sentence summary of the body, for reviewing a batch without opening each. |
review_context.why_this_company | text | no | The evidence that this company fits the ICP, in the reviewer's words. |
review_context.why_this_person | text | no | The evidence that this person is the buyer at that company. |
review_context.why_this_message | text | no | Why this angle for this reader, rather than the generic pitch. |
review_context.checks | array | no | Saved write-time checks, one row per check — \{ id, status: pass|warn|fail, note? \}. The first is cross_agent_dedup (the same person/company must not be worked by two agents). Rendered collapsed inside the review card. |
review_context.review_signal | string | no | The reviewer's verdict signal on this draft, fed back to the planner so a losing angle is not re-run. |
reviewed_at | date | no | When a review pass last looked at this draft. |
review_notes | text | no | The reviewer's free-text notes for the next pass. |
Append an event to a outbox
POST /api/v1/outbox/{id}/events
curl -X POST "https://moabcrm.com/api/v1/outbox/draft-001/events" \
-H "Authorization: Bearer $DASH_API_KEY" \
-H "Project-ID: pr_zest" \
-H "Content-Type: application/json" \
-d '{"event":"Noted by the operator","context":{"source":"api"}}'Add a note to message {id} — held for the pricing reviewdata_event {
"collection": "outbox",
"object_id": "draft-001",
"event": "Noted by the operator"
}Returns the appended event object.
{
"object": "event",
"id": "evt_123",
"event": "Noted by the operator"
}Parameters
| Field | Type | Required | Description |
|---|---|---|---|
event | string | yes | The human-readable timeline entry. |
context | object | no | Provenance — source, integration, worker_run_id, … |
What comes back (read-only)
Every outbox carries the envelope below. The fields under it are computed or stamped by the platform — they are returned, never sent.
| Field | Type | Description |
|---|---|---|
object | string | Always outbox. |
id | string | Stable object id. Also accepted in place of slug on any path. |
slug | string | URL-safe name, unique within the collection. |
created_at | string | ISO-8601 timestamp of the first write. |
updated_at | string | ISO-8601 timestamp of the most recent write. The cursor sorts on this. |
sent_at | date | When WE handed the message off (transactional 200, or the completed campaign preload) — our own clock, the daily counter's basis (§11). Equals delivered_at: the handoff IS the send (one clock, 2026-09-10). |
sandbox | object | Test-inbox delivery facts ({ sent_at, sent_via, external_id }) — present only on a row the sandbox wire delivered; the row's status is held: sandbox_delivered until the project goes live. |
sandbox.sent_at | date | NEEDS-DESCRIPTION |
sandbox.sent_via | string | NEEDS-DESCRIPTION |
sandbox.external_id | string | NEEDS-DESCRIPTION |
sent_via | string | Integration this message is ROUTED through — stamped by the send road on every attempted row (failed included, so the status cell can say where a row failed) and by the delivery-completion hook. |
opened_at | date | First open (pixel) or first click, whichever came first. Stamped once by the dash-links worker. |
clicked_at | date | First tracked-link click. Stamped once by the dash-links worker. |
delivered_at | date | The ONE clock "sent" means on every tile, chart and lane rate — stamped at the handoff for every provider (outbox-settlement.ts, 2026-09-10), so it equals sent_at. Before that day a campaign row waited for the provider's own per-lead confirmation (HeyReach 8.6 days on average, lemlist 4.8) and read as "queued" the whole time; nothing waits on a provider any more. |
status_reason | string | THE named reason this row is not sent — one code, whatever the status. Held: person_not_deliverable, person_already_contacted, daily_send_cap_reached, sender_identity_unresolved, … Failed or bounced: the provider error code, campaign_activation_failed, a bounce type. Server-stamped beside the status it explains and cleared when the row sends; never written by you. Absent = nothing is wrong. |
status_detail | text | The provider's OWN words for a failed row — its 4xx body, verbatim (heyreach campaign create returned HTTP 400: The list does not exist!). Stamped by the road beside status_reason on failed; cleared when the row sends. A failure without its evidence is a failure nobody can act on (Plan v4 F11 / G8, 2026-09-09). |
provider | string | The provider this draft sends through — a BIRTH fact (Plan v4 F1/F15, 2026-09-09): stamped by the write door from its agent's ONE provider at mint, never re-picked. The road sends through it or holds by name (integration_not_connected / no_provider_capacity). sent_via is the sent-branch stamp of the same slug; a row whose sent_via differs from its provider is a re-route the receipt names as a blocker. |
fit_v | number | The version of the ONE axes rule (axesFit, lead-fit.ts) that stamped fit at the write door. Server-stamped, never written by you. |
fit | object | How this lead sits against its agent's CELL, observed at the write door: \{role, headcount, cohort\}, each in / out / unknown / na. Evidence for the planner (does an off-cell lead click like an in-cell one?), never a gate — a lead relevant to the product is sent from the agent that found it. Server-stamped, never written by you. |
failed_at | date | When the failure landed — the failed-count metric's window field. |
copy_gap | string | Named copy-consistency gap stamped by the link-rewrite pass — today offer_program_mismatch: … when the body names a program that is not this agent's own ("50% for hf0 teams" inside a YC campaign). A visible review flag, never a send gate. Empty = clean. |
external_id | string | The provider's own id for this message (Resend email id, campaign provider activity/lead id) — the deep-link handle. Server-written on delivery completion or provider-activity reconciliation. |
run_id | string | The campaign-agent run that produced this message — draft rows are reviewed a run at a time. |
sequence_id | string | The sequences row this message is one step of, when it belongs to a sequence. |
campaign_id | string | The provider campaign this message was preloaded into, stamped by the send road at handoff — the real matching key for provider-activity stamps (the reconciler's campaign universe reads THIS, §5.1). |
link_code | string | The link_codes code minted for this message's tracked/offer link (e.g. MIKE20). Stamped by the draft-time link-rewrite pass; absent in plain mode with no offer. |
links | array | The reviewable link-rewrite record, one row per URL in the body — \{ original, final_href, display, domain, code?, mode: plain|direct|tracked|third_party \}. Written by rewriteOutboundLinks at draft create/update; what the operator sees in the review links block is exactly what the wire will carry. |
image_artifact_id | string | The uploaded artifact rendered inline in this message, when it carries an image. |
score | object | The message's grade — { total, components }. The write door folds components by id and computes total (best-practices rules). Absent until graded. |
score.total | number | Sum of components[].points — computed by the write door, never written. |
score.components | array | The score's ledger — [{ id, kind: best_practices, points, note }]. note lists the fired rule ids. |
Errors
Failures use { error: { type, code, message, param } }. The full code table is generated at Error Codes.