Create Campaign
Programmatically create voice agent campaigns and receive a campaign ID.
Endpoint
https://www.tabbly.io/dashboard/agents/endpoints/create-campaign
Create Campaign
Creates an outbound calling campaign linked to a voice agent. You choose the schedule and opening greeting; use the returned campaign_id to add contacts next.
Endpoint
http
POST https://www.tabbly.io/dashboard/agents/endpoints/create-campaignAuthentication
See Introduction. Send your API key in one of:
"api_key": "YOUR_API_KEY"in the JSON request body (recommended)X-API-Key: YOUR_API_KEYheader (bodyapi_keycan be omitted)
Request body
| Parameter | Type | Required | Description |
|---|---|---|---|
api_key |
string | Yes* | Your organization API key (omit if using X-API-Key header) |
campaign_name |
string | Yes | Name for this campaign |
agent_id |
integer | Yes | Voice agent that will place the calls |
start_time |
string | Yes | When calling can start (YYYY-MM-DD HH:MM in time_zone) |
end_time |
string | Yes | When calling must end (YYYY-MM-DD HH:MM in time_zone) |
time_zone |
string | Yes | Time zone for start_time and end_time (e.g. IST, UTC) |
custom_first_line |
string | Yes | Greeting the agent says when the customer answers |
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": "2026-07-09 09:00",
"end_time": "2026-07-19 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
- The campaign is created with
Activestatus by default. start_timeandend_timeuse the formatYYYY-MM-DD HH:MMin the providedtime_zone.end_timemust be afterstart_time.- The voice agent must belong to your organization.
- Use Add Contacts to add contacts after creating the campaign.