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

# Resolve Alert

> Resolve (close) an alert by its ID or by alias.

Mark an alert as resolved. Sets the status to `resolved` and records the resolution timestamp.

## Resolve by alias

If you set an `alert_alias` when creating the alert, you can resolve it by that alias instead of looking up its UUID. Pass `identifierType=alias`:

```bash theme={null}
# 1. Alert fires - create with an alias you control
curl -X POST "https://api.warrn.io/alerts/" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer warrn_xxx" \
  -d '{
    "name": "High CPU on web-01",
    "description": "CPU > 90% for 5m",
    "severity": "high",
    "team_id": "f1e2d3c4-b5a6-7890-1234-567890abcdef",
    "alert_alias": "prod_system_web-01_cpu_usage_Infra"
  }'

# 2. Issue resolved - resolve by that same alias, no need to track the UUID
curl -X POST "https://api.warrn.io/alerts/prod_system_web-01_cpu_usage_Infra/resolve/?identifierType=alias" \
  -H "Authorization: Bearer warrn_xxx"
```

<Note>
  Only matches alerts currently `open` or `acknowledged`. If the alias has no live alert, the endpoint returns `404 No open alert found with alias: ...` rather than silently no-op'ing on a historical resolved row.
</Note>


## OpenAPI

````yaml POST /alerts/{identifier}/resolve/
openapi: 3.0.3
info:
  title: Warrn API
  version: '1.0'
  description: |
    Public REST API for Warrn. All endpoints are authenticated with an API key
    issued from Settings → API Keys in the Warrn dashboard.
servers:
  - url: https://api.warrn.io
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Alerts
    description: Native Warrn alert endpoints.
  - name: OpsGenie Compatible
    description: Drop-in OpsGenie Alert API v2 compatibility layer.
paths:
  /alerts/{identifier}/resolve/:
    post:
      tags:
        - Alerts
      summary: Resolve Alert
      description: >
        Mark an alert as resolved. Sets the status to `resolved` and records the
        resolution timestamp.


        Looks up the alert by UUID by default. Pass `identifierType=alias` to
        look up by the `alert_alias` set at creation time instead. Only matches
        alerts currently `open` or `acknowledged`; resolved alerts are not
        matched.
      operationId: resolveAlert
      parameters:
        - in: path
          name: identifier
          required: true
          schema:
            type: string
          description: Alert UUID, or the `alert_alias` when `identifierType=alias`.
        - in: query
          name: identifierType
          schema:
            type: string
            enum:
              - id
              - alias
            default: id
      responses:
        '200':
          description: Resolved
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Alert'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    Alert:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
        severity:
          $ref: '#/components/schemas/Severity'
        status:
          $ref: '#/components/schemas/AlertStatus'
        source:
          type: string
          example: integration
        service_id:
          type: string
          format: uuid
          nullable: true
        service_name:
          type: string
          nullable: true
        team_id:
          type: string
          format: uuid
          nullable: true
        team_name:
          type: string
          nullable: true
        tags:
          type: array
          items:
            type: string
        metadata:
          type: object
          additionalProperties: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        acknowledged_at:
          type: string
          format: date-time
          nullable: true
        resolved_at:
          type: string
          format: date-time
          nullable: true
        alert_alias:
          type: string
          nullable: true
        occurrence_count:
          type: integer
    Severity:
      type: string
      enum:
        - low
        - medium
        - high
        - critical
    AlertStatus:
      type: string
      enum:
        - open
        - acknowledged
        - resolved
  responses:
    Unauthorized:
      description: Missing or invalid API key
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Unauthorized
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            type: object
            properties:
              detail:
                type: string
                example: Not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: warrn_xxx
      description: Bearer token using your Warrn API key.

````