/v1/workspaces/{workspace_id}/labels/{id}AuthRename or recolour a label
Needs `mail.label.manage`.
Path parameters
workspace_id*string · uuidId of the workspace.
id*string · uuidLabel id.
Headers
Idempotency-KeystringOpaque 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
namestringNew name.
Example: "Waiting on customer"
colorstringNew colour as `#rrggbb`; null removes it.
Response · 200
id*string · uuidLabel id.
name*stringName, unique in the workspace (case-insensitive).
Example: "Needs reply"
color*stringColour 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"
}