campaigns.create
Create a campaign from a contact list and an agent.
Before creating a campaign, upload your contacts CSV to get a source_url.
Set telephony_configuration_id to pin the campaign to a specific telephony configuration. If omitted, Decibyl falls back to the organization’s default outbound configuration — supplying an id that doesn’t exist in your organization returns 400 telephony_configuration_not_found.
The time_slots field controls when Decibyl is allowed to place calls. If omitted, calls can be placed at any time. The timezone field applies to all time slot windows.
{ "time_slots": [ { "day": "monday", "start": "09:00", "end": "17:00" }, { "day": "tuesday", "start": "09:00", "end": "17:00" } ]}Once created, the campaign is in draft status. Call Start to begin dialing.
Reference
POST/api/v1/campaigns/create
- Auth
- API key in
X-API-Key - Content
- application/json
- Returns
- 200 · CampaignResponse
Create a new campaign
Arguments
| Argument | In | Type | Required | Description |
|---|---|---|---|---|
name | body | string | required | |
workflow_id | body | integer | required | |
source_type | body | string | required | |
source_id | body | string | required | |
telephony_configuration_id | body | integer | optional | |
retry_config | body | RetryConfigRequest | optional | |
max_concurrency | body | integer | optional | |
schedule_config | body | ScheduleConfigRequest | optional | |
circuit_breaker | body | CircuitBreakerConfigRequest | optional |
Example request
curl -X POST "https://api.decibyl.ai/api/v1/campaigns/create" \
-H "X-API-Key: dcb_your_key" \
-H "Content-Type: application/json" \
-d '{"name":"string","workflow_id":1,"source_type":"string","source_id":"string","telephony_configuration_id":1,"retry_config":{"enabled":true,"max_retries":2,"retry_delay_seconds":120,"retry_on_busy":true,"retry_on_no_answer":true,"retry_on_voicemail":true},"max_concurrency":1,"schedule_config":{"enabled":true,"timezone":"UTC","slots":[{"day_of_week":1,"start_time":"string","end_time":"string"}]},"circuit_breaker":{"enabled":true,"failure_threshold":0.5,"window_seconds":120,"min_calls_in_window":5}}'Response
{
"id": 1,
"name": "string",
"workflow_id": 1,
"workflow_name": "string",
"state": "string",
"source_type": "string",
"source_id": "string",
"total_rows": 1,
"processed_rows": 1,
"failed_rows": 1,
"created_at": "2026-09-14T09:30:00Z",
"started_at": "2026-09-14T09:30:00Z",
"completed_at": "2026-09-14T09:30:00Z",
"retry_config": {
"enabled": true,
"max_retries": 1,
"retry_delay_seconds": 1,
"retry_on_busy": true,
"retry_on_no_answer": true,
"retry_on_voicemail": true
},
"max_concurrency": 1,
"schedule_config": {
"enabled": true,
"timezone": "string",
"slots": [
{
"day_of_week": 1,
"start_time": "string",
"end_time": "string"
}
]
},
"circuit_breaker": {
"enabled": false,
"failure_threshold": 0.5,
"window_seconds": 120,
"min_calls_in_window": 5
},
"executed_count": 0,
"total_queued_count": 0,
"parent_campaign_id": 1,
"redialed_campaign_id": 1,
"telephony_configuration_id": 1,
"telephony_configuration_name": "string",
"consent_attested_at": "2026-09-14T09:30:00Z",
"consent_attested_by": 1,
"logs": [
{
"ts": "string",
"level": "string",
"event": "string",
"message": "string",
"details": {}
}
]
}Errors
| Status | When |
|---|---|
404 | Not found |
422 | Validation Error |