---
title: "Create a heartbeat monitor and get its ping URL"
method: POST
path: "/heartbeats"
tags: ["Checks"]
---

# Create a heartbeat monitor and get its ping URL

`POST /heartbeats`

## Request

- Base URL: `https://realuptime.io/api/v1`
- URL: `https://realuptime.io/api/v1/heartbeats`
- Auth: HTTP bearer

A heartbeat monitor waits for a job to report in. It counts against the same monitor allowance as every other check. pingUrl carries the monitor's token and is returned by this response only; store it where the job runs.

## Request body

- object
  - `name` string, required
  - `intervalSeconds` number
  - `graceSeconds` integer
  - `statusPageId` string, uuid

## Response `201`

The monitor and its ping URL, shown once.

- object
  - `heartbeat` object, required
    - `id` string, required
    - `account_id` string, required
    - `name` string, required
    - `type` 'heartbeat', required
    - `interval_seconds` number, required
    - `grace_seconds` number, required
    - `last_ping_at` string, nullable, required
    - `heartbeat_state` 'operational' | 'down', required
  - `pingUrl` string, required

## Other responses

- `400`: Malformed body, or an interval below the plan's floor. - `RU-3001` Invalid check request: https://realuptime.io/kb/errors/ru-3001 - `RU-3006` Interval below plan floor: https://realuptime.io/kb/errors/ru-3006
- `401`: Missing, invalid, or revoked API key. - `RU-1001` Missing API credentials: https://realuptime.io/kb/errors/ru-1001 - `RU-1002` Invalid or revoked API key: https://realuptime.io/kb/errors/ru-1002
- `403`: The account's monitor allowance is exhausted for its plan. This key is read-only, or this key is IP-restricted and the request came from outside its allowlist. - `RU-2004` Plan monitor limit reached: https://realuptime.io/kb/errors/ru-2004 - `RU-1004` API key is read-only: https://realuptime.io/kb/errors/ru-1004 - `RU-1007` API key is restricted to an IP allowlist: https://realuptime.io/kb/errors/ru-1007
- `404`: statusPageId is not a page on this account. - `RU-5009` Status page or component not found: https://realuptime.io/kb/errors/ru-5009
- `429`: Per-key rate limit exceeded, a Free account's per-account request budget exceeded, or too many failed authentication attempts. - `RU-2003` API write rate limit exceeded: https://realuptime.io/kb/errors/ru-2003 - `RU-2001` Too many failed authentication attempts: https://realuptime.io/kb/errors/ru-2001

---

[API](https://skmtc.dev/realuptime/apis/realuptime-api-v1.md) · [All operations](https://skmtc.dev/realuptime/apis/realuptime-api-v1/llms.txt) · [OpenAPI document](https://skmtc.dev/realuptime/apis/realuptime-api-v1/revisions/51e481084700?raw)
