# ステータスの更新

`PATCH /api/status/{statusId}`

URL: https://repsona.com/ja/api/patch-status-statusid

ステータスの名前・色・完了扱いかどうかを更新します。

## パラメーター

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `statusId` | path | integer | 必須 | ステータスの ID です。 |

## リクエストボディ

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `name` | body | string |  | ステータスの名前です (1〜255 文字)。 |
| `color` | body | string \| null |  | ステータスの色です (`#3b82f6` のような 16 進数のカラーコード)。`null` を渡すと色を外します。 |
| `isClosed` | body | boolean |  | 完了扱いのステータスにするかどうかです。完了扱いのステータスのタスクは完了として数えられます。変更すると、未完了と完了のグループ間でステータスが移ります。 |

## リクエスト

```sh
curl -X PATCH "https://<space>.repsona.com/api/status/{statusId}" \
  -H "Authorization: Bearer $REPSONA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "To do",
    "color": "#64748b"
  }'
```

## レスポンス

- 200: Status updated
- 400: Invalid request payload
- 401: Authentication is required
- 404: Status not found

## レスポンスの例

```json
{}
```
