## Change a status (tenant:forge:write and maintainer, or tenant:forge:admin)

`PATCH /api/forge/v1/projects/{key}/statuses/{id}`

Module: Forge · operationId: `patchForgeStatus` · Tag: Configuration · Auth: access token (`Authorization: Bearer <accessToken>`)

Same permission as creating. `version` is required (409 `version_conflict`); keys never change.

### Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `key` | path | string | yes | Project key (e.g. APP) |
| `id` | path | string (uuid) | yes |  |

### Request body

`application/json` (required)

- `category` (string): Status category (one of `triage`, `todo`, `active`, `on_hold`, `done`, `cancelled`)
- `color` (string): Color token (neutral, primary, …) or #rrggbb
- `isDefault` (boolean): true makes it the default status (moves the default); cannot be unset
- `key` (string): Create: status key; fixed afterwards
- `name` (string): Display name (max length 60)
- `version` (integer): PATCH: the version the change is based on

Example:

```json
{
  "color": "warning",
  "name": "Im Review",
  "version": 1
}
```

### Responses

- **200** Changed (`application/json`)
- **400** Error (`application/json`)
- **403** Error (`application/json`)
- **404** Error (`application/json`)
- **409** Error (`application/json`)

Fields of the 200 answer:

- `category` (string, required): Status category (the group the status belongs to) (one of `triage`, `todo`, `active`, `on_hold`, `done`, `cancelled`)
- `color` (string, required): Color token (neutral, primary, …) or #rrggbb
- `id` (string (uuid), required): Status id
- `isDefault` (boolean, required): Where new items start; exactly one, in triage or todo
- `key` (string, required): Status key; never changes
- `name` (string, required): Display name
- `position` (integer, required): Order in the configuration
- `version` (integer, required): Optimistic-locking version; send it with PATCH

Example 200 answer:

```json
{
  "category": "active",
  "color": "warning",
  "id": "5d1e2f3a-4b5c-4d6e-8f7a-1b2c3d4e5f04",
  "isDefault": false,
  "key": "review",
  "name": "Review",
  "position": 3,
  "version": 1
}
```

### Example request

```bash
curl -X PATCH 'https://api.mbcom.cloud/api/forge/v1/projects/string/statuses/3f2b8c1e-7d4a-4e9b-9c2a-5b1d6e8f0a12' \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H 'Content-Type: application/json' \
  --data '{"color":"warning","name":"Im Review","version":1}'
```
