1. Docs
  2. API Reference
  3. Revoke one of an identity's sessions (admin)

Revoke one of an identity's sessions (admin)

DELETE/api/v1/identities/{id}/sessions/{sessionId}

Revokes one of an identity's sessions in the caller's Environment (server-to-server admin) by marking its refresh token revoked, so the next refresh from that device returns 401 while every other session carries on. Audited as identity.session.revoked, the same row the person's own per-session sign-out writes. Returns 204 No Content; returns 404 when the identity has no membership in this Environment, or when the session is not the identity's, belongs to another Environment, or is already revoked.

Authentication

Bearer TokenAuthorization Option A

JWT access token. Never send alongside X-API-Key: a request carrying both is refused.

API KeyX-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
sessionIdstring Required

Responses

The session's refresh token is revoked, so its next refresh returns 401 while the identity's other sessions carry on. In-flight access tokens keep working until their short TTL expires.

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*

application/json

  • errorApiErrorBodyDto*
Request
curl -X DELETE "https://auth.canopy-io.com/api/v1/identities/value/sessions/value" \
  -H "X-API-Key: $CANOPY_API_KEY"
Response
HTTP/1.1 204 The session's refresh token is revoked, so its next refresh returns 401 while the identity's other sessions carry on. In-flight access tokens keep working until their short TTL expires.

(empty body)
Related endpoints
GETList identities in Application
POSTCreate an identity
GETList identities with their role assignments
GETGet Application identities summary
POSTBulk-create identities
GETGet an identity
PATCHUpdate an identity
DELETERemove an identity
GETGet identity detail with role assignments
POSTSet an identity's password (admin)
POSTForce a password reset for an identity (admin)
GETList an identity's active sessions (admin)
POSTRevoke all of an identity's sessions (admin)
GETGet MFA enrollment summary for an identity
POSTForce-reset an identity's MFA — admin recovery action
GETRead an identity's auth state for backend decisioning
POSTMark an identity's email verified (admin)
GETGet identity's role assignments
GETGet identity's effective permissions
GETGet where an identity may act with one permission
GETGet where an identity holds each permission
Was this page helpful?

Tell us how we can improve this guide.