---
title: "Heartbeat"
method: POST
path: "/api/heartbeat"
tags: ["peer"]
---

# Heartbeat

`POST /api/heartbeat`

This function is an API endpoint that is frequently hit by the client at the /api/heartbeat endpoint. It updates the `last_online` field of the peer. It is tagged with "peer" for OpenAPI documentation.

## Parameters

- `request`: The request data, which includes the heartbeat information.

## Returns

This function always returns a `String` with the message "OK".  <br>

## Errors

This function will return an error if the system is in maintenance mode.

## Request body

- HeartbeatRequest
  - `id` string, required
  - `modified_at` integer, required
  - `uuid` string, required
  - `ver` integer, required

## Response `200`

---

[API](https://skmtc.dev/nesaku/apis/sctgdesk-api-server.md) · [All operations](https://skmtc.dev/nesaku/apis/sctgdesk-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nesaku/sctgdesk-api-server/revisions/b1c0e7a4434f/schema)
