List email templates
Purpose
You can use this API to list the required number of email templates in your ZeptoMail account.
Request URL
Method : GET
https://api.zeptomail.com/v1.1/mailagents/{mailagent-alias}/templates?offset=*&limit=*
*- Add the desired values.
OAuth scope
Any one of the following scopes can be used to access this API
scope=Zeptomail.MailTemplates.All
or
scope=Zeptomail.MailTemplates.READ
ALL - This will give the basic CRUD access too all the email templates APIs.
The steps to generate and use OAuth token can be found here.
Path parameters
Parameter | Type | Description |
mailagent-alias | String | Unique alias value given to the Mail Agent. It is available in the Setup info section of your Mail Agent. |
offset | Int | Positional value of the template starting from which the set of templates have to be listed. Offset value should be the previous positional value of the desired template. Example : If you wish to retrieve the 9th template, offset should be 8. |
limit | Int | Denotes the number of templates that need to listed. |
Sample request
Copiedcurl "https://api.zeptomail.com/v1.1/mailagents/{mailagent-alias}/templates/?offset=0&limit=10' \
-X GET
-H "Authorization : Zoho-oauthtoken ***"\
-H "Content-Type : application/json" \
Sample response
Copied{
"metadata": {
"offset": 0,
"count": 2,
"limit": 10
},
"data": [
{
"created_time": "12 Dec 2022 11:18 PM",
"template_name": "Invite mail update",
"template_key": "ea36f19a.5ecaba242f82149d.k1.1fb151c0-7a45-11ed-a51f-8a90785fcf47.185077368dc",
"modified_time": "12 Dec 2022 11:18 PM",
"subject": "Invite mail subject update",
"template_alias": "invite-email"
},
{
"created_time": "08 Dec 2022 01:33 PM",
"template_name": "Test Template",
"template_key": "ea36f19a.5ecaba242f82149d.k1.d5202e70-76ce-11ed-b259-525400256d50.184f0c302d7"
"modified_time": "08 Dec 2022 01:33 PM",
"subject": "Event Reminder Testing {{{event_title_val}}}",
"template_alias": "testing"
}
],
"message": "OK"
}