Labels

Update a label

Requires scope: manage or inbox (inbox only in a signed-in dashboard session; no API key or app can hold it). Renaming a label renames it on every thread that carries it.

patch/v1/labels/{id}

Request

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

Path parameters

idstring required

Label id (lbl_…).

Request body

namestring

Renaming a label renames it on every thread that carries it.

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

A new colour from the same palette of 12. Left out, the colour stays as it is; a request must carry name, color or both.

Response

The updated 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.