SMS templates API description
Please refer to the detailed API endpoint specification: SMS templates
Purpose
To obtain a list of all your contact center SMS canned messages and their details.
Prerequisites
- You must have access to your contact center API key.
Making requests
The SMS templates API requires the Base URL (cluster_id) and the contact center API key (client_api_key). It also supports optional pagination parameters.
The key parameter is the contact center's API key. Voiso responds with a list of SMS canned messages, including assigned teams and content.
For example:
{
"method": "GET",
"url": "https://cluster1.contact_center_name.com/api/v3/messages/sms/templates",
"params": {
"key": "cc7c76b8987a27ab5...b89b00ab6c3",
"page": 1,
"limit": 50
}
}Parameters
| Parameter | Description | Type | Required | Notes |
|---|---|---|---|---|
| key | The contact center API key | string | Yes | Refer to Authentication. |
| page | The page number to return | integer | No | Default: 1 |
| limit | The number of items to return per page | integer | No | Default: 50. Max: 500 |
Response
The following table describes the elements of the response.
| Element | Description | Type | Notes |
|---|---|---|---|
| id | The unique ID of the canned message | integer | |
| name | The name of the canned message | string | |
| body | The body content of the SMS message | string | May include dynamic placeholders |
| assigned_teams | List of teams assigned to the canned message | array | Each item includes id and name |
| metadata.total | The total number of SMS templates | integer | |
| metadata.page | The current page number returned in the response | integer | |
| metadata.page_size | The number of items returned in the current page | integer |
Response sample
{
"templates": [
{
"id": 142,
"name": "SMS template (6)",
"body": "Hi {{contact_name}}! My name is {{agent_name}}, how can I help you?",
"assigned_teams": [
{
"id": 16,
"name": "Support Team 2"
}
]
}
],
"metadata": {
"total": 10,
"page": 1,
"page_size": 1
}
}Troubleshooting
The following issues are sometimes encountered:
The API key specified is invalid
The SMS templates API requires a valid contact center API key to authorize the request. If you receive this error: "error": "The API key specified is invalid", check that you're using the correct contact center API key. Refer to Authentication for more information.