POST
/api/public/v1/email-folders

Create an email folder

Adds a custom folder for the company. Names are unique, so a duplicate is a conflict rather than a second folder.

Required scope

The access token must carry this scope. A token missing it gets 403 Forbidden. Grant them to an API client under Settings → Company → API, and to a teammate under Employee → Permissions.

email:messages:write

Request Body

PropertyTypeDescription
namestringUp to 120 characters.
POSTExample request
curl
curl -X POST "https://www.pxb.app/api/public/v1/email-folders" \
  -H "Authorization: Bearer your_access_token" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Suppliers"
  }'
200Example response
json
{
  "message": "Email folder created successfully!",
  "content": {
    "folder": {
      "id": "efd_11",
      "name": "Suppliers"
    }
  }
}
409Example response
json
{
  "message": "A folder with that name already exists."
}

In the console

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

Email → Folders
/email/inbox
  1. Add a folder from the mail sidebar.