Moab logoMoab
Get started
Moab Docs

Agents

The actors: each campaign agent is one ICP cell × content × provider, and whether it is on.

Base path /api/v1/campaign-agents on https://moabcrm.com. Authenticate with Authorization: Bearer $DASH_API_KEY and name the project with the Project-ID header. Writes are validated in declared mode; an operation this resource does not declare answers 405 operation_not_supported.

List agents

GET /api/v1/campaign-agents

curl "https://moabcrm.com/api/v1/campaign-agents?status=live" \
  -H "Authorization: Bearer $DASH_API_KEY" \
  -H "Project-ID: pr_zest"
Show me the agents that are sending today
data_query {
  "collection": "agents",
  "where": {
    "status": "live"
  }
}

Returns a paginated list of campaign-agent objects, newest first.

{
  "object": "list",
  "data": [
    {
      "object": "campaign-agent",
      "id": "obj_123",
      "name": "Cybersec CTO/VPE (51-200) × Resend",
      "status": "live",
      "kind": "outbound",
      "reactivation_after_days": 1,
      "note": "25 people found; wrote 20 emails from the golden piece.",
      "icp_axes": {
        "industry": "cybersecurity",
        "role": "CTO",
        "headcount": "51-200"
      },
      "program": "program",
      "product_id": "$PRODUCT_ID",
      "goal_id": "$GOAL_ID",
      "content_id": "$CONTENT_ID",
      "list_ids": [],
      "parent_id": "agent-ionwarp-cybersec-vpeng",
      "axis": "role",
      "born_by": "planner",
      "tags": [],
      "provider": "instantly",
      "channel": "email",
      "employee_id": "$EMPLOYEE_ID",
      "outreach": {
        "messaging": "messaging",
        "follow_up_bodies": [],
        "linkedin_fallback_message": "linkedin fallback message"
      },
      "created_at": "2026-07-25T12:00:00.000Z",
      "updated_at": "2026-07-25T12:00:00.000Z"
    }
  ],
  "has_more": false,
  "next_cursor": null
}

Parameters

