Railhook Alerts API

Alert rules and fired alert events

GitHub OpenAPI

Operations 10

PUT /api/v1/projects/{projectId}/alerts/rules/{ruleId} Update alert rule #
DELETE /api/v1/projects/{projectId}/alerts/rules/{ruleId} Delete alert rule #
GET /api/v1/projects/{projectId}/alerts/rules List alert rules #
POST /api/v1/projects/{projectId}/alerts/rules Create alert rule #
POST /api/v1/projects/{projectId}/alerts/events/{eventId}/resolve Resolve a single alert event #
POST /api/v1/projects/{projectId}/alerts/events/resolve-all Resolve all unresolved alert events #
GET /api/v1/projects/{projectId}/alerts/events List alert events (fired alerts) #
GET /api/v1/projects/{projectId}/alerts/events/unresolved-count Count unresolved alerts #
GET /api/v1/alert-conditions List alert conditions #
GET /api/v1/alert-channels List alert channels #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/railhook-io:railhook-io-alerts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

railhook-io-alerts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Railhook Alerts API
  description: 'Send webhooks to the endpoints your customers register, and receive webhooks from any provider, with every attempt on record.


    ## What you can do

    - **Outgoing**: post an event once; Railhook delivers it, signed, to every subscribed endpoint and retries on its own (1m → 24h, 7 attempts). What never arrives lands in Failed Messages.

    - **Incoming**: give each provider its own ingress URL; Railhook verifies the signature and forwards the event to your destinations.

    - **Replay**: send past events again with Time Machine.


    ## Authentication

    - **API key** (`X-API-Key` header): project-scoped calls, including sending events. What the SDKs use.

    - **Bearer token**: account and organization calls made on behalf of a signed-in user.

    - **Portal session** (`Authorization: Bearer rhp_…`): the `/api/v1/portal/**` calls the embedded customer portal makes for one Consumer. Opened by your backend with an API key.


    Guides: /docs/'
  contact:
    name: Railhook
    url: https://github.com/vadymkykalo/railhook
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
  version: 1.0.0
servers:
- url: '{baseUrl}'
  description: Your Railhook installation — the same origin the dashboard runs on
  variables:
    baseUrl:
      description: Scheme and host of your installation, without a trailing slash
      default: http://localhost:8080
security:
- bearerAuth: []
tags:
- name: Alerts
  description: Alert rules and fired alert events
paths:
  /api/v1/projects/{projectId}/alerts/rules/{ruleId}:
    put:
      tags:
      - Alerts
      summary: Update alert rule
      description: Changes the threshold, the channels or the enabled state. Alerts already fired are left as they are.
      operationId: updateAlertRule
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: ruleId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlertRuleRequest'
        required: true
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AlertRuleResponse'
      security:
      - bearerAuth: []
      - apiKey: []
    delete:
      tags:
      - Alerts
      summary: Delete alert rule
      description: Removes the rule. The alerts it has already fired stay in the history.
      operationId: deleteAlertRule
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: ruleId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '204':
          description: Rule deleted
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/projects/{projectId}/alerts/rules:
    get:
      tags:
      - Alerts
      summary: List alert rules
      description: The conditions this project alerts on, and the channels each notifies.
      operationId: listAlertRules
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AlertRuleResponse'
      security:
      - bearerAuth: []
      - apiKey: []
    post:
      tags:
      - Alerts
      summary: Create alert rule
      description: Defines what to watch, the threshold that fires it, and where to send it.
      operationId: createAlertRule
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AlertRuleRequest'
        required: true
      responses:
        '201':
          description: Rule created
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/AlertRuleResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/projects/{projectId}/alerts/events/{eventId}/resolve:
    post:
      tags:
      - Alerts
      summary: Resolve a single alert event
      description: Marks one fired alert as dealt with. The rule keeps watching.
      operationId: resolveEvent
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: eventId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/projects/{projectId}/alerts/events/resolve-all:
    post:
      tags:
      - Alerts
      summary: Resolve all unresolved alert events
      description: Clears the whole backlog at once, for when a known outage fired many.
      operationId: resolveAll
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
                additionalProperties:
                  type: integer
                  format: int32
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/projects/{projectId}/alerts/events:
    get:
      tags:
      - Alerts
      summary: List alert events (fired alerts)
      description: Times a rule actually fired, newest first, resolved and unresolved alike.
      operationId: listAlertEvents
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      - name: page
        in: query
        required: false
        schema:
          type: integer
          format: int32
          default: 0
      - name: size
        in: query
        required: false
        schema:
          type: integer
          format: int32
          default: 20
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/PageAlertEventResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/projects/{projectId}/alerts/events/unresolved-count:
    get:
      tags:
      - Alerts
      summary: Count unresolved alerts
      description: How many fired alerts nobody has resolved — for a badge, not a report.
      operationId: countUnresolved
      parameters:
      - name: projectId
        in: path
        required: true
        schema:
          type: string
          format: uuid
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: object
                additionalProperties:
                  type: integer
                  format: int64
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/alert-conditions:
    get:
      tags:
      - Alerts
      summary: List alert conditions
      description: What a rule can watch, used as its alertType, and which of the rule's thresholdValue, windowMinutes and endpointId each condition reads.
      operationId: listAlertConditions
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AlertConditionResponse'
      security:
      - bearerAuth: []
      - apiKey: []
  /api/v1/alert-channels:
    get:
      tags:
      - Alerts
      summary: List alert channels
      description: 'Where a rule can send its alerts, and the settings each channel takes as a JSON Schema. A property with writeOnly is a secret: stored encrypted and never returned.'
      operationId: listAlertChannels
      responses:
        '200':
          description: OK
          content:
            '*/*':
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/AlertChannelResponse'
      security:
      - bearerAuth: []
      - apiKey: []
