{
"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"
}{
"status": 401,
"message": "The Team ID or API Key specified is not valid"
}{
"status": "error",
"message": "Resource with this name already exists"
}{
"status": "error",
"message": "Request body is not in proper format"
}{
"status": "error",
"message": "Internal server error occurred"
}Create email template
Creates a new reusable email template.
{
"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"
}{
"status": 401,
"message": "The Team ID or API Key specified is not valid"
}{
"status": "error",
"message": "Resource with this name already exists"
}{
"status": "error",
"message": "Request body is not in proper format"
}{
"status": "error",
"message": "Internal server error occurred"
}- HTML and text versions
- Personalization variables
- Reusable across campaigns
- Template versioning
- PlainText (0): Basic text formatting, fast loading
- DragDrop (1): Visual components, responsive design using the bee editor
- SendxEditor (2): TipTap editor with advanced features like drag & drop, image upload, and more
- Reusable email designs
- Consistent branding across campaigns
Authorizations
Team API key for authentication. Find your API key in SendX Settings → Team API Key.
Example:
X-Team-ApiKey: your_team_api_key_here
Body
Response
✅ Template created successfully
Unique template identifier with template_ prefix
^template_[a-zA-Z0-9]{22}$"template_abc123def456ghi789"
Name of the template
"Welcome Email Template"
Email subject line (if applicable)
"Welcome to our platform!"
HTML content of the template
"<html><body><h1>Welcome!</h1></body></html>"
Template code for visual editors (JSON structure)
"{\"blocks\":[{\"type\":\"text\",\"content\":\"Welcome!\"}]}"
Template type.
Values:
0- Email template1- Other types
0
URL to template thumbnail image
"https://cdn.sendx.io/templates/thumb_abc123.png"
Editor type used to create the template.
Values:
0- PlainText1- DragDrop2- SendxEditor
1
Template creation timestamp
"2024-01-10T14:20:00Z"
Template last update timestamp
"2024-01-15T09:15:00Z"
Was this page helpful?