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

# Create a new session

> Create a new session and associate it with a project.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json post /sessions
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /sessions:
    post:
      tags:
        - Session
      summary: Create a new session
      description: Create a new session and associate it with a project.
      operationId: CreateSession
      parameters:
        - in: header
          name: project
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionDto'
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema: {}
      security:
        - jwt: []
components:
  schemas:
    SessionDto:
      properties:
        gleapId:
          type: string
        gleapHash:
          type: string
        lang:
          type: string
        firstActivity: {}
        lastHeardFrom: {}
        lastActivity: {}
        lastFeedbackReport: {}
        project:
          $ref: '#/components/schemas/Types.ObjectId'
        organisation:
          $ref: '#/components/schemas/Types.ObjectId'
        unsubscribed:
          type: boolean
        unsubscribedAt: {}
        unsubscribeReason:
          type: string
        lastPageView: {}
        userId:
          type: string
        name:
          type: string
        location: {}
        email:
          type: string
        avatar:
          type: string
        companyId:
          type: string
        emailOnly:
          type: boolean
        companyName:
          type: string
        deviceType:
          type: string
        platform:
          type: string
        sla:
          type: number
          format: double
        phone:
          type: string
        blocked:
          type: boolean
        plan:
          type: string
        value:
          type: number
          format: double
        sessions:
          type: number
          format: double
        facebookId:
          type: string
        instagramId:
          type: string
        instagramUsername:
          type: string
        telegramChatId:
          type: string
        telegramUsername:
          type: string
        outboundHistory: {}
        countFeedbackReports:
          type: number
          format: double
        countFeedbackComments:
          type: number
          format: double
        tags:
          items:
            type: string
          type: array
        checklistTasks: {}
        customData: {}
        eventData: {}
      type: object
      additionalProperties: false
    Types.ObjectId:
      type: string
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````