List folders
GET
/v1/folderscurl "https://api.tuskmail.africa/v1/folders" \
-H "X-API-Key: $TK_API_KEY" \
-u "$MAILBOX_EMAIL:$APP_PASSWORD"200 OK
{
"data": [
{ "id": "b1", "name": "Inbox", "role": "inbox", "total": 140, "unread": 6 },
{ "id": "b2", "name": "Sent", "role": "sent", "total": 312, "unread": 0 }
]
}| Name | Type | Description |
|---|---|---|
id | string | Folder id. Accepted anywhere a folder is requested. |
name | string | Display name. |
role | string | null | System role such as inbox, sent, drafts, junk or trash. Custom folders have no role. |
total / unread | integer | Message counts. |
Wherever the API takes a folder, you can pass a role name (inbox, sent, drafts, junk, trash) or a folder id.