Email Templates

List email templates

Changed on

Lists templates sorted newest first by created_at desc, id desc. Optional filters match a case-insensitive literal name/subject query, stored body presence, and the strict_variables and autoescape settings. Filters intersect, remain scoped to the authenticated account, and apply before cursor pagination. Invalid filter names or values return 400.

get/email_templates

Request

  • Base URL
    https://api.telnyx.com/v2
  • URL
    https://api.telnyx.com/v2/email_templates
  • Auth
    HTTP bearer

Query parameters

page_sizeinteger

Number of results to return. Defaults to 25; maximum is 100. Invalid values are clamped to the valid range.

page_cursorstring

Opaque URL-safe Base64 cursor returned by a previous list response.

filter[query]string

Case-insensitive literal substring match over the template name or stored subject only; bodies are never searched. %, _, and \ are literal characters with no wildcard meaning. A blank value is treated as omitted.

filter[content_type]'html_and_text' | 'html_only' | 'text_only' | 'no_body'

Matches templates by stored body presence. html_and_text requires both an HTML and text body; html_only requires HTML and no text body; text_only requires text and no HTML body; no_body requires neither. null and exactly "" count as absent; whitespace-only strings count as content. An empty or unsupported value returns a 400 response.

filter[strict_variables]'true' | 'false'

Exact match on the template's strict_variables option. Only the exact query strings true and false are accepted; other values, including blank, return 400.

filter[autoescape]'true' | 'false'

Exact match on the template's autoescape option. Only the exact query strings true and false are accepted; other values, including blank, return 400.

Response

Paginated list of templates.

Changes