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

# Update label

> Update a label's name or color.

## Request

<ParamField path="label" type="string" required>
  The label ID.
</ParamField>

<ParamField body="name" type="string" required>
  The new label name. Maximum 255 characters.
</ParamField>

<ParamField body="color" type="string" required>
  Hex color code (e.g., `#FF5733`). Must match the format `#RRGGBB`.
</ParamField>

## Response

Returns the updated label. Same shape as one entry in [`GET /labels`](/api-reference/endpoint/list-labels).

<RequestExample>
  ```bash theme={null}
  curl -X PUT https://app.trypost.it/api/labels/c3d4e5f6-a7b8-9c0d-1e2f-3a4b5c6d7e8f \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Launch Day",
      "color": "#22c55e"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "c3d4e5f6-a7b8-9c0d-1e2f-3a4b5c6d7e8f",
    "name": "Launch Day",
    "color": "#22c55e",
    "created_at": "2025-01-10 08:00:00",
    "updated_at": "2025-01-10 09:00:00"
  }
  ```
</ResponseExample>