ParameterTypeKindDescription
statusstringfilterlive | paused | archived. archived is the one terminal. A paused or archived agent carries a coded status_reason. sandbox is a PROJECT run mode, never an agent state. One of live, paused, archived.
channelstringfilterThe channel of provider, STAMPED by the server from the provider def (never caller-written — agent_channel_server_stamped). Kept on the row so every reader that keys on the wire (actions, filters, the recipe check) reads one stamped fact. One of email, linkedin.
providerstringfilterThe ONE provider this agent sends through — resend | instantly | lemlist | heyreach — required at birth (agent_mint_incomplete: provider), checked against the project's connected set (agent_provider_not_connected). Every draft inherits it at mint and the road never re-picks; a provider test is a twin agent (axis: provider). Its channel is derived from the provider's def and stamped below.
product_idstringfilterThe product this agent sells.
goal_idstringfilterThe goal its sends count toward.
content_idstringfilterThe ONE content piece this agent sends. A content experiment is a clone with a different piece (axis: content), never a second piece on the same row.
parent_idstringfilterThe agent this one was cloned from (server-stamped at birth). An agent with a parent and fewer than 30 sends is an experiment, judged by the planner run at 30 sent against the parent.
born_bystringfilteroperator (a strategy or a hand-made agent) · planner (a Winner's next-door cell) · verdict. One of operator, planner, verdict.
qstringsearchFree-text search across name.
sortstringsortOne of created_at; prefix with - to reverse.
limitnumberpageRows to return, 1–100. Defaults to 20.
cursorstringpagenext_cursor from the previous page.

Retrieve a campaign-agent

GET /api/v1/campaign-agents/draft-001

curl "https://moabcrm.com/api/v1/campaign-agents/draft-001" \
  -H "Authorization: Bearer $DASH_API_KEY" \
  -H "Project-ID: pr_zest"
Open the cybersecurity CTO agent
data_get {
  "collection": "agents",
  "object_id": "draft-001"
}

Returns the campaign-agent object.

{
  "object": "campaign-agent",
  "id": "obj_123",
  "name": "Cybersec CTO/VPE (51-200) × Resend",
  "status": "live",
  "kind": "outbound",
  "reactivation_after_days": 1,
  "note": "25 people found; wrote 20 emails from the golden piece.",
  "icp_axes": {
    "industry": "cybersecurity",
    "role": "CTO",
    "headcount": "51-200"
  },
  "program": "program",
  "product_id": "$PRODUCT_ID",
  "goal_id": "$GOAL_ID",
  "content_id": "$CONTENT_ID",
  "list_ids": [],
  "parent_id": "agent-ionwarp-cybersec-vpeng",
  "axis": "role",
  "born_by": "planner",
  "tags": [],
  "provider": "instantly",
  "channel": "email",
  "employee_id": "$EMPLOYEE_ID",
  "outreach": {
    "messaging": "messaging",
    "follow_up_bodies": [],
    "linkedin_fallback_message": "linkedin fallback message"
  },
  "created_at": "2026-07-25T12:00:00.000Z",
  "updated_at": "2026-07-25T12:00:00.000Z"
}

Parameters

ParameterTypeKindDescription
idstringpathThe campaign-agent's id or slug.

Create a campaign-agent

POST /api/v1/campaign-agents

curl -X POST "https://moabcrm.com/api/v1/campaign-agents" \
  -H "Authorization: Bearer $DASH_API_KEY" \
  -H "Project-ID: pr_zest" \
  -H "Content-Type: application/json" \
  -d '{"content_id":"$CONTENT_ID","product_id":"$PRODUCT_ID","goal_id":"$GOAL_ID","employee_id":"$EMPLOYEE_ID","provider":"instantly","icp_axes":{"industry":"cybersecurity","role":"CTO","headcount":"51-200"},"status":"paused"}'
Add an agent for CTOs at cybersecurity companies with 51-200 people
data_set {
  "collection": "agents",
  "object_id": "draft-001",
  "data": {
    "content_id": "$CONTENT_ID",
    "product_id": "$PRODUCT_ID",
    "goal_id": "$GOAL_ID",
    "employee_id": "$EMPLOYEE_ID",
    "provider": "instantly",
    "icp_axes": {
      "industry": "cybersecurity",
      "role": "CTO",
      "headcount": "51-200"
    },
    "status": "paused"
  }
}

Returns the campaign-agent object.

{
  "object": "campaign-agent",
  "id": "obj_123",
  "name": "Cybersec CTO/VPE (51-200) × Resend",
  "status": "live",
  "kind": "outbound",
  "reactivation_after_days": 1,
  "note": "25 people found; wrote 20 emails from the golden piece.",
  "icp_axes": {
    "industry": "cybersecurity",
    "role": "CTO",
    "headcount": "51-200"
  },
  "program": "program",
  "product_id": "$PRODUCT_ID",
  "goal_id": "$GOAL_ID",
  "content_id": "$CONTENT_ID",
  "list_ids": [],
  "parent_id": "agent-ionwarp-cybersec-vpeng",
  "axis": "role",
  "born_by": "planner",
  "tags": [],
  "provider": "instantly",
  "channel": "email",
  "employee_id": "$EMPLOYEE_ID",
  "outreach": {
    "messaging": "messaging",
    "follow_up_bodies": [],
    "linkedin_fallback_message": "linkedin fallback message"
  },
  "created_at": "2026-07-25T12:00:00.000Z",
  "updated_at": "2026-07-25T12:00:00.000Z"
}

Parameters

FieldTypeRequiredDescription
namestringnoComputed at the write door from icp_axes + provider — \<Industry> \<Role> (\<size>) × \<Provider> — so the row, the day page, utm_campaign and moab_agent_name cannot disagree, and a name can never lie about the wire. A caller-written name is replaced whenever the axes carry an industry or a role.
statusstringnolive | paused | archived. archived is the one terminal. A paused or archived agent carries a coded status_reason. sandbox is a PROJECT run mode, never an agent state. One of live, paused, archived.
kindstringnooutbound (default — sources new people for its ICP) or reactivation (drafts follow-ups to people already contacted and quiet ≥ reactivation_after_days). One of outbound, reactivation.
reactivation_after_daysnumbernoQuiet window (days) before a contacted person is a reactivation candidate. Default 14.
notetextnoONE sentence from the last run — the only prose on the record. Written by prospect-agent at the end of a run, or by the auto-pause writer with the detail behind a coded reason.
icp_axesobjectnoStructured ICP axes — { role, roles[], industry, industries[], location, headcount, headcounts[], keywords[], companies[], company, exclude[] }. role is the PRIMARY target TITLE and roles the full title SET; industry the primary canonical vertical and industries the full set; headcount a size BAND ("51-200") and headcounts the band set. Omit an axis the ICP genuinely lacks — a rung that needs it declines, which is honest. Written once at birth (through the plan's people check) or by the operator; every lead provider translates from it.
  icp_axes.rolestringnoThe PRIMARY target title, verbatim from the ICP.
  icp_axes.rolesarraynoThe FULL title set when the ICP names several buyers — primary included.
  icp_axes.industrystringnoThe PRIMARY canonical industry word — software | fintech | healthtech | legaltech | proptech | climatetech | cybersecurity | agencies | dentistry | manufacturing | insurance | logistics | robotics. The write door folds aliases onto this set.
  icp_axes.industriesarraynoThe FULL industry set for a multi-vertical ICP, primary included.
  icp_axes.locationstringnoGeography, when the ICP names one.
  icp_axes.headcountstringnoThe PRIMARY company-size band, e.g. "11-50" or "201-500".
  icp_axes.headcountsarraynoThe FULL size-band set when the ICP spans several bands, primary included.
  icp_axes.keywordsarraynoNamed cohorts the company belongs to (YC). A description of what the company does belongs in company, never here.
  icp_axes.companiesarraynoNamed companies/domains, when the ICP already knows its targets.
  icp_axes.companystringnoONE sentence saying what the target company DOES ("software companies building payments or lending products"). Every lead source's query is compiled from it — it decides WHERE this agent looks; the prospect judge decides relevance against the PRODUCT, and industry is only the learning label.
programstringnoAccelerator/program slug (yc, hf0, a16z-speedrun) when the ICP is a cohort — derives the /for/\<program> landing root for own-brand links.
product_idstringnoThe product this agent sells.
goal_idstringnoThe goal its sends count toward.
content_idstringnoThe ONE content piece this agent sends. A content experiment is a clone with a different piece (axis: content), never a second piece on the same row.
list_idsarraynoSeed lists the agent reads before it sources.
tagsarraynoStored tags — today one type: \{type: "strategy", name, sentence?, opened_at?\}, the operator's standing idea in their own words. A strategy is the set of agents carrying the same tag name, open while any of them is live; there is no strategies collection. Winner / Experiment / Explore live in the day's plan row and Clone / Scaled are derived — never stored here.
providerstringnoThe ONE provider this agent sends through — resend | instantly | lemlist | heyreach — required at birth (agent_mint_incomplete: provider), checked against the project's connected set (agent_provider_not_connected). Every draft inherits it at mint and the road never re-picks; a provider test is a twin agent (axis: provider). Its channel is derived from the provider's def and stamped below.
employee_idstringnoThe sending persona (employees record id) — the from-identity and voice.
outreachobjectnoThe message plan — { messaging, follow_up_bodies[], linkedin_fallback_message }. The body itself is the content piece; variant_body is deleted (a variant is another agent with a different content_id).
  outreach.messagingstringnopersonalized (per-lead drafts) or templated (one body, merge fields).
  outreach.follow_up_bodiesarraynoLiteral follow-up copy for campaign providers, in order.
  outreach.linkedin_fallback_messagestringnoThe short message a LinkedIn campaign sends when the connection note is not accepted.

Update a campaign-agent

PATCH /api/v1/campaign-agents/draft-001

curl -X PATCH "https://moabcrm.com/api/v1/campaign-agents/draft-001" \
  -H "Authorization: Bearer $DASH_API_KEY" \
  -H "Project-ID: pr_zest" \
  -H "Content-Type: application/json" \
  -d '{"status":"live","kind":"outbound"}'
Pause the cybersecurity CTO agent
data_set {
  "collection": "agents",
  "object_id": "draft-001",
  "data": {
    "status": "live",
    "kind": "outbound"
  }
}

Returns the campaign-agent object.

{
  "object": "campaign-agent",
  "id": "obj_123",
  "name": "Cybersec CTO/VPE (51-200) × Resend",
  "status": "live",
  "kind": "outbound",
  "reactivation_after_days": 1,
  "note": "25 people found; wrote 20 emails from the golden piece.",
  "icp_axes": {
    "industry": "cybersecurity",
    "role": "CTO",
    "headcount": "51-200"
  },
  "program": "program",
  "product_id": "$PRODUCT_ID",
  "goal_id": "$GOAL_ID",
  "content_id": "$CONTENT_ID",
  "list_ids": [],
  "parent_id": "agent-ionwarp-cybersec-vpeng",
  "axis": "role",
  "born_by": "planner",
  "tags": [],
  "provider": "instantly",
  "channel": "email",
  "employee_id": "$EMPLOYEE_ID",
  "outreach": {
    "messaging": "messaging",
    "follow_up_bodies": [],
    "linkedin_fallback_message": "linkedin fallback message"
  },
  "created_at": "2026-07-25T12:00:00.000Z",
  "updated_at": "2026-07-25T12:00:00.000Z"
}

Parameters

FieldTypeRequiredDescription
namestringnoComputed at the write door from icp_axes + provider — \<Industry> \<Role> (\<size>) × \<Provider> — so the row, the day page, utm_campaign and moab_agent_name cannot disagree, and a name can never lie about the wire. A caller-written name is replaced whenever the axes carry an industry or a role.
statusstringnolive | paused | archived. archived is the one terminal. A paused or archived agent carries a coded status_reason. sandbox is a PROJECT run mode, never an agent state. One of live, paused, archived.
kindstringnooutbound (default — sources new people for its ICP) or reactivation (drafts follow-ups to people already contacted and quiet ≥ reactivation_after_days). One of outbound, reactivation.
reactivation_after_daysnumbernoQuiet window (days) before a contacted person is a reactivation candidate. Default 14.
notetextnoONE sentence from the last run — the only prose on the record. Written by prospect-agent at the end of a run, or by the auto-pause writer with the detail behind a coded reason.
icp_axesobjectnoStructured ICP axes — { role, roles[], industry, industries[], location, headcount, headcounts[], keywords[], companies[], company, exclude[] }. role is the PRIMARY target TITLE and roles the full title SET; industry the primary canonical vertical and industries the full set; headcount a size BAND ("51-200") and headcounts the band set. Omit an axis the ICP genuinely lacks — a rung that needs it declines, which is honest. Written once at birth (through the plan's people check) or by the operator; every lead provider translates from it.
  icp_axes.rolestringnoThe PRIMARY target title, verbatim from the ICP.
  icp_axes.rolesarraynoThe FULL title set when the ICP names several buyers — primary included.
  icp_axes.industrystringnoThe PRIMARY canonical industry word — software | fintech | healthtech | legaltech | proptech | climatetech | cybersecurity | agencies | dentistry | manufacturing | insurance | logistics | robotics. The write door folds aliases onto this set.
  icp_axes.industriesarraynoThe FULL industry set for a multi-vertical ICP, primary included.
  icp_axes.locationstringnoGeography, when the ICP names one.
  icp_axes.headcountstringnoThe PRIMARY company-size band, e.g. "11-50" or "201-500".
  icp_axes.headcountsarraynoThe FULL size-band set when the ICP spans several bands, primary included.
  icp_axes.keywordsarraynoNamed cohorts the company belongs to (YC). A description of what the company does belongs in company, never here.
  icp_axes.companiesarraynoNamed companies/domains, when the ICP already knows its targets.
  icp_axes.companystringnoONE sentence saying what the target company DOES ("software companies building payments or lending products"). Every lead source's query is compiled from it — it decides WHERE this agent looks; the prospect judge decides relevance against the PRODUCT, and industry is only the learning label.
programstringnoAccelerator/program slug (yc, hf0, a16z-speedrun) when the ICP is a cohort — derives the /for/\<program> landing root for own-brand links.
product_idstringnoThe product this agent sells.
goal_idstringnoThe goal its sends count toward.
content_idstringnoThe ONE content piece this agent sends. A content experiment is a clone with a different piece (axis: content), never a second piece on the same row.
list_idsarraynoSeed lists the agent reads before it sources.
tagsarraynoStored tags — today one type: \{type: "strategy", name, sentence?, opened_at?\}, the operator's standing idea in their own words. A strategy is the set of agents carrying the same tag name, open while any of them is live; there is no strategies collection. Winner / Experiment / Explore live in the day's plan row and Clone / Scaled are derived — never stored here.
providerstringnoThe ONE provider this agent sends through — resend | instantly | lemlist | heyreach — required at birth (agent_mint_incomplete: provider), checked against the project's connected set (agent_provider_not_connected). Every draft inherits it at mint and the road never re-picks; a provider test is a twin agent (axis: provider). Its channel is derived from the provider's def and stamped below.
employee_idstringnoThe sending persona (employees record id) — the from-identity and voice.
outreachobjectnoThe message plan — { messaging, follow_up_bodies[], linkedin_fallback_message }. The body itself is the content piece; variant_body is deleted (a variant is another agent with a different content_id).
  outreach.messagingstringnopersonalized (per-lead drafts) or templated (one body, merge fields).
  outreach.follow_up_bodiesarraynoLiteral follow-up copy for campaign providers, in order.
  outreach.linkedin_fallback_messagestringnoThe short message a LinkedIn campaign sends when the connection note is not accepted.

Append an event to a campaign-agent

POST /api/v1/campaign-agents/{id}/events

curl -X POST "https://moabcrm.com/api/v1/campaign-agents/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 the campaign-agent {id}
data_event {
  "collection": "agents",
  "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 campaign-agent carries the envelope below. The fields under it are computed or stamped by the platform — they are returned, never sent.

FieldTypeDescription
objectstringAlways campaign-agent.
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.
status_reasonstringWhy the agent is not live — one code, rendered in plain words everywhere: no_new_leads · below_fleet · no_inventory · channel_down · experiment_lost · replaced · by_you (low_signal is the pre-R4 word on rows archived before the sweep measured anything). Three writers only: the operator press (by_you), the auto-pause writer (channel_down / no_new_leads), and the planner run — its verdict (experiment_lost) and its measured sweep (below_fleet / no_inventory, with the numbers in status_reason_detail). The sentence behind the code goes in note.
status_reason_detailobjectWhat plan_execute MEASURED when it stamped the reason — low_signal and below_fleet: delivered · rate · fleet_rate · metric (open_rate until the fleet's click floor) · through, the ONE signal (agents/moab/lib/agent-signal.ts); no_inventory: plans · leads. Server-written with the reason, never by the model; the door refuses a low_signal / below_fleet archive whose signal is under the floor (plan_archive_without_evidence). Rendered as low signal · 12% opened vs 19% fleet at 45 delivered on every surface.
restored_ondateWhen the reconcile (reconcile.mjs verdicts --restore-on-signal) or a plan restored an archived agent on its signal. The door refuses a fresh low_signal / below_fleet archive until a new mature week exists after it. Server-written.
source_queriesobjectThe query each lead source is asked, compiled ONCE from icp_axes by the server (agents/moab/server/source-query.ts) — keyed by rung (prospeo, lemlist_db, yc), each \{query, spec_v, icp_hash, compiled_at\}. Recompiled only when the ICP spec or the provider's source spec changes. Server-written; never write it yourself.
parent_idstringThe agent this one was cloned from (server-stamped at birth). An agent with a parent and fewer than 30 sends is an experiment, judged by the planner run at 30 sent against the parent.
axisstringWhat the clone changed — industry | headcount | role | provider | content. A provider clone is the provider test (the same ICP and recipe on another wire).
born_bystringoperator (a strategy or a hand-made agent) · planner (a Winner's next-door cell) · verdict.
verdictobjectThe planner run's judgment of this experiment: {at, result: won | lost | extended, rate, control_rate, sent, gate, control_id}. lost rides with status: archived, status_reason: experiment_lost; extended means one more batch of 30, then the same rule decides.
channelstringThe channel of provider, STAMPED by the server from the provider def (never caller-written — agent_channel_server_stamped). Kept on the row so every reader that keys on the wire (actions, filters, the recipe check) reads one stamped fact.
provider_campaign_idsobjectProvider campaign ids this agent's rows are pinned to, per provider (campaign-sync stamps).
provider_campaign_urlsobjectDeep links to those campaigns, per provider.
last_runstringColumn anchor — latest run evidence and task link. Never written.
inventorystringColumn anchor — deliverable leads · ready drafts · today's work. Never written.
resultsstringColumn anchor — mature deliveries since the first honest day, human opens and clicks. Never written.
coststringColumn anchor — our cost per human click; header-sortable. Never written.

Errors

Failures use { error: { type, code, message, param } }. The full code table is generated at Error Codes.