Skip to main content
GET
/
template
/
email
Get all templates
curl --request GET \
  --url https://api.sendx.io/api/v1/rest/template/email \
  --header 'X-Team-ApiKey: <api-key>'
[
  {
    "id": "template_abc123def456ghi789",
    "name": "Welcome Email Template",
    "subject": "Welcome to our platform!",
    "htmlCode": "<html><body><h1>Welcome!</h1></body></html>",
    "templateCode": "{\"blocks\":[{\"type\":\"text\",\"content\":\"Welcome!\"}]}",
    "type": 0,
    "thumbnail": "https://cdn.sendx.io/templates/thumb_abc123.png",
    "editorType": 1,
    "created": "2024-01-10T14:20:00Z",
    "updated": "2024-01-15T09:15:00Z"
  }
]

Authorizations

X-Team-ApiKey
string
header
required

Team API key for authentication. Find your API key in SendX Settings → Team API Key.

Example:

X-Team-ApiKey: your_team_api_key_here

Query Parameters

offset
integer
default:0

Number of records to skip for pagination.

Examples:

  • 0 - First page (default)
  • 25 - Second page (with limit=25)
  • 50 - Third page (with limit=25)
Required range: x >= 0
limit
integer
default:10

Maximum number of templates to return per page.

Guidelines:

  • Default: 10 templates
  • Maximum: 100 templates
  • Recommended: 25-100 for optimal performance
Required range: 1 <= x <= 100

Search templates by name (case-insensitive partial matching).

Examples:

  • newsletter - Finds "Weekly Newsletter", "Monthly Newsletter"
  • welcome - Finds "Welcome Email", "New User Welcome"
  • product - Finds "Product Launch", "Product Update"
Required string length: 2 - 100

Response

✅ Templates retrieved successfully

id
string

Unique template identifier with template_ prefix

Example:

"template_abc123def456ghi789"

name
string

Name of the template

Example:

"Welcome Email Template"

subject
string | null

Email subject line (if applicable)

Example:

"Welcome to our platform!"

htmlCode
string

HTML content of the template

Example:

"<html><body><h1>Welcome!</h1></body></html>"

templateCode
string | null

Template code for visual editors (JSON structure)

Example:

"{\"blocks\":[{\"type\":\"text\",\"content\":\"Welcome!\"}]}"

type
integer

Template type.

Values:

  • 0 - Email template
  • 1 - Other types
Example:

0

thumbnail
string | null

URL to template thumbnail image

Example:

"https://cdn.sendx.io/templates/thumb_abc123.png"

editorType
integer

Editor type used to create the template.

Values:

  • 0 - PlainText
  • 1 - DragDrop
  • 2 - SendxEditor
Example:

1

created
string<date-time>

Template creation timestamp

Example:

"2024-01-10T14:20:00Z"

updated
string<date-time>

Template last update timestamp

Example:

"2024-01-15T09:15:00Z"

I