Skip to main content
POST
/
ui
/
initSession
Init Session
curl --request POST \
  --url https://partner.peaka.studio/api/v1/ui/initSession \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "timeoutInSeconds": 300,
  "projectId": "projectId",
  "theme": "dark",
  "themeOverride": true,
  "featureFlags": {
    "feature1": true,
    "feature2": false
  }
}'
{
  "sessionUrl": "https://partner.peaka.studio/api/v1/ui/session?code=2eccdbf31efa110943b470b9023e9a52587c166e4d1c21f23fabbcd7de5b74ab"
}

Authorizations

Authorization
string
header
required

Use the Authorization header with the value 'Bearer <apiKey>' to authenticate. Partner API Keys have full access; Project API Keys are limited to their project scope. Learn more: https://docs.peaka.com/api-reference/authentication

Body

application/json

Session Initialization Request

projectId
string

The project ID.

theme
string

The theme to be used.

sessionMode
enum<string>

The session mode, determining the type of session to be initialized.

Available options:
CONNECTOR_MODAL_ONLY,
FULL_STUDIO
themeOverride
boolean

Flag indicating whether the theme should be overridden.

timeoutInSeconds
integer

The timeout duration in seconds.

Response

200 - */*

Session created successfully

sessionUrl
string

The URL of the Embedded Peaka session to be followed.

It is a one-time use URL that will redirect the user to the Peaka session.

partnerOrigin
string

The origin of the partner that the embedded studio is coming from.