put https://yourapihubdomain.io/v1/message-templates/
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 Header | Description |
---|---|
content-type | application/json |
authorization | Access token or API Secret Key in Bearer format Example: Bearer $(key) |
Body Parameters
The following table describes the elements in the request body:
Parameter | Type | Mandatory | Description |
---|---|---|---|
channel | String | Mandatory | Specifies the channel. The options are: * sms |
smsTemplate | Object | Mandatory | Specifies the content for the SMS template. The parameters are:
|
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:
Parameter | Description |
---|---|
name | Returns the name of the SMS template that is updated. |
message | Returns the confirmation message. |
id | Returns 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 Code | Code within API Response | Description |
---|---|---|
400 | 400 | Invalid channel :: |
400 | 400 | CONTENT length is too long. |
401 | 430 | Authorization failed. This resource is not allowed to access using this TOKEN or KEY |
401 | NA | Invalid token or Access token expired |
404 | 404 | Not found |
500 | 500 | Internal server error |
500 | 1001 | Invalid input JSON |