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

# Update Column

> Change a column's name, question, answer type or options.

> [!NOTE]
>
> **Preview.** This endpoint is available to organisations in the Wordsmith MCP pilot. Other organisations receive `403 mcp_not_enabled`. See the [preview overview](/preview).

Changes one column of a report. Send only the fields you want to change. Fields you leave out keep their current value.

Changing `prompt`, `type` or `options` makes the column's answers out of date. On a report created through the API over files, every cell in the column goes back to `empty` until the next [run](/api-reference/reports/run-report); cells a person reviewed in the app keep their answer. A report that computes straight away (one that follows a repository, or one made in the app with auto-run on) recomputes the column. Changing only `name` keeps the cells as they are.

This endpoint is REST only.

## Authentication

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

## Path parameters

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

The report id.

**column\_id** `string` *required*

The column id.

## Body parameters

**name** `string`

The new column header.

**prompt** `string`

The new question. Its cells go out of date, or are recomputed on a report that computes automatically.

**type** `string`

The new answer type: `text`, `number`, `date`, `boolean`, `single_select` or `multi_select`. Its cells go out of date, or are recomputed on a report that computes automatically.

**options** `string[]`

The allowed answers of a `single_select` or `multi_select` column, at least one. They replace the current ones. Required when you change `type` to a select type. An empty list is refused with `400`: a select column always has answers to choose from.

Changing `prompt`, `type` or `options` invalidates the column's answers. On most reports its cells read `empty` until the next [run](/api-reference/reports/run-report). On a report that computes automatically, such as one that follows a repository or one built in the app, the column is recomputed straight away and uses credits, as editing it in the app does.

## Response

Returns `200` with the updated [column](/proposed/objects#report).

```bash cURL theme={null}
curl -X PATCH "https://api.wordsmith.ai/api/v1/reports/f544ddfc-24d5-4947-939c-ba2d1bcba35b/columns/a7335c50-fd65-45ec-90d7-b0b0341eb148" \
  -H "Authorization: Bearer sk-ws-api1-your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "On what date does the contractual term end? Ignore any holding-over period."
  }'
```

```json Response theme={null}
{
  "id": "a7335c50-fd65-45ec-90d7-b0b0341eb148",
  "name": "Term end date",
  "prompt": "On what date does the contractual term end? Ignore any holding-over period.",
  "type": "date",
  "options": []
}
```

## Errors

| Status | `error_code` | When |
| - | - | - |
| 400 | `invalid_request_body` | The body sets no field, `type` is not a known value, or `options` is empty, missing for a new select type, or set for another type. |
| 400 | `process_limit_exceeded` | The report computes automatically, and recomputing the column would cost more credits than one operation may use. Nothing changes. |
| 403 | `forbidden` | The caller can read the report but cannot edit it. |
| 404 | `resource_not_found` | No report or column with these ids, or the caller cannot read the report. |


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