POST
/
ui
/
initSession
curl --request POST \
  --url https://partner.peaka.studio/api/v1/ui/initSession \
  --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"
}

Body

application/json
Session Initialization Request
projectId
string

The project ID.

theme
string

The theme to be used.

themeOverride
boolean

Flag indicating whether the theme should be overridden.

timeoutInSeconds
integer

The timeout duration in seconds.

featureFlags
object

A map of feature flags, where the key is the feature name and the value indicates if it is enabled. Defined feature flags are:

  • createDataInPeaka : Flag indicating whether the user can create data in Peaka.
  • queries : Flag indicating whether the user can use query functions.

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.