v66

OpenAPI 3.1.0raw.githubusercontent.com2026-08-0174265626.3 KB
portal

Exchange session token

Exchange a short-lived session token for a long-lived browser session.

This endpoint is unauthenticated. The session token itself serves as proof of authorization. Each token can only be exchanged once; subsequent attempts return 401.

The returned browser session token is valid for 24 hours and should be stored as an httpOnly cookie or used in the Authorization header for subsequent API calls.

post/v2/portal.exchangeSession

Request body

sessionIdstring required

The session token ID received from portal.createSession. Must be valid, unexpired, and not previously exchanged.

Example request

{
  "sessionId": "pst_abc123def456"
}

Response

Session exchanged successfully. Use the returned token for subsequent API calls.

Example response

{
  "meta": {
    "requestId": "req_123"
  },
  "data": {
    "token": "ps_xyz789abc123",
    "expiresAt": 1711386400000
  }
}