Get All Templates
Purpose
Use this API to retrieve all the templates associated with a given account.
OAuth Scope
Use the scope
MailApps.messages.ALL (or) MailApps.messages.READ
ALL - Full access to the messages.
READ - Read a template.
To generate Authtoken, refer here.
Request URL
Method: GET
https://mail360.zoho.com/api/accounts/{account_key}/templates
Path Parameters
- account_key* string
- This is a unique key used to identify the account. It is generated during account addition.
- This parameter can be fetched using the Get All Accounts API.
Query Parameters
- start int
- This parameter specifies the starting sequence number of the templates to be retrieved.
- The default value is 0.
- limit int
- This parameter specifies the number of templates to be retrieved from the start value mentioned.
- The value can be between 1 to 100.
- The default value is 25.
- sortorder boolean
- This parameter specifies the sort order of the retrieved list, allowing you to indicate whether ascending or descending order is required.
- The value can be
- true, for ascending order
- false, for descending order
- The default value is false.
- sortBy string
- This parameter specifies on which basis the sorting of the list of templates should be done.
- The values can be
- date
- messageId
- size
- The default value is date.
- view string
- Provide this parameter if you wish to see the total number of templates in the account.
- The value is count.
* - Mandatory parameter
Sample Request
Copiedcurl "https://mail360.zoho.com/api/accounts/N7A**0CM/templates" \
-X GET \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken ***" \
Sample Response
Copied{
"status": {
"code": 200,
"description": "success"
},
"data": [
{
"fromAddress": "rebecca@zylker.com",
"toAddress": "<paula@zylker.com>",
"ccAddress": "<david@zylker.com>",
"bccAddress": "<rebecca@zylker.com>",
"templateId": "1674632567383110001",
"folderId": "23450000000006001",
"sender": "kavyamail360.1@gmail.com",
"summary": "",
"status": "1",
"subject": "new Mail testing",
"size": "281",
"receivedTime": "1674632566998",
"sentDateInGMT": "1674612766000",
"flagid": "flag_not_set",
"hasAttachment": 0
}
]
}