# Add a column

`POST https://evohub.io/api/v1/retro/boards/{boardID}/columns`

Part of the [Retro API](https://docs.evohub.io/retro.md) reference · operationId `createRetroColumn`.

Adds a column to an active board. `name` is required; `emoji` and
`color` are free text the console shows; `position` orders columns
(lowest first) among those with the same `sort_order`.

Requires the `retro:board:write` scope.

## Authorization

Any one of:

- `bearerKey`
- `headerKey`

Where:

- `bearerKey`: HTTP Bearer — An EvoHub API key (`evohub_…`) as a bearer token.
- `headerKey`: API key in the header `X-API-Key` — An EvoHub API key (`evohub_…`).

## Path parameters

- `boardID` (string, required, example `brd_3f9a1c7e2b8d4a60`): The board's ID.

## Request body (required)

Content type: `application/json`

Type: `CreateColumnRequest`

- `name` (string, required)
- `emoji` (string)
- `color` (string)
- `position` (integer)

## Responses

### 201 — The column was added.

Content type: `application/json`

Type: `object`

- `success` (boolean)
- `data` (Column)
  - `id` (string, example `col_1a2b3c4d5e6f7a80`)
  - `board_id` (string)
  - `name` (string)
  - `emoji` (string)
  - `color` (string)
  - `position` (integer)
  - `sort_order` (integer)
  - `created_at` (string (date-time))
  - `cards` (array of Card): Only when a whole board is read.
    - `id` (string, example `crd_8d0c4b6e1a9f2357`)
    - `board_id` (string)
    - `column_id` (string)
    - `content` (string)
    - `created_at` (string (date-time))
    - `reactions` (array of Reaction): Only when a whole board is read; left out when there are none.
    - `comments` (array of Comment): Only when a whole board is read; left out when there are none.
    - `vote_score` (integer): The net of agree (+1) and disagree (-1) votes.
    - `my_vote` (integer, one of `-1`, `0`, `1`): The caller's own vote on the card.

### 400 — The body is not JSON (`INVALID_BODY`), or `name` is missing or blank (`MISSING_NAME`).

Content type: `application/json`

Type: `Error`

- `success` (boolean, value `false`): Sent by Retro itself; refusals before the request reaches Retro (401, 429) carry only `error`.
- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `board not found`)
  - `request_id` (string)

### 401 — No API key was sent, or it is unknown, revoked or expired (`UNAUTHORIZED`).

Content type: `application/json`

Type: `Error`

- `success` (boolean, value `false`): Sent by Retro itself; refusals before the request reaches Retro (401, 429) carry only `error`.
- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `board not found`)
  - `request_id` (string)

### 403 — The key lacks the scope this endpoint needs (`FORBIDDEN`).

Content type: `application/json`

Type: `Error`

- `success` (boolean, value `false`): Sent by Retro itself; refusals before the request reaches Retro (401, 429) carry only `error`.
- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `board not found`)
  - `request_id` (string)

### 404 — The board does not exist, or the caller cannot see it (`NOT_FOUND`).

Content type: `application/json`

Type: `Error`

- `success` (boolean, value `false`): Sent by Retro itself; refusals before the request reaches Retro (401, 429) carry only `error`.
- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `board not found`)
  - `request_id` (string)

### 409 — The board is closed and its content cannot change (`BOARD_CLOSED`). Reopen it first.

Content type: `application/json`

Type: `Error`

- `success` (boolean, value `false`): Sent by Retro itself; refusals before the request reaches Retro (401, 429) carry only `error`.
- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `board not found`)
  - `request_id` (string)

### 429 — Too many requests (`RATE_LIMITED`). Wait for `Retry-After` seconds.

Headers:

- `Retry-After` (integer): Seconds to wait before retrying.

Content type: `application/json`

Type: `Error`

- `success` (boolean, value `false`): Sent by Retro itself; refusals before the request reaches Retro (401, 429) carry only `error`.
- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `board not found`)
  - `request_id` (string)

### 500 — Something went wrong on EvoHub's side (`INTERNAL_ERROR`). Retry later.

Content type: `application/json`

Type: `Error`

- `success` (boolean, value `false`): Sent by Retro itself; refusals before the request reaches Retro (401, 429) carry only `error`.
- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `board not found`)
  - `request_id` (string)

## Example request

```bash
curl -X POST 'https://evohub.io/api/v1/retro/boards/brd_3f9a1c7e2b8d4a60/columns' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <TOKEN>' \
  -d '{
  "name": "What went well",
  "color": "green",
  "emoji": "🎉",
  "position": 0
}'
```
