Login / Register
GET
/api/public/v1/email-folders

List email folders and mailboxes

Where mail is filed and where it arrives. `folders` is the four every mailbox has — `inbox`, `archive`, `junk`, `trash`, marked `system`, whose ids are what a message’s `folder` holds — followed by the custom folders the company has made, referenced by id. `mailboxes` is every address assigned to the token’s employee, with how much is unread in each; an address missing here is one nobody has assigned them, which is also why its mail is nowhere else.

Required scope

The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Dev Tools → API, to an assistant or CLI sign-in when you approve or edit it under Dev Tools, and to a teammate under Employee → Permissions.

email:messages:read
GETExample request
curl
curl -X GET "https://www.pxb.app/api/public/v1/email-folders" \
  -H "Authorization: Bearer your_access_token"
200Example response
json
{
  "message": "Email folders retrieved successfully!",
  "content": {
    "folders": [
      {
        "id": "inbox",
        "name": "Inbox",
        "system": true
      },
      {
        "id": "archive",
        "name": "Archive",
        "system": true
      },
      {
        "id": "junk",
        "name": "Junk",
        "system": true
      },
      {
        "id": "trash",
        "name": "Trash",
        "system": true
      },
      {
        "id": "efd_11",
        "name": "Suppliers",
        "system": false,
        "createdAt": "2026-05-01T10:00:00.000Z"
      }
    ],
    "mailboxes": [
      {
        "id": "ead_2",
        "address": "sam@acme.example",
        "support": false,
        "expiresAt": null,
        "unreadCount": 3
      },
      {
        "id": "ead_9",
        "address": "support@acme.example",
        "support": true,
        "expiresAt": null,
        "unreadCount": 12
      }
    ]
  }
}

In the console

The same thing done by hand, for anyone comparing the API against the screen they already use.

Email → Folders
/email/inbox