Revoke Session

POST /v1/endpoints/{id}/rbac/clients/{client_id}/sessions/{session_id}/revoke

End a single active session. The session token is added to the platform's revocation list and rejected on the next request — typically within a few seconds. Use this to log out a client from one specific device without affecting their other sessions (e.g. user reports a stolen laptop).

Revoking a session that doesn't exist for this endpoint/client (already revoked, expired-and-pruned, or not yours) returns 404 — this call is not idempotent. To kill every active session for a client, use POST .../sessions/revoke-all.

Path parameters

id string (uuid) Req
Endpoint UUID.
client_id int64 Req
Client ID.
session_id int64 Req
Session ID. Get from list sessions.

Request body

None — empty body or {}.

Response (200 OK)

endpoint_id, client_id, session_id int64
Echo of the revoked session's identifiers.
message string
"Session revoked successfully".

Errors

401 Unauthorized
Missing auth.
403 Forbidden
Caller lacks the endpoints:delete permission in the active account.
404 Not Found
Endpoint doesn't belong to the calling account, or no matching active session exists for this endpoint/client.
Request
curl -X POST \ "https://api.ngris.com/v1/endpoints/<uuid>/rbac/clients/11/sessions/3/revoke" \ -H "X-API-KEY: <your_api_key>"
Python
from ngris import Ngris client = Ngris(api_key="<your_api_key>") client._post_void( "/endpoints/<endpoint_uuid>/rbac/clients/11/sessions/3/revoke", {}, )
Response — 200 OK
{ "endpoint_id": 184, "client_id": 11, "session_id": 3, "message": "Session revoked successfully" }
On this page
Revoke Session
Iris