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.
| Operation | Method and path | Who may call it |
|---|---|---|
| List my sessions | GET /api/me/sessions | console session |
| Revoke a session | DELETE /api/me/sessions/{id} | console session |
| Revoke my other sessions | POST /api/me/sessions/revoke-others | console session |
| Sign out every member | POST /api/orgs/{org}/sessions/revoke-all | console 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
| Name | Type | Required | Description |
|---|---|---|---|
id | string | yes | The session id from the list, for example ses_Qm9iX2FsaWNl. |
Answer (200, application/json)
An empty object.
{}
Errors specific to this call
| Status | Code | When |
|---|---|---|
| 404 | not_found | The 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
| Name | Type | Required | Description |
|---|---|---|---|
org | string | yes | The organisation slug. |
Answer (200, application/json)
A RevokedSessions object.
{
"revoked": 3
}
Errors specific to this call
| Status | Code | When |
|---|---|---|
| 403 | step_up_required | Your 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.
| Field | Type | Always present | Description |
|---|---|---|---|
id | string | yes | The id to use for revoking the session. It is not the session secret. Sessions started long ago have an id that begins legacy_. |
current | boolean | yes | True for the session making this request. |
createdAt | string | yes | When the person signed in. |
lastUsedAt | string | yes | When the session was last used, to the nearest minute or so. |
method | string | yes | How 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). |
userAgent | string | yes | The browser and operating system families only, never the full header. "Unknown" when the browser did not say. |
ip | string | yes | The network address with its last part removed, so it shows roughly where the session is without identifying a device. Empty when unknown. |
mfaVerified | boolean | yes | True when the session has passed a second-factor check at some point. |
#RevokedSessions
| Field | Type | Always present | Description |
|---|---|---|---|
revoked | integer | yes | How many sessions were ended. |
Nullgap documentation