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

# Update Email Account Tag

> Update an existing email account tag's name and color

<Note>
  Update an existing tag's name or color. To **create a new tag**, use the [Create Tag](/api-reference/email-account-tags/create-new) endpoint instead — it does not require an ID.
</Note>

## Query Parameters

<ParamField query="api_key" type="string" required>
  Your SmartLead API key
</ParamField>

## Request Body

<ParamField body="id" type="number" required>
  Tag ID of the existing tag to update. Get tag IDs from [Get All Tags](/api-reference/email-account-tags/get-all).
</ParamField>

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

<ParamField body="color" type="string" required>
  Hex color code for the tag (e.g., `#FF5733`). Must be a valid 6-character hex color with `#` prefix.
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://server.smartlead.ai/api/v1/email-accounts/tag-manager?api_key=YOUR_KEY" \
    -H "Content-Type: application/json" \
    -d '{"id": 1, "name": "Primary Senders", "color": "#4CAF50"}'
  ```
</RequestExample>

## Response Codes

<ResponseField name="200" type="Success">
  Request successful
</ResponseField>

<ResponseField name="400" type="Bad Request">
  Invalid request parameters or malformed request body
</ResponseField>

<ResponseField name="401" type="Unauthorized">
  Invalid or missing API key
</ResponseField>

<ResponseField name="422" type="Validation Error">
  Request validation failed. Check parameter types and constraints.
</ResponseField>

<ResponseExample>
  ```json 200 - Success theme={null}
  {
    "ok": true,
    "data": {
      "id": 1,
      "name": "Primary Senders",
      "color": "#4CAF50"
    }
  }
  ```

  ```json 401 - Unauthorized theme={null}
  {
    "message": "Invalid API Key"
  }
  ```
</ResponseExample>
