Skip to content
Torii docs

Revoke all sessions

DELETE
/api/server/v1/users/{userId}/sessions
curl --request DELETE \
--url https://api.torii.so/api/server/v1/users/01931a73-8b00-7000-8000-000000000000/sessions

Immediately revokes every active session for the user. Idempotent.

userId
required
string format: uuid

Identifier of the user whose sessions to revoke.

Example
01931a73-8b00-7000-8000-000000000000

Sessions revoked.

Missing or invalid secret key.

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
}
}

User belongs to a different environment.

Media type application/problem+json
object
type
string format: uri
title
string
status
integer format: int32
detail
string
instance
string format: uri
properties
object
key
additional properties
Example generated
{
"type": "https://example.com",
"title": "example",
"status": 1,
"detail": "example",
"instance": "https://example.com",
"properties": {
"additionalProperty": "example"
}
}