# Update Alert

Updates an existing alert configuration. The alert ID must be provided in the request body.

Endpoint: PUT /gateway/lw/api/accounts/{account_id}/alerts
Version: 1.0
Security: x-api-key

## Path parameters:

  - `account_id` (string, required)
    Unique identifier of the Harness account
    Example: "px7xd_BFRCi-pfWPYXVjvw"

## Query parameters:

  - `accountIdentifier` (string, required)
    Account Identifier for authentication and authorization
    Example: "px7xd_BFRCi-pfWPYXVjvw"

## Request fields (application/json):

  - `id` (string, required)
    Unique identifier of the alert to update. This field is required for update operations.
    Example: "550e8400-e29b-41d4-a716-446655440000"

  - `name` (string, required)
    Name of the alert
    Example: "updated-alert-name"

  - `enabled` (boolean)
    Whether the alert is enabled
    Example: true

  - `entity_type` (string, required)
    Type of entity the alert is associated with
    Enum: "autostopping_rule"

  - `recipients` (array, required)
    List of notification recipients. At least one recipient is required.
    Example: [{"type":"email","ids":["user@example.com"]}]

  - `recipients.type` (string, required)
    Type of notification channel
    Enum: "email", "slack"

  - `recipients.ids` (array, required)
    List of recipient identifiers. For email: email addresses. For slack: Slack channel IDs or webhook URLs.
    Example: ["user@example.com"]

  - `events` (array, required)
    List of events that trigger the alert. At least one event is required.
    Example: [{"id":"event-created","event":"autostopping_rule_created"},{"id":"event-warmup-failed","event":"autostopping_warmup_failed"}]

  - `events.id` (string, required)
    Unique identifier for this event configuration. Can be any string to identify this event entry.
    Example: "event-warmup-failed"

  - `events.event` (string, required)
    Type of event that triggers the alert
    Enum: "autostopping_warmup_failed", "autostopping_cooldown_failed", "autostopping_rule_created", "autostopping_rule_updated", "autostopping_rule_deleted"

  - `associated_entities` (array, required)
    List of entities associated with this alert. Use relation_type 'all' to apply to all AutoStopping rules, or 'specific' with entity_id to target specific rules.
    Example: [{"relation_type":"all"}]

## Response 200 fields (application/json):

  - `response` (object, required)

  - `response.message` (string, required)
    Success message


## Response 400 fields
