users/email_accounts/folders

Supported methods

List methods:GET

Instance methods:GETPOST

Sub-resources

messages

Folders list

GET: List folders in an email account

Returns folders existing in a given email account.

GET https://api.context.io/lite/users/id/email_accounts/label/folderstest it
idUnique id of a user accessible through your API key
labelThe label property of the email account instance. You can use 0 as an alias for the first email account of a user.

Response body

[
  {
    "name": stringName of the folder,
    "symbolic_name": stringIf the email server supports special-use mailboxes (see RFC 6154), this property exposes the special attribute (Not present if no value),
    "nb_messages": numberNumber of messages that exist in this folder (not returned when include_names_only=1),
    "nb_unseen_messages": numberNumber of unread messages in this folder (not returned when include_names_only=1),
    "delimiter": stringCharacter used to delimit hierarchy in the folder name, ie /
    "resource_url": stringThe URL of the folder list resource,
  },
  ...
]

Folder instance

GET: Returns information about a given folder

This call exposes information for a given folder.

GET https://api.context.io/lite
/users/id/email_accounts/label/folders/foldertest it
idUnique id of a user accessible through your API key
labelThe label property of the email account instance. You can use 0 as an alias for the first email account of a user.
folderThe full folder path using / as the path hierarchy delimiter.

Parameters

nametypedescription
optional:
delimiterstringIf / isn't fancy enough as a hierarchy delimiter when specifying the folder you want to obtain, you're free to use what you want, just make sure you set this delimiter parameter to tell us what you're using.

Response body

{
  "name": stringName of the folder, 
  "symbolic_name": stringIf the email server supports special-use mailboxes (see RFC 6154), this property exposes the special attribute (Not present if not known),
  "nb_messages": numberNumber of messages that exist in this folder,
  "nb_unseen_messages": numberNumber of unread messages in this folder,
  "delimiter": stringCharacter used to delimit hierarchy in the folder name
  "resource_url": stringThe URL of the folder resource,
}

POST: Create a folder on an email account

A new folder can be added to an email account by POSTing the desired path under the email_accounts/folders resource.

POST https://api.context.io/lite
/users/id/email_accounts/label/folders/foldertest it
idUnique id of a user accessible through your API key
labelThe label property of the email account instance. You can use 0 as an alias for the first email account of a user.
folderThe full folder path using / as the path hierarchy delimiter.

Parameters

nametypedescription
optional:
delimiterstringIf / isn't fancy enough as a hierarchy delimiter when specifying the folder you want to create, you're free to use what you want, just make sure you set this delimiter parameter to tell us what you're using.