Get a template
Retrieves a single template by ID. Optionally specify a version number to retrieve a specific version.
get/api/templates.get
Query parameters
workspace_idstring required
The ID of the workspace
idstring required
The ID of the template
versioninteger
Specific version number (defaults to latest)
Response
Template retrieved successfully
Example response
{
"template": {
"id": "welcome_email",
"name": "Welcome Email",
"version": 1,
"channel": "email",
"email": {
"sender_id": "sender_123",
"reply_to": "support@example.com",
"subject": "Welcome, {{user_name}}!",
"subject_preview": "Get started with your account",
"visual_editor_tree": {
"type": "mjml",
"children": []
}
},
"category": "transactional",
"test_data": {
"user_name": "John Doe",
"action_url": "https://example.com/action"
}
}
}