# Update a task stage

`PATCH /v1/task-stages/:stageId`

Bitrix24 REST: `task.stages.update`. Scope: `task`.

Body: title?, color?, afterStageId?. At least one field is required; unknown fields including sort are refused with 400. Color accepts #RRGGBB or RRGGBB and is sent without #. afterStageId:0 moves the stage first. Returns {id,updated:true}. Missing stage: 404.

**Moving a stage first, or moving the group default stage, can rewrite STAGE_ID of all group tasks in the default stage without recording task history.** Stage order and the default affect the whole group. An afterStageId from another entity follows Bitrix24 behavior and places the stage last.

## Example

```bash
curl -X PATCH "https://vibecode.bitrix24.com/v1/task-stages/11" \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title":"Approval","color":"FF0000"}'
```

Writes require a READWRITE key. No automatic retry after timeout: reread the object before retrying. Bitrix24 permission refusals return 403; other business refusals return 422.

[Stage list](/docs/task-stages)
