Update SMS Message Template

This API is used to create an SMS message template. The SMS template parameter content should be provided in base64 format. This API will throw an error if you do not provide the content in base64 format.

📘

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)

Body Parameters

The following table describes the elements in the request body:

ParameterTypeMandatoryDescription
channelStringMandatorySpecifies the channel. The options are:
* sms
smsTemplateObjectMandatorySpecifies the content for the SMS template. The parameters are:



  • content: (Mandatory) Specifies the text content in base64 format for the template. The length of the SMS content should not exceed 65535 characters.

  • description: (Optional) specifies the description for the template in base64 format.

  • personalizationSource: (Optional)
    Enable or disable the personalization. The options are:
    1 - enable (default)
    0 - disable

  • personalizationReferenceTargetId: (Optional) Specifies the target group id to make the personalization headers available in the content.

  • mastertemplateId: (Optional) Specifies the template id from which a new sms template is being created.

Request Example


{
  "channel": "sms",
  "smsTemplate": {
    "content": "JChUR19DRUxMX0NPREVOVU1CUil7YXNzZXRfbGlua3NfMTY0NDQ5MjI0NzAxMDZ9e3thdF9wZXJzb25hbGl6ZWRDb250ZW50TGlua319",
    "description": "U01TVGVtcGxhdGVfRGVjZW1iZXJfb2ZmZXJz",
    "personalizationSource": 1,
    "personalizationReferenceTargetId": "16206272370102"
  
  }

}

Response Example

{
    "id": "16715338090115",
    "name": "SMSTemplate_December_offers",
    "message": "SMS Template updated successfully."
}

Response Parameters

This API will return the following response parameters:

ParameterDescription
nameReturns the name of the SMS template that is updated.
messageReturns the confirmation message.
idReturns the SMS template id.

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
400400Invalid channel ::
400400CONTENT length is too long.
401430Authorization failed. This resource is not allowed to access using this TOKEN or KEY
401NAInvalid token or Access token expired
404404Not found
500500Internal server error
5001001Invalid input JSON
Language