> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-fix-nav-issues.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Alert

> Creates a new alert



## OpenAPI

````yaml /_specs/hyperdx-openapi.json post /api/v2/alerts
openapi: 3.0.0
info:
  title: HyperDX External API
  description: API for managing HyperDX alerts and dashboards
  version: 2.0.0
servers:
  - url: https://api.hyperdx.io
    description: Production API server
  - url: /
    description: Current server
security:
  - BearerAuth: []
tags:
  - name: Dashboards
    description: Endpoints for managing dashboards and their visualizations
  - name: Alerts
    description: Endpoints for managing monitoring alerts
paths:
  /api/v2/alerts:
    post:
      tags:
        - Alerts
      summary: Create Alert
      description: Creates a new alert
      operationId: createAlert
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateAlertRequest'
            examples:
              tileAlert:
                summary: Create a tile-based alert
                value:
                  dashboardId: 65f5e4a3b9e77c001a567890
                  tileId: 65f5e4a3b9e77c001a901234
                  threshold: 100
                  interval: 1h
                  source: tile
                  thresholdType: above
                  channel:
                    type: webhook
                    webhookId: 65f5e4a3b9e77c001a789012
                  name: Error Spike Alert
                  message: Error rate has exceeded 100 in the last hour
      responses:
        '200':
          description: Successfully created alert
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AlertResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error or validation failure
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateAlertRequest:
      type: object
      required:
        - threshold
        - interval
        - source
        - thresholdType
        - channel
      properties:
        dashboardId:
          type: string
          example: 65f5e4a3b9e77c001a567890
        tileId:
          type: string
          example: 65f5e4a3b9e77c001a901234
        threshold:
          type: number
          example: 100
        interval:
          type: string
          example: 1h
        source:
          type: string
          enum:
            - tile
            - search
          example: tile
        thresholdType:
          type: string
          enum:
            - above
            - below
          example: above
        channel:
          type: object
          properties:
            type:
              type: string
              example: webhook
            webhookId:
              type: string
              example: 65f5e4a3b9e77c001a789012
        name:
          type: string
          example: Test Alert
        message:
          type: string
          example: Test Alert Message
    AlertResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Alert'
    Error:
      type: object
      properties:
        message:
          type: string
    Alert:
      type: object
      properties:
        id:
          type: string
          example: 65f5e4a3b9e77c001a123456
        name:
          type: string
          example: High Error Rate
        message:
          type: string
          example: Error rate exceeds threshold
        threshold:
          type: number
          example: 100
        interval:
          type: string
          example: 15m
        thresholdType:
          type: string
          enum:
            - above
            - below
          example: above
        source:
          type: string
          enum:
            - tile
            - search
          example: tile
        state:
          type: string
          example: inactive
        channel:
          type: object
          properties:
            type:
              type: string
              example: webhook
            webhookId:
              type: string
              example: 65f5e4a3b9e77c001a789012
        team:
          type: string
          example: 65f5e4a3b9e77c001a345678
        tileId:
          type: string
          example: 65f5e4a3b9e77c001a901234
        dashboard:
          type: string
          example: 65f5e4a3b9e77c001a567890
        savedSearch:
          type: string
          nullable: true
        groupBy:
          type: string
          nullable: true
        silenced:
          type: boolean
          nullable: true
        createdAt:
          type: string
          format: date-time
          example: '2023-01-01T00:00:00.000Z'
        updatedAt:
          type: string
          format: date-time
          example: '2023-01-01T00:00:00.000Z'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````