components:
  schemas:
    SortObject:
      type: object
      properties:
        empty:
          type: boolean
        sorted:
          type: boolean
        unsorted:
          type: boolean
    PageableObject:
      type: object
      properties:
        offset:
          type: integer
          format: int64
        paged:
          type: boolean
        pageNumber:
          type: integer
          format: int32
        pageSize:
          type: integer
          format: int32
        sort:
          $ref: '#/components/schemas/SortObject'
        unpaged:
          type: boolean
    ConfigProperty:
      type: object
      description: 'One property of a JSON Schema object. writeOnly marks a secret: it is stored encrypted and never returned.'
      properties:
        type:
          type: string
        title:
          type: string
        description:
          type: string
        format:
          type: string
        enum:
          type: array
          items:
            type: string
        default:
          oneOf:
          - type: string
          - type: number
            format: double
        writeOnly:
          type: boolean
    AlertConditionResponse:
      type: object
      properties:
        id:
          type: string
        displayName:
          type: string
        configSchema:
          $ref: '#/components/schemas/ConfigSchema'
          description: Which of a rule's thresholdValue, windowMinutes and endpointId the condition reads
    PageAlertEventResponse:
      type: object
      properties:
        totalPages:
          type: integer
          format: int32
        totalElements:
          type: integer
          format: int64
        size:
          type: integer
          format: int32
        content:
          type: array
          items:
            $ref: '#/components/schemas/AlertEventResponse'
        number:
          type: integer
          format: int32
        sort:
          $ref: '#/components/schemas/SortObject'
        pageable:
          $ref: '#/components/schemas/PageableObject'
        numberOfElements:
          type: integer
          format: int32
        first:
          type: boolean
        last:
          type: boolean
        empty:
          type: boolean
    AlertRuleRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        description:
          type: string
        alertType:
          type: string
          description: The id of a condition listed by GET /api/v1/alert-conditions
          minLength: 1
        severity:
          type: string
          enum:
          - INFO
          - WARNING
          - CRITICAL
        channel:
          type: string
          description: The id of a channel listed by GET /api/v1/alert-channels; IN_APP when left out
        channelConfig:
          type: object
          additionalProperties:
            type: string
          description: Settings named by the channel's configSchema. On update a setting left out is kept; a blank one clears it, except a secret, which is kept so an edit need not re-enter it.
          writeOnly: true
        thresholdValue:
          type: number
          format: double
          description: Required when the condition's configSchema lists it
          exclusiveMinimum: 0
        windowMinutes:
          type: integer
          format: int32
          exclusiveMinimum: 0
        endpointId:
          type: string
          format: uuid
        enabled:
          type: boolean
        muted:
          type: boolean
        snoozedUntil:
          type: string
          format: date-time
      required:
      - alertType
      - name
    ConfigSchema:
      type: object
      description: A JSON Schema object describing the settings a form asks for
      properties:
        type:
          type: string
        properties:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/ConfigProperty'
        required:
          type: array
          items:
            type: string
    AlertEventResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        alertRuleId:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
        endpointId:
          type: string
          format: uuid
        severity:
          type: string
          enum:
          - INFO
          - WARNING
          - CRITICAL
        title:
          type: string
        message:
          type: string
        currentValue:
          type: number
          format: double
        thresholdValue:
          type: number
          format: double
        resolved:
          type: boolean
        resolvedAt:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
    AlertChannelResponse:
      type: object
      properties:
        id:
          type: string
        displayName:
          type: string
        pages:
          type: boolean
          description: Wakes a person, so an INFO rule cannot use it
        configSchema:
          $ref: '#/components/schemas/ConfigSchema'
    AlertRuleResponse:
      type: object
      properties:
        id:
          type: string
          format: uuid
        projectId:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
        alertType:
          type: string
        severity:
          type: string
          enum:
          - INFO
          - WARNING
          - CRITICAL
        channel:
          type: string
        channelConfig:
          type: object
          additionalProperties:
            type: string
          description: The channel's settings, without its secrets
        configuredSecrets:
          type: array
          description: Names of the secret settings that are stored; their values are never returned
          items:
            type: string
        thresholdValue:
          type: number
          format: double
        windowMinutes:
          type: integer
          format: int32
        endpointId:
          type: string
          format: uuid
        enabled:
          type: boolean
        muted:
          type: boolean
        snoozedUntil:
          type: string
          format: date-time
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  securitySchemes:
    bearerAuth:
      type: http
      description: JWT token obtained from /api/v1/auth/login
      scheme: bearer
      bearerFormat: JWT
    apiKey:
      type: apiKey
      description: Project API key for event ingestion
      name: X-API-Key
      in: header
    platformAdminToken:
      type: apiKey
      description: Cluster-operator credential (PLATFORM_ADMIN_TOKEN env var), independent of tenant org membership — required for cross-tenant admin endpoints
      name: X-Platform-Admin-Token
      in: header
    portalSession:
      type: http
      description: Portal session token, returned once by POST /api/v1/projects/{projectId}/consumers/{consumerId}/portal-sessions
      scheme: bearer
      bearerFormat: rhp_…