REST API
Presence API
Check which MQTT users are currently online
List Online Users
GET /v2/utilities/presenceReturns a list of currently connected users. Optionally filter by topic.
Parameters
| Parameter | Type | Description |
|---|---|---|
topic | string (optional) | Filter users subscribed to this topic |
Example
curl "https://api.cloudsignal.app/v2/utilities/presence?topic=chat/lobby" \
-H "X-Secret-Key: sk_your_secret_key"Response
{
"users": [
{ "username": "alice", "client_id": "client-abc", "connected_since": "2026-03-27T10:00:00Z" },
{ "username": "bob", "client_id": "client-def", "connected_since": "2026-03-27T10:05:00Z" }
],
"count": 2
}Check Specific User
GET /v2/utilities/presence/{username}Returns the connection status of a specific user.
Example
curl "https://api.cloudsignal.app/v2/utilities/presence/alice" \
-H "X-Secret-Key: sk_your_secret_key"Response
{
"username": "alice",
"online": true,
"client_id": "client-abc",
"connected_since": "2026-03-27T10:00:00Z"
}