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

# Search for sessions

> Autocomplete search over the project's sessions. Returns at most 50 matches, each containing only `id`,
`email`, `userId`, `name`, `companyId`, `companyName` and `phone`. Query parameters: `searchTerm`
(required; terms shorter than 3 characters return an empty array) and `fieldExists` (optional; only
return sessions where that field is set; allowed values: email, userId, phone, companyId, name,
companyName, tags, plan, value, sla, lang, avatar, facebookId, instagramId, instagramUsername,
telegramChatId, telegramUsername; other values are ignored). Optional scoping: `contactViewId` limits
results to the sessions matching that saved contact view (its conditions apply exactly as in the list
route; `type`/`withFeedback` are ignored alongside it); without it, `type` (users | guests | unsubscribed),
`withFeedback=true` and `companyId` narrow the search like the list route. `fullContact=true` returns
full session documents (without the kv blobs) instead of the 7 autocomplete fields.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json get /sessions/search
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /sessions/search:
    get:
      tags:
        - Session
      summary: Search for sessions
      description: >-
        Autocomplete search over the project's sessions. Returns at most 50
        matches, each containing only `id`,

        `email`, `userId`, `name`, `companyId`, `companyName` and `phone`. Query
        parameters: `searchTerm`

        (required; terms shorter than 3 characters return an empty array) and
        `fieldExists` (optional; only

        return sessions where that field is set; allowed values: email, userId,
        phone, companyId, name,

        companyName, tags, plan, value, sla, lang, avatar, facebookId,
        instagramId, instagramUsername,

        telegramChatId, telegramUsername; other values are ignored). Optional
        scoping: `contactViewId` limits

        results to the sessions matching that saved contact view (its conditions
        apply exactly as in the list

        route; `type`/`withFeedback` are ignored alongside it); without it,
        `type` (users | guests | unsubscribed),

        `withFeedback=true` and `companyId` narrow the search like the list
        route. `fullContact=true` returns

        full session documents (without the kv blobs) instead of the 7
        autocomplete fields.
      operationId: SearchSessions
      parameters:
        - in: header
          name: project
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                items: {}
                type: array
      security:
        - jwt: []
components:
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````