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

EnvironmentURL
Productionhttps://production-api.shoutaboutus.com
Developmenthttps://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; otherwise 422.

Rate limit

This endpoint has no rate limit.

Request parameters

ParameterInTypeRequiredDescription
store_idqueryintegerNoAlso include the templates tied to this location. Must be inside your account tree.
template_typequerystringNoOnly return templates of this type: regular or follow_up.

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 email_template_id.
response[].labelstringThe 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."
    ]
  }
}
StatusMeaning
200The templates.
401The token is missing, expired or invalid.
422store_id is outside your tree, or template_type isn't regular or follow_up.
500Unexpected 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'

Did this page help you?