Use this API to add data to any outbound campaign(dialer) with basic authentication. Create an outbound campaign in your CloudAgent account, and use this API to add data/records for the same.
You can also manually add data to the dialer by uploading an Excel sheet. However by using this API, the same can be automated.
Note:
- Make sure the admin setting 'API Authentication' is set to 'BASIC_AUTH', If you are using this API.
- In the body params, if no priority value is specified, the system defaults to 1.
Rate Limit:
A maximum of 100 requests per minute is allowed for this API.
To access the API, pass the below header parameters:
Parameter | Description |
---|---|
Content-Type* | Should be - "application/json" |
apiKey* | Provide the API key of your account. Available in CloudAgent after admin login. |
Below is the description of the parameters to be passed:
Parameter (Key) | Description |
---|---|
campaignName* | Name of the campaign where the data is to be added |
phoneNumber* | Phone number of the lead. |
Name | Optional name to the phone number or lead being added. |
action | If the parameter value passes as 'START', API starts the campaign simultaneous to adding data. |
skill | Unique skill assigned to agents to which the call is routed. |
priority | The higher the priority value(1-99) assigned to the phoneNumber, the faster the number gets |
agentId | Unique ID for every agent irrespective of campaign. |
expiryDate | It Is the last date set to the number to be valid in the dialer. Format is YYYY-MM-DD HH:MM:SS |
checkDuplicate | This parameter checks for any duplicate numbers in the campaign. |
userName* | Your CloudAgent acoount user name. |
skipNameFieldValidation | whether to skip name field validation (true or false). |
Possible responses
Adding data when the admin setting is TOKEN_AUTH/NONE | "{ |
Missing api_key parameter | "{ |
Invalid api_key / Empty api_key value | "{ |
Empty campaign name key / Invalid camapign name key/ campaign name value missing | "{ |
Invalid campaign name value | "{""status"": ""FAIL"", |
phone number key missing / Invalid phone number Key / Invalid phone number value / Empty phone number value | "{""status"": ""error"", |
Valid phone number value | """{ |
action key is invalid | "{ |
"Success response when | "{ |
"Success response when | {"status": "SUCCESS", "message": "SuccessFully Updated, IVR was started"} |
"Success response when | "{ |
A number already exists and parameter passed | {"status": "SUCCESS", "message": "Number Already Exist"} |
A number already exists and parameter passed | {"status": "SUCCESS", "message": "SuccessFully Updated, xxx was started"} |
checkDuplicate key is missing | "{ |
username key is missing / username key empty OR null / username key is invalid | "{ |
username value is valid | """""""{ |
username value is invalid | "{ |
priority key is missing / priority key with invalid priority value / priority key is invalid and value is valid / priority value is invalid / priority value is valid | "{ |
priority value is missing | "{ |
Invalid expiryDate Value | "{ |
Missing expiryDate Value | "{ |
Passing past date as expiryDate value | "{ |
Passing future date as expiryDate value | "{ |
ExpiryDate value is valid | "{ |
username value is empty/null | "{ |
Adding phone number to Agentwise campaign and agentId missing | "status": "FAIL", "message": "Agent Is Empty!" |
Adding phone number to Agentwise campaign and agentId empty | """status"": ""FAIL"", |
Adding a phone number to Agentwise campaign and agentId invalid | """status"": ""FAIL"", |
Adding a phone number to Agentwise campaign and agentId valid | {"status": "SUCCESS", "message": "SuccessFully Updated"} |
Adding a phone number to skill wise campaign and skill is missing | """status"": ""FAIL"", |
Adding a phone number to skill wise campaign and skill is empty | """status"": ""FAIL"", |
Adding a phone number to skill wise campaign and skill is invalid | """status"": ""FAIL"", |
Adding a phone number to skill wise campaign and skill is valid | {"status": "SUCCESS", "message": "SuccessFully Updated"} |
Adding a phone number to skill wise campaign with other valid skill | "{ |
Uploading phone numbers to non-mandatory mapped columns like name, address missing/ invalid. | {"status": "SUCCESS", "message": "SuccessFully Updated"} |
Giving same name to a different number | {"status": "SUCCESS", "message": "SuccessFully Updated, xxx was started"} |
Giving same number and different name | {"status": "SUCCESS", "message": "Number Already Exist"} |
Adding data to inbound campaign | "no, we should not { |
Data added to the campaign when the setting "Api authentication" is "Basic_Auth" | {"status": "SUCCESS", "message": "SuccessFully Updated, IVR was started"} |
Data added to campaign when the setting "Api authentication" is "None" | "{ |
Data added to campaign when the setting "Api authentiction" is "Token_Auth" | "{ |