Create SMS Deployment API

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 HeaderDescription
content-typeapplication/json
authorizationAccess token or API Secret Key in Bearer format

Example: Bearer $(key)

Request Parameters

ParameterTypeMandatoryDescription
milestoneIntegerYesSpecifies the deployment milestone.
deploymentInfoObjectYesSpecifies the deployment info object.
deploymentName: Specifies the deployment name.
contentType:
deploymentType: 1,
promotionType: 1,
channel: 0,
scheduleMode: "1",
_ instantType: 0
targetGroupObjectYesSpecifies 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.
reportTagsObjectYes 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.
routerObjectYesSpecifies 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.
scheduleObjectYesSpecifies the schedule details.

* immediateCalendar: Specifies the calendar.
advancedOptionsObjectYesSpecifies 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.
smsDeploymentInfoObjectYesSpecifies 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.
reserveDaysTypeStringYesSpecifies exclusion days.
reserveTimingsTypeStringYesSpecifies exclusion timings.
ruleBasedSuppressionIdsArray of StringsNoSpecifies the rule based suppression ids.
notificationsArray of StringsNoSpecifies an array of email IDs to receive deployment status notifications. For example,
[
"[email protected]"
]
recipientLocalTimeZoneEnabledBooleanNoSpecifies if the deployment has to be sent as per the recipient's timezone. The options are true or false.
isPrepareTGEnabledBooleanNo 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:

ParameterDescription
nameReturns the name of the Purpose.
idReturns the id of the Purpose.
messageReturns 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 CodeCode within API ResponseDescription
400400I/O error on post request. Cannot retry due to server authentication, in streaming mode.
400200Campaign information is required.
401430Authorization failed. This resource is not allowed to access using this TOKEN or KEY
401498Invalid token or Access token expired
404404Not found
405405Method not supported
500500Internal server error
5001001Invalid input JSON
Language