CloudSignal Docs
REST API

User Management API

Force disconnect users and manage sessions via API

Force Disconnect User

POST /v2/utilities/users/{username}/terminate

Immediately terminates all active MQTT sessions for a user.

Example

curl -X POST "https://api.cloudsignal.app/v2/utilities/users/alice/terminate" \
  -H "X-Secret-Key: sk_your_secret_key"

Response

{
  "username": "alice",
  "sessions_terminated": 1
}

Use Cases

  • Security incident - immediately revoke access for a compromised account
  • Session cleanup - force reconnection after credential rotation
  • Testing - simulate disconnection scenarios

Notes

  • If the client has reconnection logic, it will attempt to reconnect
  • To prevent reconnection, delete or disable the client credentials first, then force disconnect
  • This endpoint terminates all sessions for the user, including multiple connections from different devices

On this page