# Update status

`PATCH /api/status/{statusId}`

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

Updates the name/color/closed flag of a status.

## Parameters

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `statusId` | path | integer | required | The ID of the status. |

## Request body

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `name` | body | string |  | Name of the status (1 to 255 characters). |
| `color` | body | string \| null |  | Color of the status as a hex code such as `#3b82f6`. Pass `null` to remove the color. |
| `isClosed` | body | boolean |  | Whether the status counts as done. Tasks in a closed status are treated as completed. Changing it moves the status between the open and closed groups. |

## Request

```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"
  }'
```

## Responses

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

## Example response

```json
{}
```
