zoxaAI
Homepage
API ReferenceCampaigns

List campaigns

GET /api/v1/campaign — a paginated page of your organization's campaigns with per-campaign outcome stats.

GET /api/v1/campaign

Return one page of your organization's campaigns, newest-first. By default only live (non-archived) campaigns are returned. Each item carries the full campaign response plus per-campaign outcome mini-stats for a list table.

Paginated envelope

This endpoint returns a paginated envelope { items, total, page, limit } — read the campaign array from items.

Query parameters

ParameterTypeDefaultNotes
pageint (≥ 1)1Page number.
limitint (1..100)25Campaigns per page.
statestring—Filter to a single lifecycle state: created, syncing, running, paused, completed, failed. An unknown value is a 422.
archivedboolfalsefalse lists live campaigns only; true lists only archived campaigns.

total counts all campaigns matching the same filters (before pagination), so you can render page controls.

Response

{
  "items": [
    {
      "id":   7,
      "name": "Q3 outreach",
      "state": "running",
      "agent_id":      42,
      "agent_name":    "Sales bot",
      "source_type":   "csv",
      "source_id":     "campaigns/1/abc123_contacts.csv",
      "telephony_configuration_id":   3,
      "telephony_configuration_name": "Twilio · main",
      "total_rows":     500,
      "processed_rows": 120,
      "failed_rows":     25,
      "max_concurrency": 5,
      "retry_config":      { /* ... */ },
      "schedule_config":   { /* ... */ },
      "circuit_breaker":   { /* ... */ },
      "executed_count":      120,
      "total_queued_count":  500,
      "connected_count":      88,
      "retrying_count":        6,
      "failed_contact_count":  20,
      "in_flight_count":        3,
      "archived_at":  null,
      "logs":          [ /* structured event entries */ ],
      "created_at":   "2026-07-16T10:00:00Z",
      "started_at":   "2026-07-16T10:05:00Z",
      "completed_at": null
    }
  ],
  "total": 42,
  "page":  1,
  "limit": 25
}
FieldNotes
statecreated, syncing, running, paused, completed, failed — not status.
agent_id / agent_nameThe campaign's target agent (internal integer id and display name).
source_typeAlways "csv" (the only supported source).
telephony_configuration_idTelephony config the campaign dials from. The from-number pool is keyed per (org, tcid).
total_rows / processed_rows / failed_rowsCSV-sync counters. total_rows is null until the first sync completes.
executed_count / total_queued_countQueued-runs registry counters.
connected_countContact-level count: contacts reached at least once (completed or voicemail).
retrying_countContacts with a future retry pending.
failed_contact_countContacts that finished without ever connecting (a failed/busy/no-answer/canceled outcome, or a dispatch failure).
in_flight_countContacts with a call in flight (dispatched, awaiting an outcome).
archived_atnull for live campaigns; an ISO timestamp once archived.
logsAppend-only structured event log. See the overview.

Mini-stats are contact-level

connected_count, retrying_count, failed_contact_count, and in_flight_count count contacts (one root + retries chain = one contact), not attempts — a contact retried three times counts once. These four fields are populated only on this list endpoint; the single-campaign endpoints return them as 0.

Examples

# First page of live campaigns
curl "https://dashboard.zoxa.ai/api/v1/campaign?page=1&limit=25" \
  -H "X-API-Key: zsk_..."

# Only running campaigns
curl "https://dashboard.zoxa.ai/api/v1/campaign?state=running" \
  -H "X-API-Key: zsk_..."

# Archived campaigns
curl "https://dashboard.zoxa.ai/api/v1/campaign?archived=true" \
  -H "X-API-Key: zsk_..."

Errors

StatusdetailWhen
422arraystate is not a valid lifecycle state, or limit > 100.

On this page