Skip to main content

session

POST /session-handshake​

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

Parameters​

NameTypeRequiredSourceDescription
x-api-keystring✓headerAPI key header
x-foundry-urlstring✓headerFoundry URL header
x-usernamestring✓headerUsername 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
handshakeTokenstring✓bodyThe token received from session-handshake
encryptedPasswordstring✓bodyPassword encrypted with the public key
x-api-keystring✓headerAPI 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
sessionIdstring✓queryThe ID of the session to end
x-api-keystring✓headerAPI 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-keystring✓headerAPI key header

Returns​

object - List of active sessions for the current API key

Example Request​

GET /session