Skip to main content

Create Campaign

Each API request in TeleCMI platform includes App id and secret. Get your App id and secret in TeleCMI dashboard. After getting the app id and secret, make a POST request to the below endpoint to create a new Voice Campaign (Predictive or Progressive) and assign users/agents to it.

Base URL

https://rest.telecmi.com/v3/campaign/create

Required Parameters

Parameter NameTypeDescription
*inet_noIntegerThe account identifier.
*secretString (UUID)Your app secret.
*nameStringName of the campaign.
*dialer_typeStringType of dialer: "predictive" or "progressive".
*activeBooleanStatus of the campaign.
*leads_idString (UUID)UUID of the mapped leads.
*timezoneStringTimezone offset (e.g., "+05:30", "-07:00").
*start_dateString (Date)Campaign start date (YYYY-MM-DD).
*end_dateString (Date)Campaign end date (YYYY-MM-DD).
*start_timeStringCampaign start time (HH:MM:SS or HH:MM).
*end_timeStringCampaign end time (HH:MM:SS or HH:MM).
*usersArray of StringsList of Agent IDs (max 100). E.g., ["5159_2224257"].
user_intervalStringE.g., "10_s". Required if dialer_type is progressive.

Predictive-Only Required Fields: If dialer_type is "predictive", the following fields are also required:

  • ratio (String, e.g., "1:2". Max "99:99")
  • waiting_music (String, use "default" for TeleCMI default music)
  • unanswered_music (String, use "default" for TeleCMI default music)
  • ring_rule (String: "ring-all", "longest-idle-agent", "round-robin", "agent-with-least-talk-time", "agent-with-fewest-calls")
  • ring_seconds (Integer)
  • max_waiting_time (Integer)
  • call_interval (Integer: 10, 20, 30, 40, 50, 60, or 120)
  • no_agent_no_wait (Boolean)
  • caller_id (String)
  • reject_delay_time (Integer)
  • no_answer_delay_time (Integer)
  • max_waiting_time_without_agent (Integer) - Required only if no_agent_no_wait is false.

Sample Request

{
"inet_no": 12345,
"secret": "550e8400-e29b-41d4-a716-446655440000",
"name": "Q2_Sales_Campaign",
"dialer_type": "predictive",
"active": true,
"leads_id": "550e8400-e29b-41d4-a716-446655440000",
"timezone": "+05:30",
"start_date": "2026-05-01",
"end_date": "2026-06-01",
"start_time": "09:00:00",
"end_time": "18:00:00",
"users": ["5159_2224257"],
"ratio": "1:2",
"waiting_music": "default",
"unanswered_music": "default",
"ring_rule": "round-robin",
"ring_seconds": 30,
"max_waiting_time": 60,
"call_interval": 10,
"no_agent_no_wait": true,
"caller_id": "919876543210",
"reject_delay_time": 10,
"no_answer_delay_time": 10
}

Sample Response

{
"code": 200,
"msg": "Campaign created successfully"
}

HTTP Status Codes

Status CodeStatus TypeDescription
200SuccessCampaign created successfully
400ErrorCampaign Name Already Exists
400ErrorLeads ID Not Found
400ErrorLead already mapped to another campaign
400ErrorInvalid agent IDs
400ErrorUser already mapped to another campaign
404ErrorApp Not Found
422ErrorValidation Failed (e.g., missing required field or invalid format)
500ErrorInternal Server Error
Note
The * marked parameter is mandatory.