Edit Template

This API allows you to modify a template.

Request Type

  • PUT

Request URL

https://campaigns.zoho.com/emailapi/v1/templates/{template_id}

Content-Type

application/json

List of Request Body Attributes

ParametersData TypeDescription
template_name*StringName of the template.
content*StringContent of the template.
content_type*StringShows the type of content between 'html' and 'text'.

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.
errorsJSON ObjectContains the error details of the API such as 'code' and 'message'.

Possible Errors

Error CodeDescription
400701Invalid template ID provided.
400702Invalid template name provided.
400703Invalid content type.
400704Content not provided.
400705A template with the same name already exists.

Sample Request Payload

Copied{
  "template_name": "Newsletter Template",
  "content": "<h1>Hello new world</h1>",
  "content_type": "html"
}

Sample Response - Suceess

Copied{
  "response": {
    "code": 200704,
    "message": "Successfully edited the template"
  }
}

Sample Response - Failure

Copied{
  "errors": [
    {
      "code": 500701,
      "message": "An error occurred in Templates API"
    }
  ]
}