Sign Out Other Sessions

POST /v1/user/sessions/revoke-others

The immediate, effective "log out everywhere else" control. It bumps the user's global token_version — invalidating every JWT issued so far, on all devices — then re-mints a fresh token for the current device, deletes all other session rows, and writes a new session row for the surviving device.

The new token is returned so the caller can replace its credential (the dashboard sets it as the auth_token cookie). After this call, every other device is signed out at its next request.

Request body

None.

Response (200 OK)

ok bool
Always true on success.
token string
Freshly minted JWT for the current device — use it for subsequent requests; the old token is now rejected.

Errors

401 Unauthorized
Missing or invalid auth.
Request
curl -X POST "https://api.ngris.com/v1/user/sessions/revoke-others" \ -H "X-API-KEY: <your_api_key>"
Response — 200 OK
{ "ok": true, "token": "eyJhbGciOiJIUzI1Ni..." }
Iris