Create Campaign
Programmatically create voice agent campaigns and receive a campaign ID.
Endpoint
https://www.tabbly.io/dashboard/agents/endpoints/create-campaign
Create Campaign
Programmatically create a voice agent campaign and receive a campaign ID.
Endpoint
http
POST https://www.tabbly.io/dashboard/agents/endpoints/create-campaignAuthentication
See Introduction. This is a POST endpoint — include api_key in the JSON request body.
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | Yes | Your organization API key |
campaign_name |
string | Yes | Campaign name |
agent_id |
integer | Yes | Voice agent ID for this campaign |
start_time |
string | Yes | Start time in 24-hour format (HH:MM) |
end_time |
string | Yes | End time in 24-hour format (HH:MM) |
time_zone |
string | Yes | Time zone code (e.g. IST, UTC, EST) |
custom_first_line |
string | Yes | Custom greeting for the campaign |
priority |
string | No | Campaign priority (optional) |
created_by |
integer | string | No | Creator identifier (optional) |
Supported time zones
IST, UTC, GMT, EST, PST, CST, MST, AST, PKT, BST, ICT, JST, KST, AEST, ACST, AWST, NZST, SST, HAST, AKST, WET, CET, EET, MSK, NST
Example request
bash
curl -X POST "https://www.tabbly.io/dashboard/agents/endpoints/create-campaign" \
-H "Content-Type: application/json" \
-d '{
"api_key": "YOUR_API_KEY",
"campaign_name": "Test Campaign",
"agent_id": 6355,
"start_time": "09:00",
"end_time": "18:00",
"time_zone": "IST",
"custom_first_line": "Hello, this is a test campaign."
}'Response
Success (200)
json
{
"status": "success",
"data": {
"campaign_id": 2744
}
}Error responses
json
{
"status": "error",
"message": "Human-readable error description"
}| HTTP status | When |
|---|---|
| 400 | Missing fields or invalid data |
| 401 | Invalid API key |
| 405 | Method not POST |
Notes
- Campaign is created with
Activestatus by default. - Times are converted to UTC using the provided time zone.
- If end time is earlier than start time, the end time is treated as the next day.
- The voice agent must belong to your organization.
- Use Add Contacts to add contacts after creating the campaign.