> ## Documentation Index
> Fetch the complete documentation index at: https://docs.leavo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Tag

> Update an existing tag

## Endpoint

<Card>
  <strong>PUT</strong> `/backend/tags/{id}`
</Card>

## Path Parameters

<ParamField path="id" type="string" required>
  Tag ID
</ParamField>

## Body Parameters

<ParamField body="name" type="string">
  Tag name
</ParamField>

<ParamField body="color" type="string">
  Color in hexadecimal
</ParamField>

## Request Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT "https://api.leavo.ai/backend/tags/tag-uuid" \
    -H "Authorization: Bearer your_api_key_here" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "High Priority",
      "color": "#DC2626"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.leavo.ai/backend/tags/tag-uuid', {
    method: 'PUT',
    headers: {
      'Authorization': 'Bearer your_api_key_here',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      name: 'High Priority',
      color: '#DC2626'
    })
  });
  ```
</CodeGroup>

## Response

```json theme={null}
{
  "success": true,
  "data": {
    "id": "tag-uuid",
    "name": "High Priority",
    "color": "#DC2626",
    "updated_at": "2024-01-15T14:00:00Z"
  }
}
```
