Delete a Draft

Purpose

This API is used to delete a draft in an account using draftId.

OAuth Scope

Use the scope

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

ALL - Full access to the messages.

DELETE - Delete a draft.

To generate Authtoken, refer here.

Request URL

Method : DELETE

https://mail360.zoho.com/api/accounts/{account_key}/drafts/{draftId}

Path Parameters

  • account_key* string
    • This is a unique key used to identify the account in which the draft has to be deleted. It is generated during account addition.
    • This parameter can be retrieved using the Get All Accounts API.
  • draftId* long
    • This is a unique key used to identify a specific draft within the account.
    • This parameter can be retrieved using the Get All Drafts API.

 

* - Mandatory parameter

Sample Request

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

Sample Success Response

Copied{
  "status": {
    "code": 200,
    "description": "success"
  },
  "data": {
    "draftId": "1674571936262110001"
  }
}

Sample Failure Response

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