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

# Create Alert

> Admin or owner. An empty `tool_name` or `client_name` means every one of them.



## OpenAPI

````yaml https://api.getmcpulse.com/docs/openapi.json post /v1/mcps/{id}/alerts
openapi: 3.1.0
info:
  title: MCPulse API
  version: 1.0.0
  description: >-
    Analytics for MCP servers.


    The API is the product — the dashboard is one client and an MCP server will
    be another. Every number here is computed server-side so that both get the
    same answer.


    **Two kinds of auth.** Ingest uses an MCP API key (`mp_live_…`). Everything
    else uses a Supabase access token from the browser session.
servers:
  - url: https://mcpulse-production.up.railway.app
    description: MCPulse API
security: []
tags:
  - name: ingest
    description: What the customer's server sends
  - name: mcps
    description: MCPs and ownership
  - name: metrics
    description: Everything the dashboard reads
  - name: keys
    description: Ingest API keys
  - name: account
    description: Account, team and usage
paths:
  /v1/mcps/{id}/alerts:
    post:
      tags:
        - alerts
      summary: Create Alert
      description: >-
        Admin or owner. An empty `tool_name` or `client_name` means every one of
        them.
      parameters:
        - schema:
            type: string
            format: uuid
          required: true
          name: id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 80
                metric:
                  type: string
                  enum:
                    - first_call_rate
                    - error_rate
                    - empty_rate
                    - crash_rate
                    - slow_rate
                    - avg_response_bytes
                    - calls
                comparator:
                  type: string
                  enum:
                    - below
                    - above
                threshold:
                  type: number
                tool_name:
                  type: string
                  nullable: true
                  minLength: 1
                client_name:
                  type: string
                  nullable: true
                  minLength: 1
                min_calls:
                  type: integer
                  minimum: 1
                  maximum: 100000
                channels:
                  type: array
                  items:
                    type: string
                    enum:
                      - in_app
                      - email
                  minItems: 1
                enabled:
                  type: boolean
              required:
                - name
                - metric
                - comparator
                - threshold
                - channels
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                nullable: true
        '401':
          description: Invalid or missing token
        '404':
          description: Not found, or not yours

````