Better Stack Heartbeats API

The Heartbeats API from Better Stack — create and manage heartbeat monitors that alert when a cron job or background task stops reporting.

Business capability
Observability Management BC-4220.20

Operations 6

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /heartbeats List heartbeat monitors · List heartbeats #
Ask an LLM
“Which heartbeats are set up in my Better Stack account?”
“Can I page through all of my cron job heartbeats a few at a time?”
Tell an agent
List all of my heartbeats.
Show page {page} of my heartbeats, {per_page} per page.
POST /heartbeats Create a heartbeat for a scheduled job · Create heartbeat #
Ask an LLM
“How do I get alerted when a cron job stops checking in?”
“Can a new heartbeat allow a grace period before it alerts anyone?”
Tell an agent
Create a heartbeat called {name} that expects a ping every {period} seconds.
Set up a new heartbeat {name} expecting a ping every {period} seconds with a {grace} second grace period.
GET /heartbeats/{id} Get a heartbeat's details · Get heartbeat #
Ask an LLM
“What period and grace settings does one specific heartbeat have?”
“Is a particular heartbeat currently paused or reporting as down?”
Tell an agent
Show me the details of heartbeat {id}.
Look up the configuration of heartbeat {id}.
PATCH /heartbeats/{id} Change an existing heartbeat's settings · Update heartbeat #
Ask an LLM
“Can I change how often an existing heartbeat expects a ping?”
“How do I pause alerts on a heartbeat I already set up?”
Tell an agent
Update heartbeat {id} so {name} expects a ping every {period} seconds.
Pause existing heartbeat {id} named {name} with period {period} seconds.
DELETE /heartbeats/{id} Delete a heartbeat · Remove heartbeat #
Ask an LLM
“Can I remove a heartbeat for a job I've retired?”
“What happens to a heartbeat once I delete it permanently?”
Tell an agent destructive · confirm first
Delete heartbeat {id}.
Remove heartbeat {id} from my account for good.
GET /heartbeats/{id}/availability Get a heartbeat's availability · Heartbeat availability #
Ask an LLM
“What uptime percentage has my cron job heartbeat achieved?”
“How reliable has a scheduled job been at checking in on time?”
Tell an agent
Get the availability figures for heartbeat {id}.
Report how available heartbeat {id} has been.

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/betterstack:betterstack-heartbeats-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

betterstack-heartbeats-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Better Stack Uptime Heartbeats API
  description: 'Programmatic access to Better Stack''s uptime monitoring, heartbeat monitoring,

    incident management, status pages, escalation policies, and on-call surfaces.

    Responses follow the JSON:API specification.


    This document is a best-effort reconstruction from Better Stack''s public

    documentation and is not exhaustive. Refer to

    https://betterstack.com/docs/uptime/api/ for authoritative reference.'
  version: 2.0.0
  contact:
    name: Better Stack
    url: https://betterstack.com/docs/uptime/api/getting-started/
  license:
    name: Proprietary
servers:
- url: https://uptime.betterstack.com/api/v2
  description: Better Stack Uptime API (v2 surface — monitors, heartbeats, status pages, on-call)
- url: https://uptime.betterstack.com/api/v3
  description: Better Stack Uptime API (v3 surface — incidents)
security:
- bearerAuth: []
tags:
- name: Heartbeats
paths:
  /heartbeats:
    get:
      tags:
      - Heartbeats
      summary: List heartbeats
      operationId: listHeartbeats
      parameters:
      - $ref: '#/components/parameters/PerPage'
      - $ref: '#/components/parameters/Page'
      responses:
        '200':
          description: A page of heartbeats.
    post:
      tags:
      - Heartbeats
      summary: Create heartbeat
      operationId: createHeartbeat
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HeartbeatCreate'
      responses:
        '201':
          description: Created heartbeat.
  /heartbeats/{id}:
    parameters:
    - $ref: '#/components/parameters/Id'
    get:
      tags:
      - Heartbeats
      summary: Get heartbeat
      operationId: getHeartbeat
      responses:
        '200':
          description: Heartbeat.
    patch:
      tags:
      - Heartbeats
      summary: Update heartbeat
      operationId: updateHeartbeat
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/HeartbeatCreate'
      responses:
        '200':
          description: Updated heartbeat.
    delete:
      tags:
      - Heartbeats
      summary: Remove heartbeat
      operationId: deleteHeartbeat
      responses:
        '204':
          description: Removed.
  /heartbeats/{id}/availability:
    parameters:
    - $ref: '#/components/parameters/Id'
    get:
      tags:
      - Heartbeats
      summary: Heartbeat availability
      operationId: getHeartbeatAvailability
      responses:
        '200':
          description: Availability summary.
components:
  parameters:
    Id:
      name: id
      in: path
      required: true
      schema:
        type: string
    PerPage:
      name: per_page
      in: query
      schema:
        type: integer
        minimum: 1
        maximum: 50
    Page:
      name: page
      in: query
      schema:
        type: integer
        minimum: 1
  schemas:
    HeartbeatCreate:
      type: object
      required:
      - name
      - period
      properties:
        name:
          type: string
        period:
          type: integer
          description: Expected interval in seconds.
        grace:
          type: integer
          description: Grace period in seconds.
        call:
          type: boolean
        sms:
          type: boolean
        email:
          type: boolean
        push:
          type: boolean
        team_wait:
          type: integer
        paused:
          type: boolean
        policy_id:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Bearer token. Provide either a Global API Token (account-wide) or a

        team-scoped Uptime API Token. Issued from Better Stack → API tokens.

        '