---
title: "Create a new heartbeat."
method: POST
path: "/v3/heartbeats/{logId}/{id}"
tags: ["Heartbeats"]
---

# Create a new heartbeat.

`POST /v3/heartbeats/{logId}/{id}`

Required permission: `heartbeats_write`

## Path parameters

- `id` string, required
- `logId` string, required

## Request body

- CreateHeartbeat
  - `result` string — The result of this heartbeat. Can be "Healthy, "Degraded", or "Unhealthy". Defaults to "Healthy"
  - `reason` string — If result is "Degraded" or "Unhealthy" you can use this property to specify why.
  - `application` string — Optional string to identify which application logged this message. You can use this if you have multiple applications and services logging to the same log. If not set, the application name "Heartbeats" will be set on all log messages generated from this heartbeat.
  - `version` string — Optional string to identify which version of your application logged this message. If not specified, any errors, warnings, or information messages will get the newest version number created through deployment tracking as with normal log messages.
  - `took` integer — Optional long for specifying how many milliseconds it took to execute the task resulting in this heartbeat. This can be used to get a better overview of how long a scheduled task or service is running or to figure out if the grace period should be increased.
  - `checks` Check[] — A list of checks in this heartbeat.
    - `name` string — The name of the check.
    - `took` integer — Optional long for specifying how many milliseconds it took to execute the check.
    - `result` string — The result of this check. Can be "Healthy, "Degraded", or "Unhealthy". Defaults to "Healthy"
    - `reason` string — If result is "Degraded" or "Unhealthy" you can use this property to specify why.

## Response `200`

Heartbeat was created.

## Other responses

- `400` — Model not valid.
- `401` — API key not valid or no access to resource.
- `402` — Tried to call the heartbeats API without heartbeats enabled or trial expired.
- `404` — The specified log or heartbeat was not found.
- `429` — A maximum of 500 requests per minute and 3600 requests per hour are permitted

---

[API](https://skmtc.net/elmah/apis/elmah-io-api.md) · [All operations](https://skmtc.net/elmah/apis/elmah-io-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/elmah/elmah-io-api/versions/8e9c6e56e4fa/schema)
