Skip to main content

session

POST /session-handshake

Create a handshake token for the client to use for secure authentication

Parameters

NameTypeRequiredSourceDescription
x-api-keystringheaderAPI key header
x-foundry-urlstringheaderFoundry URL header
x-usernamestringheaderUsername header
x-world-namestringheaderWorld name header

Returns

object - Handshake token and encryption details

Example Request

POST /session-handshake
Content-Type: application/json



POST /start-session

Start a headless Foundry session using puppeteer

Parameters

NameTypeRequiredSourceDescription
handshakeTokenstringbodyThe token received from session-handshake
encryptedPasswordstringbodyPassword encrypted with the public key
x-api-keystringheaderAPI key header

Returns

object - Session information including sessionId and clientId

Example Request

POST /start-session
Content-Type: application/json

{
"handshakeToken": "example-value",
"encryptedPassword": "example-value"
}

DELETE /end-session

Stop a headless Foundry session

Parameters

NameTypeRequiredSourceDescription
sessionIdstringqueryThe ID of the session to end
x-api-keystringheaderAPI key header

Returns

object - Status of the operation

Example Request

DELETE /end-session
Content-Type: application/json



GET /session

Get all active headless Foundry sessions

Parameters

NameTypeRequiredSourceDescription
x-api-keystringheaderAPI key header

Returns

object - List of active sessions for the current API key

Example Request

GET /session