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

# Update Tags

> This endpoint updates an attribute tag for the given user. The tag associated with the key in the request will be created or updated with the values passed in.

<Note>
  Please review proper request headers [here](/consumer/usage/headers).
</Note>

### Parameters

<ParamField body="merchant_id" type="string">
  Only return tags for this merchant
</ParamField>

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

<ParamField body="values" type="array(string)">
  Array of attributes tags
</ParamField>

### Response

<Snippet file="entities/tag.mdx" />

<RequestExample>
  ```bash theme={null}
  curl https://api.thanxsandbox.com/tags \
    -X PUT \
    -H "Content-Type: application/json"  \
    -H "Accept-Version: v4.0" \
    -H "Accept: application/json" \
    -H "Authorization: Bearer ${token}" \
    -H "X-ClientId: ${client_id}" 
    -d '{
      "tag": {
        "key": "allergens",
        "merchant_id": "weroifs",
        "values": [
          "gluten",
          "soy",
          "dairy",
          "honey"
        ]
      }
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "tag": {
      "id": "werwerr",
      "user_id": "werofsdf",
      "merchant_id": "weroif",
      "key": "allergens",
      "values": ["gluten", "soy", "dairy", "honey"]
    }
  }
  ```
</ResponseExample>
