---
title: "Revoke a session by ID"
method: DELETE
path: "/api/my-account/sessions/{sessionId}"
tags: ["My account"]
---

# Revoke a session by ID

`DELETE /api/my-account/sessions/{sessionId}`

Revoke a specific user session by its ID, optionally revoking target associated grants and tokens.  A logto-verification-id in header is required for revoking sessions.

## Path parameters

- `sessionId` string, required

## Query parameters

- `revokeGrantsTarget` 'all' | 'firstParty'

## Response `204`

The session was revoked successfully.

## Other responses

- `400` — The field is not editable.
- `401` — Permission denied, the verification record is invalid or the session does not have the required scope to revoke sessions.
- `403` — Forbidden
- `404` — The session does not exist.
- `500` — Internal Server Error

---

[API](https://skmtc.net/logto/apis/logto-api-references.md) · [All operations](https://skmtc.net/logto/apis/logto-api-references/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/logto/logto-api-references/versions/a163dc77d842/schema)
