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
- A bearer token. See Authentication.
- A location id (
store_id).
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://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_idmust be a location inside your own account tree; otherwise422.
Rate limit
This endpoint has no rate limit.
Request parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
store_id | query | integer | Yes | The location to list templates for. Must be inside your account tree. |
Request body
None.
Request payload
None.
Response body
The payload is inside data.
| Field | Type | Description |
|---|---|---|
status | string | success. |
response | array of objects | The templates, sorted by name. |
response[].value | integer | The template's id. Use it as sms_template_id. |
response[].label | string | The 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."
]
}
}| Status | Meaning |
|---|---|
200 | The templates. |
401 | The token is missing, expired or invalid. |
422 | store_id is missing or outside your tree. |
500 | Unexpected 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'Updated 17 days ago
Did this page help you?
