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

# Get alert history

> Read the mention-rate alert setting and its last deliveries.



## OpenAPI

````yaml GET /v1/monitors/{id}/alerts
openapi: 3.1.0
info:
  title: querying.ai
  description: >-
    One API for every AI answer engine. Every task is asynchronous: submit, then
    collect the result via webhook or polling.
  version: 1.0.0
servers:
  - url: https://api.querying.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/monitors/{id}/alerts:
    get:
      tags:
        - Monitors
      summary: Get alert history
      description: >-
        Whether a mention-rate alert is configured (alertBelowPct, null when
        off), whether its latch is armed, and the last 20 deliveries with their
        status, attempts and last error. An alert fires on the crossing, not on
        the state: it re-arms only after the rate recovers, so one dip sends one
        email.
      operationId: getMonitorAlerts
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Alert configuration and delivery history.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonitorAlertsResponse'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    MonitorAlertsResponse:
      type: object
      properties:
        success:
          type: boolean
          const: true
        data:
          type: object
          properties:
            alertBelowPct:
              type:
                - integer
                - 'null'
            armed:
              type: boolean
              description: >-
                True when the next crossing will send mail. The alert fires on
                the crossing and re-arms after the rate recovers, so a monitor
                parked below its threshold sends one email, not one per run.
            deliveries:
              type: array
              maxItems: 20
              items:
                $ref: '#/components/schemas/MonitorDelivery'
    MonitorDelivery:
      type: object
      description: One alert delivery attempt record from the notification outbox.
      properties:
        id:
          type: string
        status:
          type: string
          description: Outbox state, typically pending, sent or failed.
        attempts:
          type: integer
        createdAt:
          type: string
          format: date-time
        sentAt:
          type:
            - string
            - 'null'
          format: date-time
        lastError:
          type:
            - string
            - 'null'
        payload:
          type: object
          description: >-
            The message that was queued: monitor, rate, threshold, window and
            run count.
    ErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          const: false
        error:
          $ref: '#/components/schemas/ErrorDetail'
    ErrorDetail:
      type: object
      required:
        - code
        - message
      properties:
        code:
          type: string
          description: Stable, safe to branch on. See the Errors guide for the full list.
        message:
          type: string
          description: For humans. May change.
        details:
          description: >-
            Context for the error. An array of `{field, message}` on most
            `VALIDATION_ERROR`s; an object elsewhere (for example `{id}` on
            `RESOURCE_NOT_FOUND`, `retryAfterSec` on 429 and 503 codes). Omitted
            when there is nothing to add.
          oneOf:
            - type: array
              items:
                type: object
                properties:
                  field:
                    type: string
                  message:
                    type: string
            - type: object
              additionalProperties: true
        timestamp:
          type: string
          format: date-time
  responses:
    Unauthorized:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: MISSING_API_KEY
              message: Missing or invalid API key
              timestamp: '2026-07-09T04:12:00.000Z'
    NotFound:
      description: >-
        No monitor with that id for this key, or no scored row with that task
        id. A monitor owned by another account is reported the same way rather
        than as a 403.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            success: false
            error:
              code: NOT_FOUND
              message: No monitor with that id
              timestamp: '2026-09-22T04:12:00.000Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key, sent as `Authorization: Bearer <key>`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.