Mail API reference

Mail API · Labels

patch/v1/workspaces/{workspace_id}/labels/{id}Auth

Rename or recolour a label

Needs `mail.label.manage`.

Path parameters

workspace_id*string · uuid

Id of the workspace.

id*string · uuid

Label id.

Headers

Idempotency-Keystring

Opaque client-generated string (1–256 chars, `[A-Za-z0-9._:-]`) used to deduplicate retries within a 24h window. A retry with the same key and body returns the original response with `Idempotent-Replay: true`.

Request body

namestring

New name.

Example: "Waiting on customer"

colorstring

New colour as `#rrggbb`; null removes it.

Response · 200

id*string · uuid

Label id.

name*string

Name, unique in the workspace (case-insensitive).

Example: "Needs reply"

color*string

Colour as `#rrggbb`, or null.

Example: "#e5484d"

Example

Request

PATCH https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/labels/{id}
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "name": "Waiting on customer",
  "color": "string"
}

Response

{
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "Needs reply",
  "color": "#e5484d"
}