---
title: "Manage sessions in bulk"
method: POST
path: "/admin/sessions"
tags: ["identity"]
---

# Manage sessions in bulk

`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`.

## Request body

- ManageSessionsBody — Body for the bulk session management endpoint. Exactly one of `identities` or `sessions` must be provided. To operate on every session in the network, pass `identities: ["*"]` — the wildcard must appear alone, never mixed with explicit IDs.
  - `action` 'disable' | 'delete', required — Action to perform on the matching sessions. disable ManageSessionsActionDisable delete ManageSessionsActionDelete
  - `identities` string[] — Identity IDs whose sessions should be disabled or deleted, or `["*"]` to operate on every session in the network. Mutually exclusive with `sessions`.
  - `sessions` string[] — Session IDs to disable or delete. Mutually exclusive with `identities`. The wildcard `["*"]` is not accepted in this field — pass `identities: ["*"]` to scope the operation to every session in the network.

## Response `200`

manageSessionsResponse

- ManageSessionsResponse — Response body for the bulk session management endpoint. Reports how many rows the call processed and, for the wildcard variant, whether the network still has matching rows left. Explicit-IDs requests always return `more: false`. Wildcard callers drain the network by re-issuing the same request while `more` is `true`.
  - `more` boolean — True when the call reached the per-call batch limit and additional matching rows may remain. Always false for explicit-IDs requests.
  - `processed` integer — Number of sessions processed in this call. For `disable`, counts only sessions that were active before the call (already-inactive sessions are skipped). For `delete`, counts every matching row removed.

## Other responses

- `400` — errorGeneric
- `401` — errorGeneric
- `default` — errorGeneric

---

[API](https://skmtc.net/ory/apis/ory-kratos.md) · [All operations](https://skmtc.net/ory/apis/ory-kratos/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ory/ory-kratos/revisions/cc87f41fbd6d/schema)
