Skip to Content
API ReferencePOST /sessions

POST /sessions

Create a short-lived session token bound to a wallet address and scoped to a set of capabilities. This endpoint requires an API key and is intended for server-side use only.

Request

POST https://api.aerosol.com/api/v1/burner/sessions

Headers

HeaderRequiredDescription
X-Api-KeyYesYour API key (ak_live_...)
Content-TypeYesapplication/json

Body

FieldTypeRequiredDefaultDescription
walletAddressstringYesSolana wallet address to bind the session to
scopesstring[]NoAll scopesArray of scope strings
ttlSecondsnumberNo300Token lifetime in seconds (max 3600)

Example request

curl -X POST https://api.aerosol.com/api/v1/burner/sessions \ -H "X-Api-Key: ak_live_abc123" \ -H "Content-Type: application/json" \ -d '{ "walletAddress": "DRpbCBMxVnDK7maPM5tGv6MvB3v1sRMC86PZ8okm21hy", "scopes": ["wallet:read", "transactions:build", "transactions:submit"], "ttlSeconds": 600 }'

Response

200 OK

{ "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...", "expiresAt": "2026-04-09T12:10:00.000Z", "scopes": ["wallet:read", "transactions:build", "transactions:submit"] }
FieldTypeDescription
tokenstringThe session token. Pass to BurnerClient via sessionToken or send as Authorization: Bearer <token>.
expiresAtstringISO 8601 timestamp when the token expires.
scopesstring[]The scopes granted to this session.

Error responses

StatusCause
400Missing walletAddress, invalid scope string, or ttlSeconds out of range
401Invalid or revoked API key
429Rate limit exceeded

SDK example

import { BurnerClient, SessionScope } from '@burnandclaim/sdk' const server = new BurnerClient({ apiKey: process.env.BURNER_API_KEY, }) const session = await server.createSession({ walletAddress: 'DRpbCBMxVnDK7maPM5tGv6MvB3v1sRMC86PZ8okm21hy', scopes: [SessionScope.WalletRead, SessionScope.TransactionsBuild], ttlSeconds: 600, })
Last updated on