Skip to main content

Lead Update Agent Sticky

Each API request in TeleCMI platform includes App id and secret. Get your App id and secret in TeleCMI dashboard. This endpoint appends leads to an existing agent sticky campaign in the TeleCMI Dialer system. The lead_name and agent_id combination must already exist (created using the Lead Add Agent Sticky API) and the campaign must belong to the given agent, otherwise the request fails.

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/update-agent-sticky

Required Parameters​

These are the required POST method parameters with description

Parameter NameTypeDescription
*lead_namestringThe name of the existing agent sticky lead group/campaign to update.
*inet_nointegerYour account identification number.
*secretstringAPI authentication token.
*agent_idstringThe agent mapped to the campaign, in extension_inet_no format (e.g., 1004_2224994). The agent must belong to your account and be mapped to the campaign.
*leadsarrayArray of lead objects to append (Min: 1, Max: 10000).
stickybooleanOptional. Accepted for compatibility; the campaign is always sticky because it is mapped to a single agent.

Lead Object (leads array)​

FieldTypeRequiredDescription
*lead_idstringYesMust be a valid UUID. Used as the primary key.
*phonestringYesLead phone number (e.g., 919876543210).
firstnamestringNoFirst name of the lead.
lastnamestringNoLast name of the lead.
emailstringNoEmail address (must be a valid format).
commentstringNoAdditional notes.
addressstringNoPhysical address.
citystringNoCity.
countrystringNoCountry.
Note
The * marked parameter is mandatory. This endpoint only appends leads to an existing campaign; it does not create a new lead list or campaign. If the lead_name does not exist, the request fails with Lead Name Not Found. If the lead_name exists but is not mapped to the given agent_id, the request fails with Lead Name mapped to another agent.

Behavior​

Appended leads are picked up by the TeleCMI Dialer, which manages the campaign status and (re)starts the campaign. This API does not create a campaign status record; it only updates an existing one.

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",
"leads": [
{
"lead_id": "550e8400-e29b-41d4-a716-446655440001",
"phone": "919876543211",
"firstname": "Jane"
}
]
}

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 Updated Successfully",
"data": {
"leads_id": "...",
"campaign_id": "...",
"agent_id": "1004_1111112"
}
}

Properties​

These are the list of properties and its description

PropertyTypeDescription
codenumberThe response code.
msgstringLeads Updated Successfully
data.leads_idstringThe identifier of the updated lead group.
data.campaign_idstringThe identifier of the restarted progressive campaign.
data.agent_idstringThe agent the campaign is sticky to.

HTTP status codes​

TeleCMI API platform represents the following status code to identity the errors.

Status codeStatus TypeDescription
200SuccessLeads Updated Successfully
400ErrorLead Name Not Found
400ErrorLead Name mapped to another agent
404ErrorAccount Not Found (Invalid secret or inet_no)
404ErrorAgent Not Found (Invalid agent_id)
420ErrorPlan expired
422ErrorSchema validation failed (e.g., missing required field)