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

# Update Tags

> Update one or more tags

Updates one or more tags. You pass a list of tag update objects, so you can update multiple tags in a single request. Each object carries the tag id plus the fields you want to change.

The request body is an array of tag update objects.

<ParamField body="id" type="string" required>
  UUID of the tag to update
</ParamField>

<ParamField body="name" type="string">
  Updated tag name
</ParamField>

<ParamField body="tag_category_id" type="string">
  Updated category ID for the tag
</ParamField>

## Response

Returns an array of the updated tags.

<ResponseField name="id" type="string">
  Tag UUID
</ResponseField>

<ResponseField name="name" type="string">
  Tag name
</ResponseField>

<ResponseField name="organization_id" type="string">
  ID of the organization the tag belongs to
</ResponseField>

<ResponseField name="tag_category_id" type="string">
  ID of the category this tag belongs to, or `null` if uncategorized
</ResponseField>

<ResponseField name="category_name" type="string">
  Name of the tag's category, or `null` if uncategorized
</ResponseField>

<ResponseField name="usage_count" type="integer">
  Number of data items this tag is applied to
</ResponseField>

<RequestExample>
  ```python Python theme={null}
  import requests

  response = requests.patch(
      "https://api.atomscale.ai/tags/",
      headers={
          "X-API-KEY": "YOUR_API_KEY",
          "Content-Type": "application/json"
      },
      json=[
          {
              "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
              "name": "critical",
              "tag_category_id": "b1a2c3d4-1111-2222-3333-444455556666"
          }
      ]
  )
  tags = response.json()
  ```

  ```bash cURL theme={null}
  curl -X PATCH "https://api.atomscale.ai/tags/" \
    -H "X-API-KEY: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '[
      {
        "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
        "name": "critical",
        "tag_category_id": "b1a2c3d4-1111-2222-3333-444455556666"
      }
    ]'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  [
    {
      "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
      "name": "critical",
      "organization_id": "org_abc123",
      "tag_category_id": "b1a2c3d4-1111-2222-3333-444455556666",
      "category_name": "Review Status",
      "usage_count": 12
    }
  ]
  ```
</ResponseExample>
