Get Template Details
This API allows you to get the details of a particular template including the content.
Request Type
- GET
Request URL
https://campaigns.zoho.com/emailapi/v1/templates/{template_id}
Content-Type
application/json
List of Response Body Attributes
Parameters | Data Type | Description |
response | JSON Object | Contains the response details of the API. |
code | Integer | Success or failure code. |
message | String | Success or failure message returned by the API. |
template_details | JSON Object | Contains details about each template. |
content_type | String | Shows the type of content between 'html' and 'text'. |
name | String | Name of the template. |
id | String | Unique ID of the template which can be used in APIs. |
content | String | Shows the content of the template. |
zuid | Integer | User ID of the Zoho Account's user from whose account this API was called. |
errors | JSON Object | Contains the error details of the API such as 'code' and 'message'. |
Possible Errors
Error Code | Description |
400701 | Invalid template ID provided. |
Sample Response - Success
Copied{
"response": {
"code": 200702,
"message": "Successfully obtained the template details"
},
"template_details": {
"content_type": "html",
"name": "Newsletter Template",
"id": "214548000000286156",
"content": "<html><head><meta content=\"text/html;charset=UTF-8\" http-equiv=\"Content-Type\"></head><body><h1>Hello world/h1></h1></body></html>",
"zuid": 123456789
}
}
Sample Response - Failure
Copied{
"errors": [
{
"code": 400701,
"message": "Invalid template ID provided"
}
]
}