Base Path: /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/folders
Version: 3.5.0
A folder is a container that stores messages and other folders. By default, a Communicate Webmail mailbox contains four system folders -- Inbox, Drafts, Sent and Trash. A folder that you create is called a personal folder. You can only create, rename, delete or move personal folders.
Authorization: OAuth 2.0 Bearer token is required to access the resources of this API. Once signed up, credentials and URL to access the OAuth API can be found on My Apps Page.
GET /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/folders/
Retrieves all the folders and sub-folders, for the specified mailbox, in alphabetical order.
Name
Type
Data Type
Description
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully retrieved the list of folders.
401
Your API key or access token has expired or is invalid.
curl -X GET "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/folders/" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'
POST /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/folders/
Creates a new folder in the specified path.
Name
Type
Data Type
Description
Name:
body
required
Type:
body
Data Type:
Description:
Body of the request.
Sample Payload:
{
"folderPath": "INBOX.SubFolder"
}
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
201
Successfully created the folder.
401
Your API key or access token has expired or is invalid.
409
Cannot create the folder as we have detected another folder, with that name, in the specified path.
curl -X POST "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/folders/" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{"folderPath":"INBOX.SubFolder"}'
PUT /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/folders/{folderPath}
Moves the selected folder, along with any messages, to another folder. Also used to rename a folder.
Name
Type
Data Type
Description
Name:
folderPath
required
Type:
path
Data Type:
string
Description:
URL-encoded path of the folder or sub-folder. A period (.) separates the sub-folder from the folder.
Sample Value: Inbox.FolderToBeMoved
Name:
body
required
Type:
body
Data Type:
Description:
Body of the request.
Sample Payload:
{
"folderPath": "destination.FolderToBeMoved"
}
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully moved or renamed the folder.
401
Your API key or access token has expired or is invalid.
409
Cannot move or rename the folder as we have detected another folder, with that name, in the specified path.
curl -X PUT "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/folders/Inbox.FolderToBeMoved" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>' \
-H 'Content-Type: application/json' \
-d '{"folderPath":"destination.FolderToBeMoved"}'
DELETE /actor/current/webmail/DIRECT/mailboxes/{mailboxAddress}/folders/{folderPath}
Deletes the selected folder and moves the folder, along with any messages, to the Trash folder.
Name
Type
Data Type
Description
Name:
folderPath
required
Type:
path
Data Type:
string
Description:
URL-encoded path of the folder or sub-folder. A period (.) separates the sub-folder from the folder.
Sample Value: folderToDelete
Name:
mailboxAddress
required
Type:
path
Data Type:
string
Description:
URL-encoded address of the mailbox.
Sample Value: developer.portal@example.com
200
Successfully deleted the folder.
401
Your API key or access token has expired or is invalid.
curl -X DELETE "https://api.orionhealth.io/actor/current/webmail/DIRECT/mailboxes/developer.portal@example.com/folders/folderToDelete" \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <Access Token>'