List text templates

Overview

Get the account's text templates.

Use this to pick one for a campaign. Each entry's value is the sms_template_id you send to Edit a text template.

You'll need an account token and a location id (store_id).

Returns one entry per template, sorted by name: the location's templates, your account's templates and the shared (global) templates. The list isn't paginated.

Prerequisites

Base URL

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

Endpoint

GET /api/v1/campaign/template/sms/list

Authentication

Account token

  • Lists the templates of the account of the user behind the token, plus the location's and the shared templates.
  • store_id must be a location inside your own account tree; otherwise 422.

Rate limit

This endpoint has no rate limit.

Request parameters

ParameterInTypeRequiredDescription
store_idqueryintegerYesThe location to list templates for. Must be inside your account tree.

Request body

None.

Request payload

None.

Response body

The payload is inside data.

FieldTypeDescription
statusstringsuccess.
responsearray of objectsThe templates, sorted by name.
response[].valueintegerThe template's id. Use it as sms_template_id.
response[].labelstringThe template's name.

Response payload

{
  "data": {
    "status": "success",
    "response": [
      {
        "value": 1,
        "label": "Simple & Direct"
      },
      {
        "value": 469,
        "label": "Simple & Direct"
      }
    ]
  }
}

Examples

Success payload

See Response payload.

Error payload

422 store_id missing

{
  "message": "The store id field is required.",
  "errors": {
    "store_id": [
      "The store id field is required."
    ]
  }
}

422 Location outside your tree

{
  "message": "The selected store id does not belong to your company hierarchy.",
  "errors": {
    "store_id": [
      "The selected store id does not belong to your company hierarchy."
    ]
  }
}
StatusMeaning
200The templates.
401The token is missing, expired or invalid.
422store_id is missing or outside your tree.
500Unexpected server error.

Example request

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

Did this page help you?