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

# Delete an alert

> Soft-deletes an alert by setting its status to DELETED.
The alert and its channels are deactivated but retained for audit.




## OpenAPI

````yaml /api-reference/v1/alerts-v1.yaml delete /alerts/{alert_id}
openapi: 3.0.3
info:
  title: Coval Alerts API
  version: 1.0.0
  description: |
    API for managing alerts — metric-based alerting rules that evaluate
    on run completion and dispatch notifications to configured channels.

    Alerts support:
    - Per-run metric checks (single value, run average, run fraction)
    - AND/OR condition logic across multiple metrics
    - Multi-channel notifications (Slack, email, webhook, human review)
    - Cooldown/deduplication
    - Custom message templates
  contact:
    name: Coval API Support
    email: support@coval.dev
    url: https://docs.coval.ai
  license:
    name: Proprietary
    url: https://coval.dev/terms
servers:
  - url: https://api.coval.dev/v1
security:
  - ApiKeyAuth: []
tags:
  - name: Alerts
    description: CRUD operations for alert definitions
  - name: Alert Events
    description: Alert evaluation event history
paths:
  /alerts/{alert_id}:
    delete:
      tags:
        - Alerts
      summary: Delete an alert
      description: |
        Soft-deletes an alert by setting its status to DELETED.
        The alert and its channels are deactivated but retained for audit.
      operationId: deleteAlert
      parameters:
        - $ref: '#/components/parameters/AlertId'
      responses:
        '204':
          description: Alert deleted
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/PermissionDenied'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    AlertId:
      name: alert_id
      in: path
      required: true
      schema:
        type: string
        pattern: ^[0-9A-Z]{26}$
      description: Alert ULID
      example: 01HZ0EXAMPLE00000000000000
  responses:
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: UNAUTHENTICATED
              message: Authentication failed
              details:
                - field: X-API-Key
                  description: Invalid or missing API key
    PermissionDenied:
      description: Permission Denied
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: PERMISSION_DENIED
              message: Insufficient permissions
              details:
                - field: permissions
                  description: 'Required scope: alerts:read'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: NOT_FOUND
              message: Alert not found
              details:
                - field: alert_id
                  description: Alert '01HZ0EXAMPLE00000000000000' not found
    InternalError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            error:
              code: INTERNAL
              message: Internal server error
              details:
                - description: An unexpected error occurred
  schemas:
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
            - details
          properties:
            code:
              type: string
              enum:
                - INVALID_ARGUMENT
                - UNAUTHENTICATED
                - PERMISSION_DENIED
                - NOT_FOUND
                - ALREADY_EXISTS
                - INTERNAL
            message:
              type: string
              description: Human-readable error message
            details:
              type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                    nullable: true
                  description:
                    type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication

````