Documentation
API Reference
Documentation
API Reference
Book a meeting
Linkedin
Github
  1. Api's
  • Introduction
  • Get started
    • Quickstart
    • Authentication
  • Core concepts
    • Agents
    • Phone numbers
    • Calls
    • Webhooks
  • Webhooks
    • Overview
    • Assistant request
    • Tool calls
    • Status update
    • End of call report
    • Security
  • Guides
    • Campaigns
    • xAI Realtime Integration
    • Voice selection psychology
    • Analysis templates
    • BYOK Setup
    • Call analysis
    • Call Transfers
    • Custom Tools
    • Sip Trunks
    • Tool templates
    • Voicemail detection
    • Autonomous silence detection
    • Billing
    • Error codes
    • Rate limits
    • Troubleshooting
  • Api's
    • Campaigns
    • Agents
    • Voices
    • BYOK
    • Analysis templates
    • Tool templates
    • Organization
    • Phone numbers
    • Sip trunks
    • Calls
    • Call control
    • Usage
    • Domains
Documentation
API Reference
Documentation
API Reference
Book a meeting
Linkedin
Github
  1. Api's

Campaigns

🧪
Outbound Campaigns is currently in Beta. The API and functionality may change.
Manage automated outbound calling campaigns with lead lists and scheduling.

Endpoints#

MethodEndpointDescription
GET/campaignsList all campaigns
POST/campaignsCreate a campaign
GET/campaigns/{id}Get a campaign
PATCH/campaigns/{id}Update a campaign
DELETE/campaigns/{id}Delete a campaign
GET/campaigns/{id}/leadsList campaign leads
POST/campaigns/{id}/leadsAdd a lead
DELETE/campaigns/{id}/leads/{leadId}Remove a lead

List All Campaigns#

Retrieve all outbound campaigns in your organization.
GET /campaigns

Request#

Response#

{
  "campaigns": [
    {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "name": "Q1 Sales Outreach",
      "status": "scheduled",
      "agent_id": "17a0cb75-fa09-4bdd-9a44-92a70d829c88",
      "system_message_template": "You are calling {{name}} from {{company}}. Their role is {{role}}.",
      "schedule_start_time": "09:00:00",
      "schedule_end_time": "17:00:00",
      "timezone": "Europe/Amsterdam",
      "total_leads": 150,
      "completed_leads": 45,
      "created_at": "2026-01-07T10:00:00.000Z",
      "updated_at": "2026-01-07T14:30:00.000Z"
    }
  ]
}

Create a Campaign#

Create a new outbound calling campaign.
POST /campaigns

Request Body#

FieldTypeRequiredDescription
namestringYesCampaign display name
agent_idUUIDYesAgent to use for calls
system_message_templatestringNoTemplate with {{variable}} placeholders
schedule_start_timestringNoDaily start time (HH:MM:SS), default: 09:00:00
schedule_end_timestringNoDaily end time (HH:MM:SS), default: 17:00:00
timezonestringNoIANA timezone, default: Europe/Amsterdam
statusstringNodraft, scheduled, paused, completed

Example Request#

Response (201 Created)#

{
  "campaign": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Q1 Sales Outreach",
    "status": "draft",
    ...
  }
}

Get a Campaign#

Retrieve a specific campaign by ID.
GET /campaigns/{id}

Parameters#

NameInTypeDescription
idpathUUIDCampaign UUID

Request#

Response#

{
  "campaign": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "name": "Q1 Sales Outreach",
    "status": "scheduled",
    "agent_id": "17a0cb75-fa09-4bdd-9a44-92a70d829c88",
    "system_message_template": "You are calling {{name}} from {{company}}.",
    "schedule_start_time": "09:00:00",
    "schedule_end_time": "17:00:00",
    "timezone": "Europe/Amsterdam",
    "total_leads": 150,
    "completed_leads": 45,
    "current_call_id": null,
    "last_lead_processed_at": "2026-01-07T14:25:00.000Z",
    "created_at": "2026-01-07T10:00:00.000Z",
    "updated_at": "2026-01-07T14:30:00.000Z"
  }
}

