Get SMS template by ID
GET /api/communications/sms-templates/{templateId}
Success: 200 OK
- Products: Operator (
FOH) - Features: Front of House Generic Access (
FOHGENERIC)
Overview
Returns one SMS template with its message text in every language it has been written in.
An SMS template is the body used when a communication job sends by text; the text is stored once per language and the entry matching the recipient is chosen when the message is sent. Use this to show or verify a template before attaching it to a scheduled job.
The template is returned whether or not it is enabled, so check isActive before relying on it: sending with a disabled template fails at send time with the template reported as non-existent.
Endpoint
GET {base_url}/api/communications/sms-templates/{templateId}
{base_url} is the environment URL issued to your integration. See Authenticating with Gladstone APIs.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
templateId | integer (int32) | Yes | The template to return. Must be 1 or greater — 0 and negative values are rejected as invalid rather than treated as not found — and a non-integer segment fails at routing with 400. |
Sample request
curl -X GET '{base_url}/api/communications/sms-templates/{templateId}' \
-H 'Authorization: Bearer {accessToken}' \
-H 'X-Use-SSO: true'Response fields
| Field | Type | Description |
|---|---|---|
id | integer (int32) | The template's identifier, echoed back. |
templateName | string | The template's name, up to 255 characters. It identifies the template to staff and is never part of the message a recipient receives. |
isActive | boolean | Whether the template may be used for sending. An inactive template is still returned here, but any send that references it fails. |
content | array of object | The message text, one entry per language. Empty when no text has been written for the template yet. |
content[].language | string | The language this text is written in, as a language code — en-GB, cy-GB and en-IE are the codes installed by default. |
content[].content | string | The message text for that language, up to 1024 characters. |
Sample response
{
"id": 12345,
"templateName": "string",
"isActive": true,
"content": [
{
"language": "string",
"content": "string"
}
]
}Errors
| Status | Meaning | When |
|---|---|---|
400 | Bad request | templateId is zero or negative (SMS template ID must be a positive integer), or the path segment is not an integer (The value 'A' is not valid.). |
404 | Not found | No SMS template with that id in this tenant (SMS template with ID {templateId} doesn't exist.). |
500 | Internal server error | An unexpected failure reading the template. The response has no body. |