Disable IMAP View for a Folder

Purpose

This API disables a specific folder from being viewable and accessible via IMAP.

OAuth Scope

Use the scope

ZohoMail.folders.ALL (or) ZohoMail.folders.UPDATE

to generate the Authtoken.

ALL - Full access to folders.

UPDATE -  Disables a specific folder from being viewable and accessible through IMAP.

Request URL

Method: PUT

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

Path Parameters

  • accountId* long
    • This key identifies the account from which the folder has to be fetched. It is generated during account addition.
    • This parameter can be retrieved from Get all accounts API.
  • folderId* long
    • This key identifies the folder to be disabled from being viewable and accessible through IMAP.
    • This parameter can be retrieved from Get all folders API.

Request Body(JSON Object)

  • mode* string
    • This parameter specifies the type of operation that is to be performed.
    • Provide the value as removeViewableInIMAP.

 

* - Mandatory parameter

Response Codes

Refer here for the response codes and their meaning.

Sample Request

Copiedcurl "https://mail.zoho.com/api/accounts/N****C0CM/folders/2******008001" \
-X PUT \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken *****" \
-d '{
    "mode":"removeViewableInIMAP"
}'