Skip to content

End every session of one account

POST
/v1/admin/revoke-sessions
curl --request POST \
--url https://beta-api.plune.ai/v1/admin/revoke-sessions \
--header 'Content-Type: application/json' \
--cookie plune_session=<plune_session> \
--data '{ "email": "[email protected]" }'

For a session cookie that leaked (#1820): sets the account’s «sessions ended at» mark to now, so every cookie issued to it before this moment is refused with the 401 an expired one gets; a sign-in after the call works. Other accounts, API tokens and admin tokens are not touched. The call is a row of the admin journal (target: the account id) and the Slack channel is told when a webhook is set. The response carries no cookie or token. The owner’s session alone: an admin token is told 403, anyone else 404. Ten a minute.

Media type application/json
object
email
required
string
Example
{
"email": "[email protected]"
}

Ended

Media type application/json
object
userId
required
string
email
required
string
ended
required

Always true

boolean
Example generated
{
"userId": "example",
"email": "example",
"ended": true
}

The body is not valid

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

An admin token was used (code: session_required)

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

Not found, or no such account

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}

Rate-limited: the per-route throttle, or the per-minute request limit of the plan an API token counts by (#1442; the body names the plan, #2092). Retry-After carries the seconds until the window rolls over.

Media type application/json
object
error
required
string
Example generated
{
"error": "example"
}
Retry-After
integer

Seconds until the window rolls over