Overview
This request lists all transactional templates, as well as meta-data for the pagination of results. 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 |
---|---|
GET | https://api.everlytic.net/transactional/email/v1/templates/ |
Example Request
curl --location 'https://api.everlytic.net/transactional/email/v1/templates'
Response
Status codes
Status code | Explanation |
---|---|
200 Ok | Templates were 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 |
---|---|---|---|---|
type | Type of resource listed | string |
|
|
meta | total | Total amount of pages returned | integer | |
per_page | Number of webhooks listed per page | integer | ||
current_page | The current page number | integer | ||
last_page | The number of the last page of the results. | integer | ||
from | The number of the previous page | integer | ||
to | The number of the next page | integer | ||
links | first | The URL for the first page of results | string|null | |
last | The URL for the final page of results | string|null | ||
prev | The URL for the previous page | string|null | ||
next | The URL for the next page | string|null | ||
data | 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 templates [200 OK]
{ "type": "templates", "meta": { "total": 2, "per_page": 2, "current_page": 1, "last_page": 1, "from": 1, "to": 1 }, "links": { "first": "https://api.everlytic.net/transactional/email/api/v1/templates?page=1", "last": "https://api.everlytic.net/transactional/email/api/v1/templates?page=1", "prev": null, "next": null }, "data": [ { "id": "b93d670f-0032-41e9-902f-f5e2840436c9", "name": "Untitled Template", "subject": "Secret Email", "description": "Char", "from_email": "[email protected]", "from_name": "Test", "reply_email": "[email protected]", "track_links": true, "track_opens": true, "group_by_name": "", "content_html": "Hello world", "content_text": "", "status": "published", "created_timestamp": "2023-08-18T14:20:56.000Z", "updated_timestamp": "2023-08-18T14:20:56.000Z" }, { "id": "f4e2f274-4853-463a-9053-514121bfc837", "name": "Untitled Template", "subject": "Test Subject", "description": "Test Description", "from_email": "[email protected]", "from_name": "Test Message", "reply_email": "[email protected]", "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" } ] }
Successful response with no templates [200 OK]
{ "type": "templates", "meta": { "total": 0, "per_page": 1, "current_page": 1, "last_page": 0, "from": 1, "to": 1 }, "links": { "first": null, "last": null, "prev": null, "next": null }, "data": [] }
Invalid/Missing authorization credentials [401 Unauthorized]
{ "code": 401, "message": "Login Required", "error": { "errors": [ { "domain": "global", "reason": "required", "message": "Login Required", "locationType": "request", "location": "authorization" } ] } }