> ## Documentation Index
> Fetch the complete documentation index at: https://docs.peaka.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Init Session (Deprecated)

> <strong>Deprecated.</strong> Use <code>POST /ui/initSession</code> instead, which supports feature flags, session modes, and additional configuration options.

Initializes an Embedded Peaka session and returns a session URL. The returned URL can be used to embed the Peaka UI in an iframe.


<span style={{display: "flex", gap: "10px", flexDirection: "row", alignItems: "center"}}>
  <img src="https://cdn.peaka.com/badges/partner-api-key-badge.png" />

  <img src="https://cdn.peaka.com/badges/project-api-key-badge.png" />
</span>


## OpenAPI

````yaml get /ui/initSession
openapi: 3.0.1
info:
  title: Peaka Gateway API
  description: Peaka Gateway API Documentation
  version: '1.0'
servers:
  - url: https://partner.peaka.studio/api/v1
    description: Default Server URL (US Zone)
  - url: https://partner.eu.peaka.studio/api/v1
    description: EU Zone
security:
  - bearerAuth: []
paths:
  /ui/initSession:
    get:
      tags:
        - Embedded Peaka Api
      summary: Init Session (Deprecated)
      description: >
        <strong>Deprecated.</strong> Use <code>POST /ui/initSession</code>
        instead, which supports feature flags, session modes, and additional
        configuration options.


        Initializes an Embedded Peaka session and returns a session URL. The
        returned URL can be used to embed the Peaka UI in an iframe.
      operationId: initSession_1
      parameters:
        - name: projectId
          in: query
          description: ID of the Project
          required: true
          schema:
            type: string
          example: mtKDhe1U
        - name: timeoutInSeconds
          in: query
          description: Session timeout in seconds
          required: false
          schema:
            type: integer
            format: int32
          example: 300
        - name: theme
          in: query
          description: Theme for the embedded UI (e.g., dark, light)
          required: false
          schema:
            type: string
          example: dark
        - name: themeOverride
          in: query
          description: Whether to override the default theme
          required: false
          schema:
            type: boolean
          example: true
      responses:
        '200':
          description: Session created successfully
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/EmbeddedSession'
              examples:
                Session created successfully:
                  description: Session created successfully
                  value:
                    sessionUrl: >-
                      https://partner.peaka.studio/api/v1/ui/session?code=2eccdbf31efa110943b470b9023e9a52587c166e4d1c21f23fabbcd7de5b74ab
      deprecated: true
components:
  schemas:
    EmbeddedSession:
      type: object
      properties:
        sessionUrl:
          type: string
          description: >
            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:
          type: string
          description: |
            The origin of the partner that the embedded studio is coming from.
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        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
      scheme: bearer
      bearerFormat: Api Key

````