Rename a Folder

Purpose 

This API is used to rename a folder.

OAuth Scope

Use the scope

MailApps.folders.ALL (or) MailApps.folders.UPDATE

ALL - Full access to folders.

UPDATE - Rename folder.

To generate Authtoken, refer here.

Request URL

Method: PUT

https://mail360.zoho.com/api/accounts/{account_key}/folders/{folderId}

Path Parameters

  • account_key* string
    • This key is used to identify the mailbox. It is generated during account addition.
    • This parameter can be fetched from Get all accounts API.
  • folderId* long
    • This parameter refers to the ID of the folder where the operation has to be performed.
    • This parameter can be fetched 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 rename.
  • folderName* string
    • This parameter refers to the new name of the folder.

Sample Request

Copiedcurl "https://mail360.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":"rename",
    "folderName":"testnewupdate"
}'

Sample Response

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