---
title: "Send session heartbeat"
method: POST
path: "/api/messaging/sessions/{sessionId}/heartbeat"
tags: ["messaging"]
---

# Send session heartbeat

`POST /api/messaging/sessions/{sessionId}/heartbeat`

## Request

- Base URL: `http://localhost:3000`
- URL: `http://localhost:3000/api/messaging/sessions/{sessionId}/heartbeat`
- Auth: none declared

Keep a session alive with a heartbeat. If auto-renewal is enabled, this will also renew the session.

## Path parameters

- `sessionId` string, required

## Response `200`

Heartbeat received successfully

- SessionInfo: Complete session information with status and timeout details
  - `sessionId` string: Unique session identifier
  - `agentId` string, uuid: UUID of the agent
  - `userId` string, uuid: UUID of the user
  - `createdAt` string, date-time: Session creation timestamp
  - `lastActivity` string, date-time: Last activity timestamp
  - `metadata` object: Session metadata
  - `expiresAt` string, date-time: When the session will expire
  - `timeoutConfig` object: Current timeout configuration
    - `timeoutMinutes` integer: Inactivity timeout in minutes
    - `autoRenew` boolean: Whether auto-renewal is enabled
    - `maxDurationMinutes` integer: Maximum total session duration
    - `warningThresholdMinutes` integer: Minutes before expiration to trigger warning
  - `renewalCount` integer: Number of times the session has been renewed
  - `timeRemaining` integer: Milliseconds until session expiration
  - `isNearExpiration` boolean: Whether the session is within the warning threshold

## Other responses

- `404`: Session not found
- `410`: Session has expired

---

[API](https://skmtc.dev/elizaos/apis/eliza-os-api.md) - [All operations](https://skmtc.dev/elizaos/apis/eliza-os-api/llms.txt) - [OpenAPI document](https://skmtc.dev/elizaos/apis/eliza-os-api/revisions/d606a12682bb?raw)
