Schedule Campaign Data API adds data to the dialer(Outbound campaign) at a scheduled time. Time can be scheduled by including the parameter “ScheduledTime” in the request. Data(numbers/leads) consist of mapping(Headers) sequence listing PhoneNumber, Name, Priority, ExpiryDate, etc. while adding to the dialer.
Note:
Make sure the admin setting 'API Authentication' is set to 'BASIC_AUTH', If you are using this API.
Header parameters
Parameter | Description |
---|---|
apiKey* | Your CloudAgent account API Key |
Content-Type | application/json |
Body Params (Example format)
{
"userName":"xxxxx",
"campaignName":"xxxxxxxxx",
"bulkData":{"map":["PhoneNumber","AgentID","ScheduledTime"],"data":[["%2B916301877542","Bobby","2024-09-04 17:08:00"],["8639736950","bobby","2024-09-04 17:08:00"],["%2B918639736950","Bobby","2024-09-04 17:08:00"],["8187867008","Bobby","2024-09-04 17:09:00"],["%2B916301877542","Bobby","2024-09-04 17:09:00"],["%2B916301877542","Bobby","2024-09-04 17:09:00"],["8639736950","bobby","2024-09-04 17:10:00"],["%2B918639736950","Bobby","2024-09-04 17:10:00"],["8187867008","Bobby","2024-09-04 17:10:00"],["%2B916301877542","Bobby","2024-09-04 17:11:00"]]}
}
Possible responses
Success response | "status": "success", "message": [{"Response": "success", "ScheduleTime": "YYYY-MM-DD HH:MM:SS", "campaign_name": "Schedxxxx", "PhoneNumber": "040XXXXX", "Name": "NameXXX2", "AgentID": "AgentID2XXX", "skill": "Skill_2", "msg": "Data updated successfully", "index": "0" |
Invalid api_key | "status": "error" "message": "api_key or campaign_name is invalid or not found" |
Invalid Campaign name | "status: "error" "message": "api_key or campaign_name is invalid or not found" |
Missing ScheduledTime | "status": "error" "message": "Mandatory parameter ScheduledTime is in bulkData map" |
Missing bulkData | "status": "error" "message": { "0-0": "Success response", "0-1": ""status": "s} |
Missing PhoneNumber | "status": "success", "message": { "0-0": "Success response", "0-1": ""status": "success",\n"message": [{"Response": "success",\n"ScheduleTime": "YYYY-MM-DD HH:MM:SS",\n"campaign_name": "Schedxxxx",\n"PhoneNumber": "040XXXXX",\n"Name": "NameXXX2",\n"AgentID": "AgentID2XXX",\n"skill": "Skill_2",\n"msg": "Data updated successfully",\n"index": "0"", "1-0": "Invalid api_key", "1-1": ""status": "error"\n"message": "api_key or campaign_name is invalid or not found"", "2-0": "Invalid Campaign name", "2-1": ""status: "error"\n"message": "api_key or campaign_name is invalid or not found"", "3-0": "Missing ScheduledTime", "3-1": ", |
Invalid Date format | "status": "error" message": "Wrong Date format" |