SMS templates description

SMS templates 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

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.voiso.com/api/v3/messages/sms/templates",
  "params": {
    "key": "cc7c76b8987a27ab5...b89b00ab6c3",
    "page": 1,
    "limit": 50
  }
}

Parameters

ParameterDescriptionTypeRequiredNotes
keyThe contact center API keystringYesRefer to Authentication.
pageThe page number to returnintegerNoDefault: 1
limitThe number of items to return per pageintegerNoDefault: 50. Max: 500

Response

The following table describes the elements of the response.

ElementDescriptionTypeNotes
idThe unique ID of the canned messageinteger
nameThe name of the canned messagestring
bodyThe body content of the SMS messagestringMay include dynamic placeholders
assigned_teamsList of teams assigned to the canned messagearrayEach item includes id and name
metadata.totalThe total number of SMS templatesinteger
metadata.pageThe current page number returned in the responseinteger
metadata.page_sizeThe number of items returned in the current pageinteger

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.