Skip to main content
GET
/
api
/
session
Sessions
curl --request GET \
  --url https://api.compose.market/api/session \
  --header 'x-chain-id: <x-chain-id>' \
  --header 'x-session-user-address: <x-session-user-address>'
{
  "hasSession": true,
  "budgetRemaining": "<string>",
  "status": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.compose.market/llms.txt

Use this file to discover all available pages before exploring further.

Session routes let apps monitor an active session-backed Compose Key.

Routes

MethodPathDescription
GET/api/sessionReturns the active session state for a wallet and chain.
GET/api/session/eventsStreams session-active and session-expired events over SSE.

Headers

x-session-user-address
string
required
Wallet address for the session lookup.
x-chain-id
number
required
Chain ID for the session.

Query parameters

userAddress
string
Alternative to x-session-user-address for /api/session/events.
chainId
number
Alternative to x-chain-id for /api/session/events.

SSE events

EventDescription
session-activeCurrent active session budget and expiry.
session-expiredTerminal event when no active session remains.
errorStream sync failure.

Response

hasSession
boolean
Whether an active session exists.
budgetRemaining
string
Available budget in USDC atomic units.
status
object
Live status flags and warnings for active sessions.