Manage sessions in bulk
Disable or delete sessions for a list of identities or a list of sessions in
POST /admin/sessions
Disable or delete sessions for a list of identities or a list of sessions in
a single call. The action field selects the operation:
disable, deactivate matching sessions (sets active = false, preserves
audit data).
delete, permanently delete matching sessions.
Exactly one of identities or sessions must be provided. To scope the
operation to every session in the network, pass identities: ["*"]; the
wildcard is not accepted in the sessions field. Up to 500 explicit IDs
are accepted per call.
All requests return 200 OK with {processed, more}. processed reports
how many rows the call affected; for disable it counts only sessions
that were active before the call. more is true only when a wildcard
request reached the per-call batch limit and additional rows may remain;
callers drain the network by re-issuing the same request while more is
true. Explicit-IDs requests always return more: false.
Operation ID: manageSessions Tag: identity
Request body
Content-Type: application/json
Type: object
Schema: manageSessionsBody, see the Ory Identities API schemas reference for the full type.
Responses
| Status | Description | Body |
|---|---|---|
| 200 | manageSessionsResponse | application/json, object |
| 400 | errorGeneric | application/json, object |
| 401 | errorGeneric | application/json, object |
| default | errorGeneric | application/json, object |
Security
oryAccessToken
Generated from /tmp/kratos-api.json at build time.