Overview
This request retrieves a single transactional template based on the provided ID. The template data contains information specific to the template such as the name, subject line, and from email address, as well as the HTML body content, and settings for tracking of links and clicks,
Endpoint
Method | URL | Parameters |
---|---|---|
GET | https://api.everlytic.net/transactional/email/v1/templates/[Template ID] | [Template ID] – Unique string ID of the template to be retrieved |
Example Request
curl --location 'https://api.everlytic.net/transactional/email/v1/templates/b93d670f-0032-41e9-902f-f5e2840436c9'
Response
Status codes
Status code | Explanation |
---|---|
200 Ok | Template was retrieved successfully |
401 Unauthorized | The provided authorization credentials are incorrect |
403 Forbidden | This user does not have access to Transactional Emails |
Properties
Properties of responses with status 200
Property | Sub-properties | Description | Data type | Parameters |
---|---|---|---|---|
template | id | The ID that will be used to identify the webhook in future requests | string | |
name | The template’s name | string | ||
subject | The subject line text on the template | string | ||
description | A short description of the template | string | ||
from_email | The email address that will be shown as the sender in the contact’s inbox | string | Verified domain | |
from_name | The name assigned that will appear as the sender in the contact’s inbox | string | ||
reply_email | The email address that will receives replies to emails using this template | string | ||
track_links | This determines whether engagement on links will be recorded on emails using this template | boolean |
|
|
track_clicks | This determines whether engagement on clicks will be recorded on emails using this template | boolean |
|
|
group_by_name | Emails sent using this template will be grouped under this name, instead of the default behaviour of grouping by month. | string | ||
content_html | The HTML body content of the template | string | ||
content_text | The text body content of the template | string | ||
status | The current publication status of the template | enum (string) |
|
|
created_timestamp | The initial date and time that the template was created | date-time | ISO 8601 date-time string | |
updated_timestamp | The latest date and time that the template was updated | date-time | ISO 8601 date-time string |
Properties of responses with 4XX status
Property | Description | Data type | Expected parameters |
---|---|---|---|
code | The HTTP response status code | integer |
|
message | The reason for the failure | string | Valid string |
error | Array containing errors field | JSON |
|
errors | Array containing the failure details | JSON |
|
domain | The classification of the type of error | string |
|
reason | Keyword used to describe the error | string |
|
message | Text describing the reason for the failure | string | Valid string |
locationType | The location where the failure occurred | string |
|
location | The type of validation that failed | string |
|
Example responses
Response with template [200 OK]
{ "template": { "id": "f4e2f274-4853-463a-9053-514121bfc837", "name": "My Own Template", "subject": "Test Subject", "description": "Test Description", "from_email": "john@business.com", "from_name": "Test Message", "reply_email": "john@business.com", "track_links": true, "track_opens": true, "group_by_name": "", "content_html": "Test Template", "content_text": "", "status": "published", "created_timestamp": "2023-08-18T10:03:15.000Z", "updated_timestamp": "2023-08-18T10:03:15.000Z" } }
No template found [400 Bad Request]
{ "code": 412, "message": "Template not found", "error": { "errors": [ { "domain": "global", "reason": "invalid", "message": "Template not found", "locationType": "request", "location": "default" } ] } }
Invalid/Missing authorization credentials [401 Unauthorized]
{ "code": 401, "message": "Login Required", "error": { "errors": [ { "domain": "global", "reason": "required", "message": "Login Required", "locationType": "request", "location": "authorization" } ] } }