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

# Create User Session

> Creates a new session



## OpenAPI

````yaml POST /api/portal/session
openapi: 3.0.1
info:
  title: OpenAPI Plant Store
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: http://sandbox.mintlify.com
security:
  - apiKeyAuth: []
paths:
  /api/portal/session:
    post:
      description: Creates a new session
      parameters: []
      requestBody:
        description: Payload to create a new session
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NewSession'
            example:
              uniqueUserId: titouan.launay@hotmail.com
              configuration:
                userDisplay: Arthur
                returnUrl: https://example.com
        required: true
      responses:
        '200':
          description: Session created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Session'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    NewSession:
      type: object
      required:
        - uniqueUserId
        - configuration
      properties:
        uniqueUserId:
          type: string
          description: Unique identifier for the user
        configuration:
          type: object
          required:
            - userDisplay
            - returnUrl
          properties:
            userDisplay:
              type: string
              description: Display name for the user
            returnUrl:
              type: string
              description: URL to redirect the user after session creation
    Session:
      type: object
      required:
        - sessionId
        - uniqueUserId
        - configuration
      properties:
        sessionId:
          type: string
          description: The session identifier
        uniqueUserId:
          type: string
          description: Unique identifier for the user
        configuration:
          type: object
          required:
            - userDisplay
            - returnUrl
          properties:
            userDisplay:
              type: string
              description: Display name for the user
            returnUrl:
              type: string
              description: URL to redirect the user after session creation
    Error:
      required:
        - error
        - message
      type: object
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````