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

ParametersData TypeDescription
responseJSON ObjectContains the response details of the API.
codeIntegerSuccess or failure code.
messageStringSuccess or failure message returned by the API.
template_detailsJSON ObjectContains details about each template.
content_typeStringShows the type of content between 'html' and 'text'.
nameStringName of the template.
idStringUnique ID of the template which can be used in APIs.
contentStringShows the content of the template.
zuidIntegerUser ID of the Zoho Account's user from whose account this API was called.
errorsJSON ObjectContains the error details of the API such as 'code' and 'message'.

Possible Errors

Error CodeDescription
400701Invalid 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&gt;</h1></body></html>",
    "zuid": 123456789
  }
}

Sample Response - Failure

Copied{
  "errors": [
    {
      "code": 400701,
      "message": "Invalid template ID provided"
    }
  ]
}