Nullgap.dev Docs

API reference

Sessions

Console sessions: list them, end one, end all.

Paths are relative to the address of your Nullgap console. Authentication, errors, paging and rate limits are the same for every call and are described in the API overview.

OperationMethod and pathWho may call it
List my sessionsGET /api/me/sessionsconsole session
Revoke a sessionDELETE /api/me/sessions/{id}console session
Revoke my other sessionsPOST /api/me/sessions/revoke-othersconsole session
Sign out every memberPOST /api/orgs/{org}/sessions/revoke-allconsole only (admin)

#List my sessions

GET /api/me/sessions

Lists every place the signed-in person is signed in, the current session included. Sign-ins still waiting for their second factor are left out. The answer is a plain array, not a paged list.

Who may call it: A signed-in person in the console. This is about your own account, so no API key may call it.

Answer (200, application/json)

Every live session of the signed-in person.

An array of SessionInfo.

[
  {
    "id": "ses_Qm9iX2FsaWNl",
    "current": true,
    "createdAt": "2026-11-16T08:02:00.000Z",
    "lastUsedAt": "2026-11-16T09:29:00.000Z",
    "method": "github",
    "userAgent": "Chrome on macOS",
    "ip": "203.0.113.0",
    "mfaVerified": true
  }
]

#Revoke a session

DELETE /api/me/sessions/{id}

Signs out one of the signed-in person's sessions. Revoking the current session signs this browser out.

Who may call it: A signed-in person in the console. This is about your own account, so no API key may call it.

Path parameters

NameTypeRequiredDescription
idstringyesThe session id from the list, for example ses_Qm9iX2FsaWNl.

Answer (200, application/json)

An empty object.

{}

Errors specific to this call

StatusCodeWhen
404not_foundThe signed-in person has no session with that id.

#Revoke my other sessions

POST /api/me/sessions/revoke-others

Signs the person out everywhere except the session making this request. Takes no request body.

Who may call it: A signed-in person in the console. This is about your own account, so no API key may call it.

Answer (200, application/json)

A RevokedSessions object.

{
  "revoked": 3
}

#Sign out every member

POST /api/orgs/{org}/sessions/revoke-all

Ends every session of every member of the organisation, except the session making this request. A member's sessions end wherever they were signed in, so someone who also belongs to another organisation is signed out there too. Everyone has to sign in again. Takes no request body.

Who may call it: A signed-in admin or owner in the console. No API key may call it.

Path parameters

NameTypeRequiredDescription
orgstringyesThe organisation slug.

Answer (200, application/json)

A RevokedSessions object.

{
  "revoked": 3
}

Errors specific to this call

StatusCodeWhen
403step_up_requiredYour account has a second factor and this session has not passed a second-factor check in the last 15 minutes. Confirm with a code or a passkey, then call again.

#Objects

The objects the operations above take and return.

#SessionInfo

One place where the person is signed in.

FieldTypeAlways presentDescription
idstringyesThe id to use for revoking the session. It is not the session secret. Sessions started long ago have an id that begins legacy_.
currentbooleanyesTrue for the session making this request.
createdAtstringyesWhen the person signed in.
lastUsedAtstringyesWhen the session was last used, to the nearest minute or so.
methodstringyesHow the session was started: github (GitHub sign-in), sso (the organisation's identity provider), link (a single-use sign-in link), passkey, or dev (a development sign-in, never offered on the hosted service).
userAgentstringyesThe browser and operating system families only, never the full header. "Unknown" when the browser did not say.
ipstringyesThe network address with its last part removed, so it shows roughly where the session is without identifying a device. Empty when unknown.
mfaVerifiedbooleanyesTrue when the session has passed a second-factor check at some point.

#RevokedSessions

FieldTypeAlways presentDescription
revokedintegeryesHow many sessions were ended.

Nullgap documentation