# Update a tag

`PATCH /api/tag/{tagId}`

URL: https://repsona.com/api/patch-tag-tagid

## Parameters

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `tagId` | path | integer | required | The ID of the tag. |

## Request body

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `name` | body | string |  | Name of the tag (1 to 255 characters). Must be unique in the space. |
| `type` | body | tag \| reaction \| null |  | What the tag is used for: `tag` is a label you attach to tasks and notes, `reaction` is used for reactions on comments. `null` leaves it unspecified. Omit to keep it unchanged. |
| `color` | body | string \| null |  | Color as a hex code such as `#3b82f6` (up to 20 characters). Omit to keep it unchanged. |

## Request

```sh
curl -X PATCH "https://<space>.repsona.com/api/tag/{tagId}" \
  -H "Authorization: Bearer $REPSONA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Bug",
    "color": "#dc2626"
  }'
```

## Responses

- 200: Updated
- 401: Authentication is required
- 404: Tag not found

## Example response

```json
{
  "ok": true
}
```
