> ## Documentation Index
> Fetch the complete documentation index at: https://wordsmithai.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Label a row colour

> Say what a row colour means in a report, such as teal for rows one person owns.

Gives one row colour a colour label, changes it, or removes it. Everyone who reads the report sees the label next to the colour in the app, and exports name it next to each row's colour. A report has at most one label per colour.

[Colour rows](https://wordsmithai.mintlify.site/api-reference/reports/color-rows.md) gives rows the colour. [Get report](https://wordsmithai.mintlify.site/api-reference/reports/get-report.md) returns every label in `row_color_labels`, and [List rows](https://wordsmithai.mintlify.site/api-reference/reports/list-rows.md) returns each row's label as `color_label`.

The MCP tool `manage_report` does the same with the `set_color_label` action.

## Authentication

Requires an API key, or an OAuth token with `reports:write`. The caller needs edit access to the report.

## Path parameters

**report\_id** `string` *required*

The report id.

## Body parameters

**color** `string` *required*

The row colour to label: one of `red`, `orange_dark`, `orange`, `yellow`, `green`, `teal`, `cyan`, `blue_light`, `blue`, `gray_blue`, `violet`, `purple`, `fuchsia`, `pink`, `rose` or `gray`.

**label** `string | null` *required*

Up to 40 characters, such as `JS`. Spaces around it are removed. `null` or a blank string removes the label.

## Response

Returns `200` with `row_color_labels`: every colour label of the report after the change, keyed by row colour. A colour without a label is absent. Sending the label a colour already has changes nothing.

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST "https://api.wordsmith.ai/api/v1/reports/4d845617-3fad-483d-8eac-eba886e6e31f/color-labels" \
  -H "Authorization: Bearer sk-ws-api1-your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "color": "teal",
    "label": "JS"
  }'
```

```json Response theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "row_color_labels": {
    "red": "Needs partner review",
    "teal": "JS"
  }
}
```

## Errors

| Status | `error_code` | When |
| - | - | - |
| 400 | `invalid_request_body` | `color` is not one of the 16 colours, or `label` is longer than 40 characters. |
| 403 | `forbidden` | The caller can read the report but cannot edit it. |
| 404 | `resource_not_found` | No report with this id, or the caller cannot read the report. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.