# Update a board

`PATCH https://evohub.io/api/v1/board/boards/{boardID}`

Part of the [Board API](https://docs.evohub.io/board.md) reference · operationId `updateBoard`.

Changes a board's name, description, visibility, team and
auto-archive setting.

Send `name` and `description` every time: `name` is required, and a
missing `description` is saved as empty. Leave out `visibility` to
keep it, and with it the board's team. When you send `visibility:
team`, send the `team_id` too; moving a board into a team needs the
caller to be in that team.

`auto_archive_days` (1–365) is how long a card may sit in the done
list before it is archived; left out, it is not changed.
`template` and `card_prefix` are ignored here.

Requires the `board: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_5b0c8e1a2f3d4c6b9a7e0d1f2c3b4a59`): The board's ID.

## Request body (required)

Content type: `application/json`

Type: `UpdateBoardRequest`

- `name` (string, required, max length 120)
- `description` (string, max length 500): Saved as empty when left out.
- `visibility` (Visibility, one of `private`, `team`, `org`)
- `team_id` (string)
- `auto_archive_days` (integer, min 1, max 365)
- `template` (string): Ignored.
- `card_prefix` (string): Ignored; a board's prefix never changes.

## Responses

### 200 — The board after the change.

Content type: `application/json`

Type: `BoardEnvelope`

- `data` (object)
  - `board` (Board)
    - `id` (string, example `brd_5b0c8e1a2f3d4c6b9a7e0d1f2c3b4a59`)
    - `name` (string, max length 120)
    - `description` (string, max length 500)
    - `visibility` (Visibility, one of `private`, `team`, `org`)
    - `team_id` (string): The team a `team` board belongs to; `""` for every other board.
    - `card_prefix` (string, example `PLT`): The front of every card reference on the board, as in `PLT-42`. Never changes.
    - `created_by` (string)
    - `created_at` (string (date-time))
    - `updated_at` (string (date-time))
    - `auto_archive_days` (integer, min 1, max 365): Days a card may sit in the done list before it is archived. `0` in the board list.

### 400 — The body is not JSON for this endpoint (`INVALID_BODY`), or a field breaks a rule (`VALIDATION_ERROR`): the name, description, visibility and team rules of creating a board, or `auto_archive_days` outside 1–365.

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `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`

- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `not found`)
  - `request_id` (string)

### 403 — The key lacks `board:board:write`, or the board is being moved into a team the caller is not in (`FORBIDDEN`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `not found`)
  - `request_id` (string)

### 404 — It does not exist, or it is on a board the caller cannot see (`NOT_FOUND`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `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`

- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `not found`)
  - `request_id` (string)

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

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `NOT_FOUND`)
  - `message` (string, required, example `not found`)
  - `request_id` (string)

## Example request

```bash
curl -X PATCH 'https://evohub.io/api/v1/board/boards/brd_5b0c8e1a2f3d4c6b9a7e0d1f2c3b4a59' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <TOKEN>' \
  -d '{
  "name": "Platform",
  "team_id": "team_8b2c4d6e-1f3a-4b5c-9d7e-0a1b2c3d4e5f",
  "visibility": "team",
  "description": "Infrastructure and platform work.",
  "auto_archive_days": 90
}'
```
