PUT - Delete Copy While Email Forwarding

Purpose

This API is used to delete the Zoho Mail copy of the email after forwarding the email. This can be done by the admin for a user or by the user for themselves.

OAuth Scope

Use the scope

Using admin authentication:

ZohoMail.organization.accounts.ALL (or) ZohoMail.organization.accounts.UPDATE

Using user authentication:

ZohoMail.accounts.ALL (or) ZohoMail.accounts.UPDATE

to generate the Authtoken.

ALL - Grants full access to accounts.

UPDATE - Grants access to update account information.

Request URL

Method: PUT

Using admin authentication:

https://mail.zoho.com/api/organization/{zoid}/accounts/{accountId}

Using user authentication:

https://mail.zoho.com/api/accounts/{accountId}

Path Parameters

  • zoid long
    • This parameter denotes the unique Zoho Organization Identifier for the organization.
    • This parameter can be retrieved from the Get Organization Details API.
    • This parameter is mandatory while using admin authentication.
  • accountId* long
    • This parameter is used to identify the account whose details are retrieved.
    • This parameter can be retrieved from the Get User Account Details API.

 

Request Body ( JSON Object)

  • zuid long
    • This denotes the unique Zoho User Identifier for the user.
    • This parameter can be fetched from Get All Org Users Details API.
    • This parameter is mandatory while using admin authentication.
  • mode* string
    • This parameter represents the type of operation that is to be performed.
    • Provide the value as deleteZohoMailCopy.
  • deleteCopy boolean
    • This parameter specifies whether the copy of the email forwarded has to be deleted or not.
    • Possible value:
      • true - delete the copy.
      • false - do not delete the copy. 
    • The default value is true.

 

* - Mandatory parameter

Response Codes

Refer here for the response codes and their meaning.

 

Sample Request (Using Admin Authentication)

Copiedcurl "https://mail.zoho.com/api/organization/12345678/accounts/2560636000000008002" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****"
-d '{
   "zuid": "11111111",
   "deleteCopy": "false",
   "mode": "deleteZohoMailCopy"
}'

Sample request (Using User Authentication)

Copiedcurl "https://mail.zoho.com/api/accounts/2560636000000008002" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****"
-d '{
   "deleteCopy": "false",
   "mode": "deleteZohoMailCopy"
}'

Sample Response

Copied{
"status": {
"code": 200,
"description": "success"
}
}