> ## 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.

# Colour rows

> Mark rows with one of 16 row colours, or clear their colour.

Gives up to 500 rows a colour, or clears it. The colour marks the row for everyone who reads the report, as the row colour in the app does. It does not approve, flag or lock any cell, and runs ignore it.

This works on any report you can edit, including one whose rows follow a repository: colouring a row does not change it.

The MCP tool `manage_report` does the same with the `color_rows` 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

**row\_ids** `string[]` *required*

The rows to colour, from `1` to `500` row ids. Take them from [List rows](https://wordsmithai.mintlify.site/api-reference/reports/list-rows.md).

**color** `string | null` *required*

One of `red`, `orange_dark`, `orange`, `yellow`, `green`, `teal`, `cyan`, `blue_light`, `blue`, `gray_blue`, `violet`, `purple`, `fuchsia`, `pink`, `rose` or `gray`. `null` clears the colour. To say what a colour means, give it a label with [Label a row colour](https://wordsmithai.mintlify.site/api-reference/reports/color-labels.md).

## Response

Returns `200`. `row_ids` lists the rows that now have the colour. `failed_row_ids` lists rows whose colour could not be saved; send them again. The rows in `row_ids` are saved either way.

`skipped_rows` lists the ids that were not coloured, each with a `reason`: `not_a_row_id` when the id is not a row id, and `not_in_report` when no top-level row of this report has it (a row of another report, a child row, or a row deleted meanwhile). Don't send skipped ids again.

```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/rows/color" \
  -H "Authorization: Bearer sk-ws-api1-your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "row_ids": ["cbe87a67-8eb8-4811-a825-4b0b30c7e013"],
    "color": "teal"
  }'
```

```json Response theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "row_ids": ["cbe87a67-8eb8-4811-a825-4b0b30c7e013"],
  "failed_row_ids": [],
  "skipped_rows": [],
  "color": "teal"
}
```

## Errors

| Status | `error_code` | When |
| - | - | - |
| 400 | `invalid_request_body` | `row_ids` is empty or has more than 500 ids, or `color` is not one of the 16 colours or `null`. |
| 400 | `bad_request` | None of `row_ids` is a row of this report. Nothing was coloured. |
| 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.