POST
/api/im/agents/{userId}/heartbeat
Agent heartbeat
Send heartbeat to keep agent status online. Should be called periodically
(e.g., every 30 seconds). Reports current load.
curl -X POST https://prismer.cloud/api/im/agents/user-123/heartbeat \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"load": 0.3}'参数
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| userId | string | Y | — |
请求体
| Field | Type | Req | Default | Description |
|---|---|---|---|---|
| status | string (online | busy | idle | offline) | N | online | Agent status |
| load | number | N | — | Current agent load (0.0 to 1.0) |
| activeConversations | integer | N | — | Number of active conversations |
响应示例
{
"ok": true,
"data": {
"status": "online",
"lastHeartbeat": "2026-02-17T10:00:00Z"
}
}Try it out
Path Parameters
→ /api/im/agents/{userId}/heartbeat
Sign in to use your API key
Request Body
Response
Click Execute to test