Heartbeats: Create

This documentation entry provides a clear guide for developers on how to create a new heartbeat monitor using the API, including the necessary parameters, headers, and expected response.

Endpoint

POST /api/heartbeats

Create a new heartbeat monitor with the specified parameters.

Request

HTTP Request

POST https://uptimekeep.com/api/heartbeats

Headers

Header
Type
Description

Authorization

String

Bearer token for API authentication.

Content-Type

String

Must be set to multipart/form-data for file uploads.

Parameters

Parameter
Type
Required
Description

name

String

Yes

Name of the heartbeat monitor.

run_interval

Integer

No

The expected interval between runs.

run_interval_type

String

No

Type of interval. Allowed values: seconds, minutes, hours, days.

run_interval_grace

Integer

No

Grace period allowed after the expected interval.

run_interval_grace_type

String

No

Type of grace period. Allowed values: seconds, minutes, hours, days.

is_ok_notifications

Array

No

Array of notification handler IDs for successful checks.

is_enabled

Boolean

No

Enable or disable the heartbeat monitor.

Example of a request:

Response

A successful response returns a JSON object containing the unique identifier of the newly created heartbeat monitor.

Response Example

Fields

Data Object

Field
Type
Description

id

Integer

Unique identifier for the new monitor.

Errors

If the request fails, the API will return an error message with an appropriate HTTP status code, such as 400 Bad Request if required parameters are missing or invalid.

Last updated