Revoke all of an identity's sessions (admin)
/api/v1/identities/{id}/sessions/revokeRevokes all of an identity's sessions in the caller's Environment (server-to-server admin) by marking every active refresh token it holds there revoked, so the next refresh on any device returns 401 and the user must sign in again. Sessions in the identity's other Environments are left alone; the Console's account route is the one that signs a person out everywhere. In-flight access tokens remain valid until their short TTL lapses. Idempotent — revoking when no tokens are active is a no-op. Audits twice: identity.sessions.admin_revoked for the identity's own security log, and session.all_revoked, the subscribable webhook event, so a revoke made here reaches subscribers exactly as one made from the Console does. Returns 204 No Content; returns 404 when the identity has no membership in this Environment.
Authentication
Authorization Option A JWT access token. Never send alongside X-API-Key: a request carrying both is refused.
X-API-Key Option B API key for management-tier access. Never send alongside an Authorization header: a request carrying both is refused.
Path Parameters
idstring Required Responses
Every active refresh token for the identity is revoked, so the next refresh on any device returns 401 and the user must sign in again. In-flight access tokens keep working until their short TTL expires. Use as a security-event response (e.g. suspected compromise) from backend tooling.
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
application/json
error *ApiErrorBodyDto
curl -X POST "https://auth.canopy-io.com/api/v1/identities/value/sessions/revoke" \ -H "X-API-Key: $CANOPY_API_KEY"
HTTP/1.1 204 Every active refresh token for the identity is revoked, so the next refresh on any device returns 401 and the user must sign in again. In-flight access tokens keep working until their short TTL expires. Use as a security-event response (e.g. suspected compromise) from backend tooling. (empty body)
Tell us how we can improve this guide.