Update a Campaign#

Update campaign settings or status.
PATCH /campaigns/{id}

Parameters#

NameInTypeDescription
idpathUUIDCampaign UUID

Request Body#

All fields are optional. Only include fields you want to update.
Set status to scheduled to start calling leads. Set to paused to stop.

Example Request#

Response#

{
  "campaign": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "status": "scheduled",
    ...
  }
}

Delete a Campaign#

Delete a campaign and all its leads.
DELETE /campaigns/{id}
This action is irreversible. All leads and call history associated with the campaign will be deleted.

Parameters#

NameInTypeDescription
idpathUUIDCampaign UUID

Request#

Response#

{
  "success": true
}

List Campaign Leads#

Retrieve all leads in a campaign.
GET /campaigns/{id}/leads

Parameters#

NameInTypeDescription
idpathUUIDCampaign UUID

Request#

Response#

{
  "leads": [
    {
      "id": "lead-uuid-1",
      "phone_number": "+31612345678",
      "status": "completed",
      "variables": {
        "name": "Jan de Vries",
        "company": "TechCorp",
        "role": "CTO"
      },
      "call_id": "call-uuid-123",
      "attempts": 1,
      "last_attempt_at": "2026-01-07T10:15:00.000Z",
      "created_at": "2026-01-07T10:00:00.000Z"
    },
    {
      "id": "lead-uuid-2",
      "phone_number": "+31687654321",
      "status": "pending",
      "variables": {
        "name": "Maria Jansen",
        "company": "DataFlow",
        "role": "CEO"
      },
      "call_id": null,
      "attempts": 0,
      "last_attempt_at": null,
      "created_at": "2026-01-07T10:00:00.000Z"
    }
  ]
}

Lead Status Values#

StatusDescription
pendingLead has not been called yet
callingCall is currently in progress
completedCall completed successfully
failedCall failed (will not be retried)
no_answerNo answer after maximum attempts

Add a Lead#

Add a new lead to a campaign.
POST /campaigns/{id}/leads

Parameters#

NameInTypeDescription
idpathUUIDCampaign UUID

Request Body#

FieldTypeRequiredDescription
phone_numberstringYesPhone number in E.164 format
variablesobjectNoKey-value pairs for template interpolation

Example Request#

Response (201 Created)#

{
  "lead": {
    "id": "lead-uuid-new",
    "phone_number": "+31612345678",
    "status": "pending",
    "variables": {
      "name": "Jan de Vries",
      "company": "TechCorp",
      "role": "CTO",
      "notes": "Interested in enterprise plan"
    },
    "attempts": 0,
    "created_at": "2026-01-07T15:00:00.000Z"
  }
}

Remove a Lead#

Remove a lead from a campaign.
DELETE /campaigns/{id}/leads/{leadId}

Parameters#

NameInTypeDescription
idpathUUIDCampaign UUID
leadIdpathUUIDLead UUID

Request#

Response#

{
  "success": true
}

Variable Interpolation#

The system_message_template supports variable interpolation using {{variable}} syntax. Variables are matched against the variables object of each lead.

Example#

Campaign Template:
You are calling {{name}} from {{company}}. 
Their role is {{role}}. 
Additional context: {{notes}}
Lead Variables:
{
  "name": "Jan de Vries",
  "company": "TechCorp",
  "role": "CTO",
  "notes": "Interested in enterprise plan"
}
Result (added to agent's system messages):
You are calling Jan de Vries from TechCorp. 
Their role is CTO. 
Additional context: Interested in enterprise plan
Variables that are not found in the lead's variables object will remain as {{variable}} in the final message.

Related#

Agents API - Create agents for campaigns
Calls API - View call details and transcripts
Campaigns Guide - Step-by-step setup guide
Modified at 2026-01-30 12:21:19
Previous
Troubleshooting
Next
Agents
Built with