get_user_folders

The get_user_folders method retrieves a list of a user's current and deleted folders.

Syntax

{
    <credentials object> 
    "user": <mailbox_name>
}

Request fields for get_user_folders

The following fields can be used in the get_user_folders method:

Field nameObligationDefinition/Value
userRequiredThe user's account name.

Response fields for get_user_folders

The following fields may be returned in response to the get_user_folders method:

Field nameObligationDescription/Value
deleted_foldersReturned if success = trueA list of the user's deleted folders.
errorReturned if success = falseA text string that explains the error.
error_numberReturned if success = falseA number that represents the error.
foldersReturned if success = trueA list of the user's existing folders. Sub folders are listed by their whole path, and are dot separated.
successAlways returnedIndicates whether the request was successful or not. Allowed values are true and false.

Examples for get_user_folders

Request

{
  "credentials": {
    "user": "[email protected]",
    "password": "pencil75"
  },
  "user": "[email protected]"
}

Response

{
  "success": true,
  "folders": [
    "INBOX",
    "Spam",
    "Drafts",
    "Trash",
    "Sent Items",
    "2011",
    "plus ça change",
    "2011.Q2",
    "2011.Q1",
    "2011.Q3",
    "2011.Q4",
    "2011.Q1.January Pictures of Kitties"
  ],
  "deleted_folders": [
    "plus ça change.bananas"
  ]
}