Skip to the documentation
API

List labels

Every label on the mailbox, system and user, each with the colour it renders in.

GETapi.openemail.uk/labels

Runs the real call against your workspace, with your own key.

GET /labels

Every label on the mailbox, system and user, each with the colour it renders in.

Label ids

shell
export OE=https://api.openemail.ukexport AUTH="Authorization: Bearer $OPENEMAIL_API_KEY"

Label ids are the mailbox’s own. Read them from the list rather than constructing them. The format is not part of the contract.

Example

Needs labels:read.

curl
curl "$OE/labels" -H "$AUTH"
Response
{  "object": "list",  "data": [    { "object": "label", "id": "INBOX", "name": "Inbox", "type": "system", "color": null },    {      "object": "label",      "id": "USER_INVOICES",      "name": "Invoices",      "type": "user",      "color": { "backgroundColor": "#e8f0fe", "textColor": "#1967d2" }    }  ]}

System labels (INBOX, SENT, SPAM, TRASH, UNREAD, STARRED) come back too. They can be added to and removed from a thread, but not renamed or deleted.