User session management endpoints. Sessions track authenticated users and their tokens. Use these endpoints to monitor, suspend, or revoke user sessions.
Base URL: https://api.authpi.com — see the Core API overview for
authentication, pagination, and idempotency, or try these endpoints in the
interactive reference.
GET/v1/accounts/{account_id}/issuers/{issuer_id}/users/{user_id}/sessionsList User Sessions
Lists all sessions for a user.
Sessions represent authenticated contexts for a user. Each session tracks:
Session statuses:
Use this endpoint to:
| Name | Type | Required | Description |
|---|---|---|---|
account_id | string | Required | The unique identifier of the account |
issuer_id | string | Required | The unique identifier of the issuer |
user_id | string | Required | The unique identifier of the user |
| Name | Type | Required | Description |
|---|---|---|---|
status | inactive | active | expired | revoked | suspended | Optional | Filter sessions by status |
| Code | Description | Schema |
|---|---|---|
| 200 | Sessions retrieved successfully | object |
| 401 | Unauthorized - Authentication is required or has failed. | ApiError |
| 403 | Forbidden - You don't have permission to perform this action. | ApiError |
| 404 | Not Found - The requested resource does not exist. | ApiError |
GET/v1/accounts/{account_id}/issuers/{issuer_id}/sessions/{session_id}Get Session
Retrieves detailed information about a specific session.
Returns complete session data including:
Use this endpoint to:
| Name | Type | Required | Description |
|---|---|---|---|
account_id | string | Required | The unique identifier of the account |
issuer_id | string | Required | The unique identifier of the issuer |
session_id | string | Required | The unique identifier of the session |
| Code | Description | Schema |
|---|---|---|
| 200 | Session retrieved successfully | object |
| 401 | Unauthorized - Authentication is required or has failed. | ApiError |
| 403 | Forbidden - You don't have permission to perform this action. | ApiError |
| 404 | Not Found - The requested resource does not exist. | ApiError |
POST/v1/accounts/{account_id}/issuers/{issuer_id}/sessions/{session_id}/revokeRevoke Session
Permanently revokes a session.
Revoking a session immediately:
session.terminated events and OIDC backchannel logout per affected client sessionRevocation reasons:
Include a reason in the request body for audit purposes — one of:
user_logout, admin_action, security_event, password_changed, inactivity, token_compromised, other.
Pass revoke_all_user_sessions: true to revoke every non-terminal session belonging to this session's user ("log out everywhere"), including active, suspended, and not-yet-activated inactive sessions.
Important: This action is permanent. To temporarily block a session while investigating, use Suspend Session instead.
| Name | Type | Required | Description |
|---|---|---|---|
account_id | string | Required | The unique identifier of the account |
issuer_id | string | Required | The unique identifier of the issuer |
session_id | string | Required | The unique identifier of the session |
Content type: application/json
| Property | Type | Required | Description |
|---|---|---|---|
reason | user_logout | admin_action | security_event | password_changed | inactivity | token_compromised | … | Required | |
reason_details | string | Optional | |
revoke_all_user_sessions | boolean | Optional |
| Code | Description | Schema |
|---|---|---|
| 200 | Session revoked successfully | object |
| 400 | Bad Request - The request is malformed or contains invalid data. | ApiError |
| 401 | Unauthorized - Authentication is required or has failed. | ApiError |
| 403 | Forbidden - You don't have permission to perform this action. | ApiError |
| 404 | Not Found - The requested resource does not exist. | ApiError |
POST/v1/accounts/{account_id}/issuers/{issuer_id}/sessions/{session_id}/suspendSuspend Session
Temporarily suspends a session.
Use suspension when you need to block access while investigating suspicious activity, without permanently revoking the session.
When suspended:
Use cases:
Difference from revoke:
Include a reason in the request body for audit purposes.
| Name | Type | Required | Description |
|---|---|---|---|
account_id | string | Required | The unique identifier of the account |
issuer_id | string | Required | The unique identifier of the issuer |
session_id | string | Required | The unique identifier of the session |
Content type: application/json
| Property | Type | Required | Description |
|---|---|---|---|
reason | security_event | token_compromised | device_mismatch | risk_review | other | Required | |
reason_details | string | Optional | |
suspend_all_user_sessions | boolean | Optional |
| Code | Description | Schema |
|---|---|---|
| 200 | Session suspended successfully | object |
| 400 | Bad Request - The request is malformed or contains invalid data. | ApiError |
| 401 | Unauthorized - Authentication is required or has failed. | ApiError |
| 403 | Forbidden - You don't have permission to perform this action. | ApiError |
| 404 | Not Found - The requested resource does not exist. | ApiError |
POST/v1/accounts/{account_id}/issuers/{issuer_id}/sessions/{session_id}/reactivateReactivate Session
Reactivates a previously suspended session.
After investigation confirms the session is legitimate, use this endpoint to restore access.
When reactivated:
activeLimitations:
| Name | Type | Required | Description |
|---|---|---|---|
account_id | string | Required | The unique identifier of the account |
issuer_id | string | Required | The unique identifier of the issuer |
session_id | string | Required | The unique identifier of the session |
| Code | Description | Schema |
|---|---|---|
| 200 | Session reactivated successfully | object |
| 400 | Bad Request - The request is malformed or contains invalid data. | ApiError |
| 401 | Unauthorized - Authentication is required or has failed. | ApiError |
| 403 | Forbidden - You don't have permission to perform this action. | ApiError |
| 404 | Not Found - The requested resource does not exist. | ApiError |