Agent Runs
One batch of work by a campaign agent — a run is the unit drafts group by.
Base path /api/v1/campaign-agent-runs 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 agent runs
GET /api/v1/campaign-agent-runs
curl "https://moabcrm.com/api/v1/campaign-agent-runs" \
-H "Authorization: Bearer $DASH_API_KEY" \
-H "Project-ID: pr_zest"Show me the agent runs filtered by agent iddata_query {
"collection": "agent_runs"
}Returns a paginated list of campaign-agent-run objects, newest first.
{
"object": "list",
"data": [
{
"object": "campaign-agent-run",
"id": "obj_123",
"status": "status",
"run_type": "run type",
"summary": "summary",
"details": "details",
"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 |
|---|---|---|---|
agent_id | string | filter | The campaign agent that performed this run. |
status | string | filter | Where the run ended up. Free text on purpose — the values in the corpus are the run's own vocabulary (ready_for_review, …) rather than a platform ladder, and an enum here would invent one. |
run_type | string | filter | What kind of pass this was — the skill the run executed. |
product_id | string | filter | The product the run was working, copied from the agent. |
goal_id | string | filter | The goal the run was moving, copied from the agent. |
q | string | search | Free-text search across summary. |
sort | string | sort | One of created_at, started_at, completed_at, cost_usd; 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 campaign-agent-run
GET /api/v1/campaign-agent-runs/draft-001
curl "https://moabcrm.com/api/v1/campaign-agent-runs/draft-001" \
-H "Authorization: Bearer $DASH_API_KEY" \
-H "Project-ID: pr_zest"Open the campaign-agent-run {id}data_get {
"collection": "agent_runs",
"object_id": "draft-001"
}Returns the campaign-agent-run object.
{
"object": "campaign-agent-run",
"id": "obj_123",
"status": "status",
"run_type": "run type",
"summary": "summary",
"details": "details",
"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 campaign-agent-run's id or slug. |
Create a campaign-agent-run
POST /api/v1/campaign-agent-runs
curl -X POST "https://moabcrm.com/api/v1/campaign-agent-runs" \
-H "Authorization: Bearer $DASH_API_KEY" \
-H "Project-ID: pr_zest" \
-H "Content-Type: application/json" \
-d '{"status":"status","run_type":"run type","summary":"summary"}'Create a new campaign-agent-rundata_set {
"collection": "agent_runs",
"object_id": "draft-001",
"data": {
"status": "status",
"run_type": "run type",
"summary": "summary"
}
}Returns the campaign-agent-run object.
{
"object": "campaign-agent-run",
"id": "obj_123",
"status": "status",
"run_type": "run type",
"summary": "summary",
"details": "details",
"created_at": "2026-07-25T12:00:00.000Z",
"updated_at": "2026-07-25T12:00:00.000Z"
}Parameters
| Field | Type | Required | Description |
|---|---|---|---|
status | string | no | Where the run ended up. Free text on purpose — the values in the corpus are the run's own vocabulary (ready_for_review, …) rather than a platform ladder, and an enum here would invent one. |
run_type | string | no | What kind of pass this was — the skill the run executed. |
summary | string | no | One human sentence describing what the run did, e.g. 'Built list "Series A DevTools" — 47 leads.' Written by the run itself; the UI falls back to a count-derived sentence when absent. |
details | string | no | Optional second digest line, e.g. 'Drafted 12 cold emails via Instantly.' Also where the run names its lead sources (attempted, used, per-source counts, and the reason any returned zero). |
goal_delta | number | no | How far this run moved the linked goal. Accumulated onto the agent as goal_delta_total, which is the denominator of its cost_per_goal. |
duration_ms | number | no | Wall-clock length of the run, in milliseconds. |
started_at | date | no | When the run began. |
completed_at | date | no | When the run reached a terminal state. |
Update a campaign-agent-run
PATCH /api/v1/campaign-agent-runs/draft-001
curl -X PATCH "https://moabcrm.com/api/v1/campaign-agent-runs/draft-001" \
-H "Authorization: Bearer $DASH_API_KEY" \
-H "Project-ID: pr_zest" \
-H "Content-Type: application/json" \
-d '{"status":"status","run_type":"run type","summary":"summary"}'Update the campaign-agent-run {id}data_set {
"collection": "agent_runs",
"object_id": "draft-001",
"data": {
"status": "status",
"run_type": "run type",
"summary": "summary"
}
}Returns the campaign-agent-run object.
{
"object": "campaign-agent-run",
"id": "obj_123",
"status": "status",
"run_type": "run type",
"summary": "summary",
"details": "details",
"created_at": "2026-07-25T12:00:00.000Z",
"updated_at": "2026-07-25T12:00:00.000Z"
}Parameters
| Field | Type | Required | Description |
|---|---|---|---|
status | string | no | Where the run ended up. Free text on purpose — the values in the corpus are the run's own vocabulary (ready_for_review, …) rather than a platform ladder, and an enum here would invent one. |
run_type | string | no | What kind of pass this was — the skill the run executed. |
summary | string | no | One human sentence describing what the run did, e.g. 'Built list "Series A DevTools" — 47 leads.' Written by the run itself; the UI falls back to a count-derived sentence when absent. |
details | string | no | Optional second digest line, e.g. 'Drafted 12 cold emails via Instantly.' Also where the run names its lead sources (attempted, used, per-source counts, and the reason any returned zero). |
goal_delta | number | no | How far this run moved the linked goal. Accumulated onto the agent as goal_delta_total, which is the denominator of its cost_per_goal. |
duration_ms | number | no | Wall-clock length of the run, in milliseconds. |
started_at | date | no | When the run began. |
completed_at | date | no | When the run reached a terminal state. |
What comes back (read-only)
Every campaign-agent-run 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 campaign-agent-run. |
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. |
agent_id | string | The campaign agent that performed this run. |
product_id | string | The product the run was working, copied from the agent. |
goal_id | string | The goal the run was moving, copied from the agent. |
list_id | string | The list the run drew people from. |
content_id | string | The content piece the run drafted from. |
draft_batch_id | string | The batch id the run's drafts group under — drafts are reviewed and approved a batch at a time. |
companies_found | number | Companies this run created, counted by the write door and stamped at the run terminal (yield-and-cost plan §S3). Never model-written. |
leads_found | number | People this run created, counted by the write door and stamped at the run terminal (§S3). The agent-level leads_found still counts people-row provenance directly. Never model-written. |
drafts_created | number | Drafts this run minted, counted by the outbox write door and stamped at the run terminal (§S3). Never model-written. |
cost_usd | number | Finalized compute $ for this run, stamped server-side at the run terminal from the usage ledger. A skill can never know its own cost. |
provider_cost_usd | number | The provider $ share of cost_usd — what the email source / resolve doors metered this run (Prospeo, Enrow, verifiers, …), stamped flat by the same terminal hook so the agent view splits AI vs providers with one SUM. Absent when the run measured no provider spend. |
cost_per_draft | number | cost_usd ÷ this run's drafts_created, stamped by the same terminal hook. Absent when the run drafted nothing — a zero-denominator ratio is not a measurement. THE per-run economics line (verified drafts per dollar). |
lead_sources | string | One line naming where this run's leads came from — copied VERBATIM from email_source's measured sources_attempted record (every rung, ran-with-counts or skipped-with-why) and stamped at the run terminal (§S3). Read back into the next run's context as sourcing history — a measurement now, never a model transcription. |
mle | object | The run's MLE plan + measured mix (F2, MLE v1.2): { version, strategy, sources[], resolve_rungs[], limit, query_axes[], resolve_mix{rung: count} }. Stamped at the run terminal from the lead_source door's set-once plan record — model writes are refused (agent_run_stats_server_stamped). mle-bench report groups runs by strategy × version off this field. |
verified_emails | string | One line on email verification economics this run (resolved/attempts, measured cost from the tools' own cost objects), stamped at the run terminal (§S3). Never model-written. |
sends | number | Provider-confirmed sends this run — COUNT of the run's outbox rows in the sent band, stamped at the run terminal (zero included; W8b). Never model-written (agent_run_stats_server_stamped). |
send_refusals | object | Why drafted rows did not send — a ROLLUP of this run's held outbox rows by their status_reason (reason -> count; §2 mirror of the rows, never a second truth). Stamped at the run terminal; absent when nothing was held. Never model-written. |
sources_exhausted | boolean | POSITIVE mined-out evidence from this run's measured ledger (sourcing ran, ladder ran out, zero new candidates; a work-budget stop never qualifies). Stamped at the run terminal; the list_mined_out blocker counts consecutive runs off this field. Never model-written. |
supply_unsendable | boolean | The OTHER measured exhaustion (sendability-loop plan W4): sourcing found people but resolution was attempted and NONE resolved to a sendable address. Counts toward the list_mined_out streak like sources_exhausted. Stamped at the run terminal; never model-written. |
Errors
Failures use { error: { type, code, message, param } }. The full code table is generated at Error Codes.