post https://yourapihubdomain.io/v1/campaigns//deployments
This API is used to create an SMS deployment.
Know your endpoint
Based on the domain you use to log in to Webex Campaign, the endpoint domain for your API varies. For more information, refer to the Know Your API Endpoints section.
Headers
The following table describes the request headers:
Request Header | Description |
---|---|
content-type | application/json |
authorization | Access token or API Secret Key in Bearer format Example: Bearer $(key) |
Request Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
milestone | Integer | Yes | Specifies the deployment milestone. |
deploymentInfo | Object | Yes | Specifies the deployment info object. deploymentName: Specifies the deployment name. contentType: deploymentType: 1, promotionType: 1, channel: 0, scheduleMode: "1", _ instantType: 0 |
targetGroup | Object | Yes | Specifies the target group object. targetGroupIds: Specifies an array of target group ids. _policyConfigurationEnabled: Specifies if the policy configuration is enabled. globalExclusionEnabled: Specifies if the global exclusion is enabled. **exclusionOptionnEnabled": Specifies if the exclusion option is enabled. removeDuplicates: Specifies if the duplicates have to be removed. controlGroupEnabled: Specifies if the control group is enabled. controlType: Specifies the control type. limitContactsEnabled: Specifies if the limit contacts is enabled. limitContactsCondition: Specifies the limit contacts condition. seedlistEnabled: Specifies if the seed list is enabled. addNoteToSeedMessage: Specifies if the note to seed message. _ waitInterval: Specifies the wait interval in minutes. |
reportTags | Object | Yes | pandls: Specifies the P and L object. id: Specifies the id of the P and L. name: Specifies the name of P and L. purposes: Specifies the purposes object. categoryId: Specifies the category id. categoryGroup: Specifies the category group. The default option is DEFAULT. _ categoryName: Specifies the category name. _ segment code: Specifies the segment code": * optOutCategory: Specifies the opt out category. |
router | Object | Yes | Specifies the router details. routerId: Specifies the router id. tps: Specifies the TPS (transactions per second) for the router. * isAutoTps: Specifies if the auto TPS is enabled. |
schedule | Object | Yes | Specifies the schedule details. * immediateCalendar: Specifies the calendar. |
advancedOptions | Object | Yes | Specifies the advanced options details. retryNeeded: Specifies if retry is needed or not, drRequired: Specifies if the delivery receipt is need or not. messageValidityEnabled: Specifies if the message validity is enabled. messageValidity: Specifies the message validity in numbers. messageValidityFormat: Specifies the message validity format. offerValidityEnabled: Specifies if the offer validity is enabled or not. isRetryNeeded: Specifies if the retry is needed or not. maximumAttempts: Specifies the maximum attempts. |
smsDeploymentInfo | Object | Yes | Specifies the SMS deployment details. _ smscontent: Specifies the SMS content object. senderId: Specifies the sender id. content: Specifies the content in base 64 format. messageType: Specifies the message type. linkTrackInfo: Specifies the link tracking information. linkId: Specifies the link id. shortLinkSendingOption: Specifies the short link sending option. The options are 0 - common 1 - unique expectedCtr: Specifies the expected click to ratio. linkName: Specifies the link name. linkTracking: Specifies if the link tracking is enabled. mainUrl: Specifies the main URL in base 64 encoded format. _ shortUrl: Specifies the short URL in base 64 encoded format. |
reserveDaysType | String | Yes | Specifies exclusion days. |
reserveTimingsType | String | Yes | Specifies exclusion timings. |
ruleBasedSuppressionIds | Array of Strings | No | Specifies the rule based suppression ids. |
notifications | Array of Strings | No | Specifies an array of email IDs to receive deployment status notifications. For example, [ "[email protected]" ] |
recipientLocalTimeZoneEnabled | Boolean | No | Specifies if the deployment has to be sent as per the recipient's timezone. The options are true or false. |
isPrepareTGEnabled | Boolean | No | When a deployment is scheduled as immediately and then activated, it takes up to 30 minutes to prepare a Target Group before pushing the messages to targeted contacts. Configure this parameter for the Target Group to be prepared before activating the deployment. |
Request Example
{
"prepareTGEnabled": true,
"milestone":"Draft",
"campaignInfo": {
"campaignId": "16902745160049",
"businessStakeHolder": "sales"
},
"deploymentInfo": {
"deploymentName": "sales_test1_1234",
"contentType": 1,
"deploymentType": 1,
"promotionType": 1,
"channel": 0,
"scheduleMode": 1,
"instantType": 0
},
"targetGroup": {
"targetGroupIds": [
"17043674830125"
],
"policyConfigurationEnabled": true,
"globalExclusionEnabled": true,
"exclusionOptionnEnabled": false,
"removeDuplicates": true,
"controlGroupEnabled": false,
"controlType": 0,
"limitContactsEnabled": false,
"limitContactsCondition": 0,
"seedlistEnabled": false,
"addNoteToSeedMessage": false,
"waitInterval": 0
},
"reportTags": {
"pandls": {
"id": 562,
"name": "QA_API_3008202212"
},
"purposes": [
{
"categoryId": 724,
"categoryGroup": "DEFAULT",
"categoryName": "QA_Purpose_06102022"
},
{
"categoryId": 725,
"categoryGroup": "DEFAULT",
"categoryName": "AT_PURPOSE10Nov2022"
}
],
"segmentCode": "2112",
"optOutCategory": "-1"
},
"router": {
"routerId": "NGMP_SMS_LIVEQ",
"tps": 1,
"isAutoTps": false
},
"schedule": {
"immediateCalendar": true,
"calendarId": "Default",
"waitPeriod": 0,
"scheduleType": 7,
"runPeriod": 0,
"runScheduleType": 0
},
"advancedOptions": {
"retryNeeded": false,
"drRequired": 1,
"messageValidityEnabled": true,
"messageValidity": 0,
"messageValidityFormat": "D",
"offerValidityEnabled": false,
"isRetryNeeded": false,
"maximumAttempts": 0
},
"smsDeploymentInfo": {
"smscontent": [
{
"senderId": "CONNCT",
"content": "{asset_links_16648741360002}",
"messageType": "normal",
"linkTrackInfo": [],
"traiTemplateId": "16582198681091"
}
]
},
"reserveDaysType": "1",
"reserveTimingsType": "1",
"stakeholders": [],
"notifications": [],
"isPrepareTGEnabled": true
}
Response Parameters
This API will return the following response parameters:
Parameter | Description |
---|---|
name | Returns the name of the Purpose. |
id | Returns the id of the Purpose. |
message | Returns a confirmation message. |
Response Example
{
"id": "SMS_1705670748428001531",
"name": "sales_test1_1234",
"message": "Deployment - sales_test1_1234 - has been saved successfully."
}
Failure Response Codes
The API will return code within the response as per the following table in case of failure scenarios.
HTTP Status Code | Code within API Response | Description |
---|---|---|
400 | 400 | I/O error on post request. Cannot retry due to server authentication, in streaming mode. |
400 | 200 | Campaign information is required. |
401 | 430 | Authorization failed. This resource is not allowed to access using this TOKEN or KEY |
401 | 498 | Invalid token or Access token expired |
404 | 404 | Not found |
405 | 405 | Method not supported |
500 | 500 | Internal server error |
500 | 1001 | Invalid input JSON |