Labels

Create a label

Requires scope: manage or inbox (inbox only in a signed-in dashboard session; no API key or app can hold it). A name (unique in the workspace, ignoring case) and a colour from a fixed palette of 12.

post/v1/labels

Request

  • Base URL: https://api.mails.ai
  • URL: https://api.mails.ai/v1/labels
  • Auth: HTTP bearer

Request body

namestring required

Unique within the workspace, ignoring case. 1-64 characters.

color'gray' | 'red' | 'orange' | 'amber' | 'yellow' | 'green' | 'teal' | 'cyan' | 'blue' | 'indigo' | 'purple' | 'pink'

The label's colour, one of 12 palette names. Left out, it is gray.

Response

The created label.

idstring required

Label id (lbl_…).

namestring required

Unique in the workspace, ignoring case.

color'gray' | 'red' | 'orange' | 'amber' | 'yellow' | 'green' | 'teal' | 'cyan' | 'blue' | 'indigo' | 'purple' | 'pink' required

The label's colour, one of 12 palette names: gray unless another was chosen.

created_atstring date-time required

When the label was created (UTC).

updated_atstring date-time required

When the label was last changed with PATCH, even by a request that left it as it was. Equal to created_at on a label never patched.

Changes

No recorded changes to this operation across all 1 revision of this API.