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

# Update Alert Rules

> Replace the full alert-rule set

Saves the full set of alert rules.

## Example Request

```json theme={null}
{
  "rules": [
    {
      "id": "physical-critical-all",
      "enabled": true,
      "title": "Critical threats across all assets",
      "severity_threshold": ["critical", "high"],
      "asset_ids": null,
      "threat_types": null,
      "max_distance_km": null,
      "mute_interval_hours": 1,
      "email_enabled": true,
      "sms_enabled": false,
      "slack_enabled": true,
      "user_receiver_type": "all",
      "external_receivers": []
    }
  ]
}
```


## OpenAPI

````yaml put /v1/alerts/rules
openapi: 3.1.0
info:
  title: Intrace Events Monitoring API
  version: 0.1.0
  description: >
    External asset monitoring and event intelligence API derived from the
    internal

    Intrace events investigations platform.


    This public API is tenant-scoped by API key and intentionally does not
    expose

    internal identifiers such as case_id or investigation_id.
servers:
  - url: https://api.intrace.ai
security:
  - ApiKeyAuth: []
tags:
  - name: Assets
  - name: Threats
  - name: Incidents
  - name: Alerts
  - name: Reports
  - name: Event Intelligence
paths:
  /v1/alerts/rules:
    put:
      tags:
        - Alerts
      summary: Update alert rules
      operationId: updateAlertRules
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateAlertRulesRequest'
      responses:
        '200':
          description: Updated rules.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertRulesResponse'
components:
  schemas:
    UpdateAlertRulesRequest:
      type: object
      properties:
        rules:
          type: array
          items:
            $ref: '#/components/schemas/AlertRule'
      required:
        - rules
    AlertRulesResponse:
      type: object
      properties:
        rules:
          type: array
          items:
            $ref: '#/components/schemas/AlertRule'
      required:
        - rules
    AlertRule:
      type: object
      properties:
        id:
          type: string
        enabled:
          type: boolean
        title:
          type: string
        severity_threshold:
          type: array
          items:
            type: string
            enum:
              - critical
              - high
              - medium
              - low
              - negligible
        asset_ids:
          type: array
          items:
            type: string
          nullable: true
        threat_types:
          type: array
          items:
            type: string
          nullable: true
        max_distance_km:
          type: number
          nullable: true
        mute_interval_hours:
          type: number
        email_enabled:
          type: boolean
        sms_enabled:
          type: boolean
        slack_enabled:
          type: boolean
        user_receiver_type:
          type: string
          enum:
            - none
            - all
            - other
        external_receivers:
          type: array
          items:
            $ref: '#/components/schemas/AlertRuleExternalReceiver'
        created_at:
          type: string
      required:
        - id
        - enabled
        - title
        - severity_threshold
        - mute_interval_hours
        - email_enabled
        - sms_enabled
        - slack_enabled
        - user_receiver_type
        - external_receivers
    AlertRuleExternalReceiver:
      type: object
      properties:
        email:
          type: string
          nullable: true
        phone:
          type: string
          nullable: true
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````