Get All Folders
Purpose
This API is used to list all the folders created in or imported to the mailbox.
OAuth Scope
Use the scope
MailApps.folders.ALL (or) MailApps.folders.READ
ALL - Full access to folders.
READ - Fetch all the folders.
To generate Authtoken, refer here.
Request URL
Method: GET
https://mail360.zoho.com/api/accounts/{account_key}/folders
Path Parameters
- account_key* string
- This key is used to identify the mailbox from which the data has to be fetched. It is generated during account addition.
- This parameter can be fetched from Get all accounts API.
* - Mandatory parameter
Sample Request
Copiedcurl "https://mail360.zoho.com/api/accounts/N7A**0CM/folders" \
-X GET \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization:Zoho-oauthtoken ***" \
Sample Success Response
Copied{
"status": {
"code": 200,
"description": "success"
},
"data": [
{
"path": "/Outbox",
"isArchived": 0,
"folderName": "Outbox",
"folderType": "Outbox",
"folderId": "2452000000002035"
},
{
"path": "/Drafts",
"previousFolderId": "2452000000002051",
"isArchived": 0,
"folderName": "Drafts",
"folderType": "Drafts",
"folderId": "2452000000002037"
},
{
"path": "/Sent",
"previousFolderId": "2452000000003005",
"isArchived": 0,
"folderName": "Sent",
"folderType": "Sent",
"folderId": "2452000000002039"
},
{
"path": "/Trash",
"previousFolderId": "2452000000003089",
"isArchived": 0,
"folderName": "Trash",
"folderType": "Trash",
"folderId": "2452000000002041"
},
{
"path": "/Noreply",
"previousFolderId": "2452000000003167",
"isArchived": 0,
"folderName": "Noreply",
"folderType": "Inbox",
"folderId": "2452000000002044"
}
]
}
Sample Failure Response
Copied{
"status": {
"code": 500,
"description": "Oops! Something went wrong. Try again later"
},
"data": {}
}