Skip to content

Sign somebody out everywhere

POST
/staff/people/{id}/sessions/revoke
curl --request POST \
--url https://api.sloose.com/staff/people/c1d2e3f4/sessions/revoke \
--header 'Authorization: Bearer <token>'

Backoffice route: a staff session, or ADMIN_TOKEN. Ends every session this person holds, in every org — a session is a row, so this deletes them and the next request with any of those bearers is unauthenticated. Their API tokens are not touched: those belong to an org, not a person, and are revoked from the org’s own Tokens tab. Written down as user.sessions.revoke.

id
required

The person

string
Example
c1d2e3f4

The person

Signed out.

Media typeapplication/json
object
revoked
required

Sessions ended.

integer
Examplegenerated
{
"revoked": 1
}

A bearer that is neither the token nor a live session (code: AUTH_REQUIRED).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

A customer’s session, an API token, or no bearer at all — not staff, and not the ADMIN_TOKEN (code: ADMIN_REQUIRED).

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}

No such person, or it is not visible to this session.

Media typeapplication/json

The error envelope every non-2xx answer uses.

object
error
required

Human-readable explanation.

string
code

Machine-readable reason. Absent on a few legacy 400s.

string
key
additional properties
Examplegenerated
{
"error": "example",
"code": "example"
}