List email templates
Overview
Get the account's email templates.
Use this to pick a template for a campaign. Each entry's value is the email_template_id you send to Edit an email template, for example to attach the template to a campaign's email channel.
You'll need an account token.
Returns one entry per template, sorted by name: your account's templates, the shared (global) templates and, when you send store_id, that location's templates. The list isn't paginated.
Prerequisites
- A bearer token. See Authentication.
- Optional: a location id (
store_id) to include that location's templates.
Base URL
| Environment | URL |
|---|---|
| Production | https://production-api.shoutaboutus.com |
| Development | https://development-api.shoutaboutus.com |
Endpoint
GET /api/v1/campaign/template/email/list
Authentication
Account token
- Lists the templates of the account of the user behind the token, plus the shared templates.
store_id, when sent, must 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 | No | Also include the templates tied to this location. Must be inside your account tree. |
template_type | query | string | No | Only return templates of this type: regular or follow_up. |
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 email_template_id. |
response[].label | string | The template's name. |
Response payload
{
"data": {
"status": "success",
"response": [
{
"value": 9083,
"label": "Default Email Template"
},
{
"value": 9084,
"label": "Default Email Template"
},
{
"value": 2,
"label": "Follow-up : Warm & Simple"
},
{
"value": 1,
"label": "Warm & Simple"
}
]
}
}Examples
Success payload
See Response payload.
With template_type=follow_up, only follow-up templates are returned:
{
"data": {
"status": "success",
"response": [
{
"value": 2,
"label": "Follow-up : Warm & Simple"
}
]
}
}Error payload
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."
]
}
}422 Invalid template_type
{
"message": "The selected template type is invalid.",
"errors": {
"template_type": [
"The selected template type is invalid."
]
}
}| Status | Meaning |
|---|---|
200 | The templates. |
401 | The token is missing, expired or invalid. |
422 | store_id is outside your tree, or template_type isn't regular or follow_up. |
500 | Unexpected server error. |
Example request
curl --request GET \
--url "https://production-api.shoutaboutus.com/api/v1/campaign/template/email/list?store_id=3007" \
--header 'Authorization: Bearer <bearer-token>' \
--header 'Accept: application/json'Updated 17 days ago
Did this page help you?
