Delete a Template

Purpose

This API is used to delete a template in an account using templateId.

OAuth Scope

Use the scope

MailApps.messages.ALL (or) MailApps.messages.DELETE

ALL - Full access to the messages.

DELETE - Delete a template.

To generate Authtoken, refer here.

Request URL

Method: DELETE

https://mail360.zoho.com/api/accounts/{account_key}/templates/{templateId}

Path Parameters

  • account_key* string
    • This key is used to identify the account in which the draft has to be deleted. It is generated during account addition.
    • This parameter can be fetched using the Get All Accounts API.
  • templateId* long
    • This ID is used to identify the specific template in the account.
    • This parameter be fetched using the Get All Templates API.

 

* - Mandatory parameter

Sample Request

Copiedcurl "https://mail360.zoho.com/api/accounts/x7k04**M05r/templates/167457193626211***1" \
-X DELETE \
-H "Content-Type: application/json" \
-H "Authorization: Zoho-oauthtoken ***" \

Sample Success Response

Copied{
  "status": {
    "code": 200,
    "description": "success"
  },
  "data": {
    "templateId": "1674632567383110001"
  }
}

Sample Failure Response

Copied{
  "status": {
    "code": 500,
    "description": "Internal Error"
  },
  "data": {
    "moreInfo": "Internal Error"
  }
}