> ## 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.

# Find tickets by session query

> Resolves contacts (sessions) matching the given identifiers (at most 100) and returns their tickets as
`{ tickets, count, totalCount }`. Archived, hidden, spam and merged-duplicate tickets are excluded and at
most 500 tickets are returned. Pass at least one of `email`, `userId`, `phone` or `customData.TIN`.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json get /tickets/by-session-query
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /tickets/by-session-query:
    get:
      tags:
        - Ticket
      summary: Find tickets by session query
      description: >-
        Resolves contacts (sessions) matching the given identifiers (at most
        100) and returns their tickets as

        `{ tickets, count, totalCount }`. Archived, hidden, spam and
        merged-duplicate tickets are excluded and at

        most 500 tickets are returned. Pass at least one of `email`, `userId`,
        `phone` or `customData.TIN`.
      operationId: FindTicketsBySessionQuery
      parameters:
        - in: header
          name: project
          required: true
          schema:
            type: string
        - in: query
          name: email
          required: false
          schema:
            type: string
        - in: query
          name: userId
          required: false
          schema:
            type: string
        - in: query
          name: phone
          required: false
          schema:
            type: string
        - in: query
          name: customData.TIN
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema: {}
      security:
        - jwt: []
components:
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````