---
title: "Revoke a user session"
method: DELETE
path: "/api/users/{userId}/sessions/{sessionId}"
tags: ["Users"]
---

# Revoke a user session

`DELETE /api/users/{userId}/sessions/{sessionId}`

Revoke a specific user session by its ID, optionally revoking associated target grants and tokens.

## Path parameters

- `userId` string, required
- `sessionId` string, required

## Query parameters

- `revokeGrantsTarget` 'all' | 'firstParty'

## Response `204`

Session revoked successfully.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `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)
