Documentation Index
Fetch the complete documentation index at: https://docs.getsmartalex.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The Campaigns API allows you to create, populate, and start outbound calling campaigns programmatically.
List Campaigns
Get all campaigns in your account.
curl -X GET "https://api.getsmartalex.com/v1/campaigns" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
{
"data": [
{
"id": "campaign_abc123",
"name": "January Outreach",
"agent_id": "agent_def456",
"status": "active",
"objective": "Schedule appointments",
"created_at": "2026-01-15T10:30:00Z"
}
]
}
Get Campaign
Retrieve a single campaign.
curl -X GET "https://api.getsmartalex.com/v1/campaigns/campaign_abc123" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
{
"data": {
"id": "campaign_abc123",
"name": "January Outreach",
"description": "Q1 lead generation campaign",
"objective": "Schedule appointments with qualified leads",
"agent_id": "agent_def456",
"phone_number_id": "phone_xyz789",
"campaign_mode": "outbound",
"status": "active",
"timezone": "America/New_York",
"business_hours": {
"monday": { "enabled": true, "start": "09:00", "end": "17:00" },
"tuesday": { "enabled": true, "start": "09:00", "end": "17:00" },
"wednesday": { "enabled": true, "start": "09:00", "end": "17:00" },
"thursday": { "enabled": true, "start": "09:00", "end": "17:00" },
"friday": { "enabled": true, "start": "09:00", "end": "17:00" },
"saturday": { "enabled": false },
"sunday": { "enabled": false }
},
"created_at": "2026-01-15T10:30:00Z",
"started_at": "2026-01-15T11:00:00Z"
}
}
Create Campaign
Create a new outbound calling campaign.
curl -X POST "https://api.getsmartalex.com/v1/campaigns" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "February Outreach",
"description": "Follow-up campaign",
"objective": "Confirm appointments for next week",
"agent_id": "agent_def456",
"phone_number_id": "phone_xyz789",
"timezone": "America/New_York",
"business_hours": {
"monday": { "enabled": true, "start": "10:00", "end": "16:00" },
"tuesday": { "enabled": true, "start": "10:00", "end": "16:00" },
"wednesday": { "enabled": true, "start": "10:00", "end": "16:00" },
"thursday": { "enabled": true, "start": "10:00", "end": "16:00" },
"friday": { "enabled": true, "start": "10:00", "end": "16:00" }
}
}'
Parameters
| Parameter | Type | Required | Description |
|---|
name | string | Yes | Campaign name |
campaign_mode | string | No | Campaign mode (e.g. outbound) |
agent_id | UUID | No | Agent that will make the calls |
objective | string | No | What the agent should accomplish |
description | string | No | Internal description |
phone_number_id | UUID | No | Phone number to dial from |
timezone | string | No | IANA timezone for business hours (e.g. America/New_York) |
business_hours | object | No | Day-by-day calling windows (see below) |
Business hours object
Each weekday key (monday through sunday) takes:
| Field | Type | Description |
|---|
enabled | boolean | Whether to dial on this day |
start | string | Earliest call time, HH:MM 24-hour |
end | string | Latest call time, HH:MM 24-hour |
Add existing contacts to a campaign by their IDs. Up to 100 contacts per request.
curl -X POST "https://api.getsmartalex.com/v1/campaigns/campaign_abc123/contacts" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contact_ids": [
"contact_abc123",
"contact_def456"
]
}'
Parameters
| Parameter | Type | Required | Description |
|---|
contact_ids | array of UUIDs | Yes | Contact IDs to add (1 to 100 per call) |
Create contacts first via the Contacts API and then add them to a campaign by their id.
Start Campaign
Start a campaign to begin making calls.
curl -X POST "https://api.getsmartalex.com/v1/campaigns/campaign_abc123/start" \
-H "Authorization: Bearer YOUR_API_KEY"
Response
{
"data": {
"id": "campaign_abc123",
"status": "active",
"started_at": "2026-04-28T10:00:00Z"
}
}
Pausing, resuming, and cancelling
To change a campaign’s state after it has started, use the dashboard’s campaign detail page. Programmatic pause/resume/cancel endpoints are not currently exposed in the public API — contact support if you need them.
Campaign Status
| Status | Description |
|---|
draft | Created but not started |
scheduled | Configured to start at a future time |
active | Currently making calls |
paused | Temporarily stopped (e.g. insufficient wallet balance) |
completed | All contacts processed |
cancelled | Manually stopped |
Error Codes
| Code | Description |
|---|
campaign_not_found | Campaign ID doesn’t exist |
agent_not_found | Specified agent doesn’t exist |
no_contacts | Campaign has no contacts to call |