Moab logoMoab
Get started
Moab Docs

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 run
data_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

ParameterTypeKindDescription
statusstringfilterThe 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_idstringfilterThe campaign-agent run that produced this message — draft rows are reviewed a run at a time.
channelstringfilterDelivery channel this message goes through. One of email, linkedin.
agent_idstringfilterCampaign agent that wrote the message.
person_idstringfilterThe person this message is addressed to.
company_idstringfilterThe company the recipient works at.
content_idstringfilterThe content row this message's copy was generated from.
sequence_idstringfilterThe sequences row this message is one step of, when it belongs to a sequence.
campaign_idstringfilterThe 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_codestringfilterThe 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_atdatefilterWhen 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_atdatefilterThe 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.
qstringsearchFree-text search across subject, to.
sortstringsortOne of status, scheduled_for, sent_at; prefix with - to reverse.
limitnumberpageRows to return, 1–100. Defaults to 20.
cursorstringpagenext_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 person
data_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

ParameterTypeKindDescription
idstringpathThe 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 pit
data_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

FieldTypeRequiredDescription
subjectstringnoSubject line the recipient sees.
bodytextnoMessage body, already personalised for the recipient.
statusstringnoThe 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_idstringnoCampaign agent that wrote the message.
person_idstringnoThe person this message is addressed to.
channelstringnoDelivery channel this message goes through. One of email, linkedin.
content_typestringnoThe content piece's own type ("email" / "linkedin_message" / …), copied from the content row this message was generated from.
employee_idstringnoThe 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.
fromstringnoThe employee's display NAME — what the review card's From line renders, so the visible sender and the wire sender agree by construction.
tostringnoRecipient address (email) or profile (linkedin).
recipient_company_domainstringnoThe recipient's company domain, denormalised so the review card needs no join.
reasontextnoWhy this person, this company, this message — shown in the review card.
followupbooleannoOperator-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_idstringnoThe content row this message's copy was generated from.
step_numbernumbernoThis message's 1-based position in its sequence.
total_stepsnumbernoHow many steps the owning sequence has, so a card can read "2 of 4".
scheduled_fordatenoWhen the sequence releases this step.
company_idstringnoThe company the recipient works at.
declined_reasontextnoWhy the reviewer declined, written by the outbound-sync review pass.
review_contextobjectnoThe 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_summarytextnoWhat the recipient's company does, denormalised onto the draft for review.
  review_context.company_stagestringnoFunding/maturity stage of the recipient's company, as researched.
  review_context.company_categorystringnoThe recipient company's category or vertical.
  review_context.person_namestringnoThe recipient's name, denormalised so the review card needs no join.
  review_context.person_titlestringnoThe recipient's job title at that company.
  review_context.persona_reasontextnoWhy this ROLE is the right buyer for this product.
  review_context.content_anglestringnoThe one-line angle this message takes.
  review_context.message_summarytextnoA one-sentence summary of the body, for reviewing a batch without opening each.
  review_context.why_this_companytextnoThe evidence that this company fits the ICP, in the reviewer's words.
  review_context.why_this_persontextnoThe evidence that this person is the buyer at that company.
  review_context.why_this_messagetextnoWhy this angle for this reader, rather than the generic pitch.
  review_context.checksarraynoSaved 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_signalstringnoThe reviewer's verdict signal on this draft, fed back to the planner so a losing angle is not re-run.
reviewed_atdatenoWhen a review pass last looked at this draft.
review_notestextnoThe 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 linkedin
data_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

FieldTypeRequiredDescription
subjectstringnoSubject line the recipient sees.
bodytextnoMessage body, already personalised for the recipient.
statusstringnoThe 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_idstringnoCampaign agent that wrote the message.
person_idstringnoThe person this message is addressed to.
channelstringnoDelivery channel this message goes through. One of email, linkedin.
content_typestringnoThe content piece's own type ("email" / "linkedin_message" / …), copied from the content row this message was generated from.
employee_idstringnoThe 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.
fromstringnoThe employee's display NAME — what the review card's From line renders, so the visible sender and the wire sender agree by construction.
tostringnoRecipient address (email) or profile (linkedin).
recipient_company_domainstringnoThe recipient's company domain, denormalised so the review card needs no join.
reasontextnoWhy this person, this company, this message — shown in the review card.
followupbooleannoOperator-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_idstringnoThe content row this message's copy was generated from.
step_numbernumbernoThis message's 1-based position in its sequence.
total_stepsnumbernoHow many steps the owning sequence has, so a card can read "2 of 4".
scheduled_fordatenoWhen the sequence releases this step.
company_idstringnoThe company the recipient works at.
declined_reasontextnoWhy the reviewer declined, written by the outbound-sync review pass.
review_contextobjectnoThe 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_summarytextnoWhat the recipient's company does, denormalised onto the draft for review.
  review_context.company_stagestringnoFunding/maturity stage of the recipient's company, as researched.
  review_context.company_categorystringnoThe recipient company's category or vertical.
  review_context.person_namestringnoThe recipient's name, denormalised so the review card needs no join.
  review_context.person_titlestringnoThe recipient's job title at that company.
  review_context.persona_reasontextnoWhy this ROLE is the right buyer for this product.
  review_context.content_anglestringnoThe one-line angle this message takes.
  review_context.message_summarytextnoA one-sentence summary of the body, for reviewing a batch without opening each.
  review_context.why_this_companytextnoThe evidence that this company fits the ICP, in the reviewer's words.
  review_context.why_this_persontextnoThe evidence that this person is the buyer at that company.
  review_context.why_this_messagetextnoWhy this angle for this reader, rather than the generic pitch.
  review_context.checksarraynoSaved 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_signalstringnoThe reviewer's verdict signal on this draft, fed back to the planner so a losing angle is not re-run.
reviewed_atdatenoWhen a review pass last looked at this draft.
review_notestextnoThe 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 review
data_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

FieldTypeRequiredDescription
eventstringyesThe human-readable timeline entry.
contextobjectnoProvenance — 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.

FieldTypeDescription
objectstringAlways outbox.
idstringStable object id. Also accepted in place of slug on any path.
slugstringURL-safe name, unique within the collection.
created_atstringISO-8601 timestamp of the first write.
updated_atstringISO-8601 timestamp of the most recent write. The cursor sorts on this.
sent_atdateWhen 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).
sandboxobjectTest-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_atdateNEEDS-DESCRIPTION
  sandbox.sent_viastringNEEDS-DESCRIPTION
  sandbox.external_idstringNEEDS-DESCRIPTION
sent_viastringIntegration 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_atdateFirst open (pixel) or first click, whichever came first. Stamped once by the dash-links worker.
clicked_atdateFirst tracked-link click. Stamped once by the dash-links worker.
delivered_atdateThe 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_reasonstringTHE 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_detailtextThe 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).
providerstringThe 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_vnumberThe version of the ONE axes rule (axesFit, lead-fit.ts) that stamped fit at the write door. Server-stamped, never written by you.
fitobjectHow 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_atdateWhen the failure landed — the failed-count metric's window field.
copy_gapstringNamed 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_idstringThe 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_idstringThe campaign-agent run that produced this message — draft rows are reviewed a run at a time.
sequence_idstringThe sequences row this message is one step of, when it belongs to a sequence.
campaign_idstringThe 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_codestringThe 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.
linksarrayThe 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_idstringThe uploaded artifact rendered inline in this message, when it carries an image.
scoreobjectThe message's grade — { total, components }. The write door folds components by id and computes total (best-practices rules). Absent until graded.
  score.totalnumberSum of components[].points — computed by the write door, never written.
  score.componentsarrayThe 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.