Lead Add Agent Sticky
Each API request in TeleCMI platform includes App id and secret. Get your App id and secret in TeleCMI dashboard. This endpoint creates a dedicated lead list and a progressive campaign mapped to a single agent, for the TeleCMI Dialer system. Because only one agent is mapped to the campaign, the campaign is sticky to that agent by default (the leads are dialed only by the given agent_id).
Base URL
Send your POST method request with valid parameters and application/json content type, to the following base URL.
https://rest.telecmi.com/v3/leads/add-agent-sticky
Required Parameters
These are the required POST method parameters with description
| Parameter Name | Type | Description |
|---|---|---|
| *lead_name | string | Unique name for this lead group/campaign. Must not already exist. |
| *inet_no | integer | Your account identification number. |
| *secret | string | API authentication token. |
| *agent_id | string | The agent this campaign is sticky to, in extension_inet_no format (e.g., 1004_2224994). The agent must belong to your account. |
| *leads | array | Array of lead objects (Min: 1, Max: 10000). |
| sticky | boolean | Optional. Accepted for compatibility; the campaign is always sticky because it is mapped to a single agent. |
Lead Object (leads array)
| Field | Type | Required | Description |
|---|---|---|---|
| *lead_id | string | Yes | Must be a valid UUID. Used as the primary key. |
| *phone | string | Yes | Lead phone number (e.g., 919876543210). |
| firstname | string | No | First name of the lead. |
| lastname | string | No | Last name of the lead. |
| string | No | Email address (must be a valid format). | |
| comment | string | No | Additional notes. |
| address | string | No | Physical address. |
| city | string | No | City. |
| country | string | No | Country. |
Note
Campaign Defaults
The progressive campaign created by this API uses the following default settings.
| Field | Value |
|---|---|
| dialer_type | progressive |
| active | true |
| timezone | +05:30 |
| user_interval | 10_s |
| start_time / end_time | 18:30:00 / 18:29:00 (24x7) |
| start_date / end_date | Today / Today + 3 months |
| caller_id | Not set |
Behavior
This API creates the lead list, the progressive campaign, and the single-agent mapping only. It does not create a campaign status record. The TeleCMI Dialer manages the campaign status and starts the campaign automatically once it is active.
Sample JSON Request
Below is the following sample JSON POST method request
{
"lead_name": "Sales_Q2_Campaign",
"inet_no": 1111112,
"secret": "your_api_secret_token",
"agent_id": "1004_1111112",
"sticky": true,
"leads": [
{
"lead_id": "550e8400-e29b-41d4-a716-446655440000",
"phone": "919876543210",
"firstname": "John",
"email": "john.doe@example.com"
}
]
}
Sample Response
If the provided information is valid, your web server will get a sample response from TeleCMI Platform as given below
{
"code": 200,
"msg": "Leads Added Successfully",
"data": {
"leads_id": "...",
"campaign_id": "...",
"agent_id": "1004_1111112"
}
}
Properties
These are the list of properties and its description
| Property | Type | Description |
|---|---|---|
| code | number | The response code. |
| msg | string | Leads Added Successfully |
| data.leads_id | string | The identifier of the created lead group. |
| data.campaign_id | string | The identifier of the created progressive campaign. |
| data.agent_id | string | The agent the campaign is sticky to. |
HTTP status codes
TeleCMI API platform represents the following status code to identity the errors.
| Status code | Status Type | Description |
|---|---|---|
| 200 | Success | Leads Added Successfully |
| 400 | Error | Lead Name Already Exists |
| 400 | Error | Campaign Name Already Exists |
| 404 | Error | Account Not Found (Invalid secret or inet_no) |
| 404 | Error | Agent Not Found (Invalid agent_id) |
| 420 | Error | Plan expired |
| 422 | Error | Schema validation failed (e.g., missing required field) |