API ReferenceCampaigns
Create Campaign
Create a new outbound calling campaign
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, Talkr 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 Talkr 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 created status. Call Start to begin dialing.
Header Parameters
X-API-Key?string|null
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://example.com/api/v1/campaign/create" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "workflow_id": 0, "source_type": "string", "source_id": "string" }'{ "id": 0, "name": "string", "workflow_id": 0, "workflow_name": "string", "state": "string", "source_type": "string", "source_id": "string", "total_rows": 0, "processed_rows": 0, "failed_rows": 0, "created_at": "2019-08-24T14:15:22Z", "started_at": "2019-08-24T14:15:22Z", "completed_at": "2019-08-24T14:15:22Z", "retry_config": { "enabled": true, "max_retries": 0, "retry_delay_seconds": 0, "retry_on_busy": true, "retry_on_no_answer": true, "retry_on_voicemail": true }, "max_concurrency": 0, "schedule_config": { "enabled": true, "timezone": "string", "slots": [ { "day_of_week": 0, "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": 0, "redialed_campaign_id": 0, "telephony_configuration_id": 0, "telephony_configuration_name": "string", "logs": [ { "ts": "string", "level": "string", "event": "string", "message": "string", "details": {} } ]}