Get one text template

Overview

Get a template's content.

Use this to load it for editing. With campaign_id, the location's details are filled into the merge fields. If that campaign's text channel has a template, you get that template instead of smsTemplateId, with [landingPageUrl] set to the channel's landing page link.

You'll need the template id (value in List text templates).

Returns the template.

Prerequisites

Base URL

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://development-api.shoutaboutus.com

Endpoint

GET /api/v1/campaign/template/sms/{smsTemplateId}

Authentication

Account token

  • The template must belong to your account tree or be a shared (global) template; otherwise 422.
  • campaign_id, when sent, must be one of your campaigns.

Rate limit

This endpoint has no rate limit.

Request parameters

ParameterInTypeRequiredDescription
smsTemplateIdpathintegerYesThe template's id (value in List text templates). Must be one of your account's templates or a shared template.
campaign_idqueryintegerNoA campaign to preview the text for. Its location's details fill the merge fields. When the campaign's text channel has a template, that template is returned instead of smsTemplateId. Must be one of your campaigns.

Request body

None.

Request payload

None.

Response body

The payload is inside data.

FieldTypeDescription
statusstringsuccess.
dataobjectThe template.
data.idintegerThe template's id. Use it as sms_template_id.
data.company_idinteger or nullThe account that owns the template. null for a shared (global) template.
data.store_idinteger or nullThe location the template is tied to, or null.
data.namestringThe template's name.
data.contentstring or nullThe message text. Merge fields in square brackets are filled in when you send campaign_id.
data.json_contentobject or nullEditor data, or null.
data.landing_page_idinteger or nullThe landing page template linked to this text, or null.
data.review_site_idinteger or nullThe review site linked to this text, or null.
data.created_atstring or nullWhen the template was created (ISO 8601). null on shared templates.
data.updated_atstring or nullWhen the template was last changed (ISO 8601). null on shared templates.

Response payload

{
  "data": {
    "status": "success",
    "data": {
      "id": 469,
      "company_id": 5994,
      "store_id": 3007,
      "name": "Simple & Direct",
      "content": "Hi [customerName], thank you for choosing [locationName]! We'd love to hear about your experience. Share your feedback here: [landingPageUrl]  Reply STOP to opt out. Sent by RM.",
      "json_content": null,
      "landing_page_id": 4548,
      "review_site_id": null,
      "created_at": "2026-09-23T10:43:44.000000Z",
      "updated_at": "2026-09-23T10:43:44.000000Z"
    }
  }
}

Examples

Success payload

See Response payload.

With campaign_id=4823 (a campaign with no text channel), the location's name fills [locationName]; [customerName] and [landingPageUrl] stay as they are:

{
  "data": {
    "status": "success",
    "data": {
      "id": 469,
      "company_id": 5994,
      "store_id": 3007,
      "name": "Simple & Direct",
      "content": "Hi [customerName], thank you for choosing Acme Coffee! We'd love to hear about your experience. Share your feedback here: [landingPageUrl]  Reply STOP to opt out. Sent by RM.",
      "json_content": null,
      "landing_page_id": 4548,
      "review_site_id": null,
      "created_at": "2026-09-23T10:43:44.000000Z",
      "updated_at": "2026-09-23T10:43:44.000000Z"
    }
  }
}

A shared (global) template has no company_id or store_id:

{
  "data": {
    "status": "success",
    "data": {
      "id": 1,
      "company_id": null,
      "store_id": null,
      "name": "Simple & Direct",
      "content": "Hi [customerName], thank you for choosing [locationName]! We'd love to hear about your experience. Share your feedback here: [landingPageUrl]  Reply STOP to opt out. Sent by RM.",
      "json_content": null,
      "landing_page_id": null,
      "review_site_id": null,
      "created_at": null,
      "updated_at": null
    }
  }
}

Error payload

422 Template doesn't exist

{
  "message": "The selected id is invalid.",
  "errors": {
    "id": [
      "The selected id is invalid."
    ]
  }
}

422 Not your template

{
  "message": "The selected SMS template does not belong to your company.",
  "errors": {
    "id": [
      "The selected SMS template does not belong to your company."
    ]
  }
}

422 Campaign doesn't exist

{
  "message": "The selected campaign id is invalid.",
  "errors": {
    "campaign_id": [
      "The selected campaign id is invalid."
    ]
  }
}
StatusMeaning
200The template.
401The token is missing, expired or invalid.
422The template doesn't exist or belongs to another account, or campaign_id doesn't exist.
500Unexpected server error.

Example request

curl --request GET \
  --url "https://production-api.shoutaboutus.com/api/v1/campaign/template/sms/469" \
  --header 'Authorization: Bearer <bearer-token>' \
  --header 'Accept: application/json'

Did this page help you?