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

# Get all tickets



## OpenAPI

````yaml get /v1/tickets
openapi: 3.0.0
info:
  title: Thena Platform
  description: The Thena Platform API description
  version: 1.0.0
  contact: {}
servers:
  - url: https://platform.thena.ai
    description: Platform
  - url: http://localhost:8000
    description: Local
security:
  - ApiKey: []
tags: []
paths:
  /v1/tickets:
    get:
      tags:
        - Tickets
      description: Get all tickets for standard and enterprise tier organizations.
      parameters:
        - name: teamId
          required: false
          in: query
          description: The ID of the team to filter tickets by
          schema:
            example: T00M677SAK
            type: string
        - name: dateRange
          required: false
          in: query
          description: >-
            Calendar-based range in UTC. Examples: 1d = since 00:00 UTC
            yesterday, 2d = since 00:00 UTC 2 days ago, 1w = since 00:00 UTC 7
            days ago, 3m = since 00:00 UTC on the same date 3 months ago.
          examples:
            lastTwoDays:
              summary: Last 2 calendar days
              value: 2d
            lastWeek:
              summary: Last 7 calendar days
              value: 1w
          schema:
            enum:
              - 1d
              - 2d
              - 1w
              - 2w
              - 3w
              - 4w
              - 1m
              - 3m
            type: string
        - name: page
          required: false
          in: query
          description: The page number to fetch tickets by
          schema:
            minimum: 0
            default: 0
            example: 0
            type: number
        - name: limit
          required: false
          in: query
          description: The limit number of tickets to fetch
          schema:
            minimum: 1
            maximum: 100
            default: 10
            example: 10
            type: number
      responses:
        '200':
          description: Operation successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetAllTicketsResponse'
        '401':
          description: User is not authenticated!
        '403':
          description: Insufficient permissions
          content:
            application/json:
              example:
                statusCode: 403
                error: Forbidden
                message: You are not a member of this team!
        '404':
          description: Team not found
          content:
            application/json:
              example:
                statusCode: 404
                error: Not Found
                message: Team not found!
        '429':
          description: Too many requests!
        '500':
          description: Something went wrong!
        '503':
          description: This service/resource is currently unavailable.
components:
  schemas:
    GetAllTicketsResponse:
      type: object
      properties:
        status:
          type: boolean
          default: true
          description: The status of the response
        message:
          type: string
          default: Success
          description: The message of the response
        timestamp:
          format: date-time
          type: string
          default: '2024-01-01T00:00:00.000Z'
          description: The timestamp of the response
        data:
          description: The tickets fetched
          type: array
          items:
            $ref: '#/components/schemas/TicketResponseDto'
      required:
        - status
        - message
        - timestamp
        - data
    TicketResponseDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the ticket
        ticketIdentifier:
          type: string
          description: The unique identifier of the ticket
        title:
          type: string
          description: The title of the ticket
        ticketId:
          type: number
          description: The ticket ID of the ticket
        description:
          type: string
          description: The description of the ticket
        source:
          type: string
          description: The source of the ticket
        accountId:
          type: string
          description: The account ID of the ticket
        status:
          type: string
          description: The status of the ticket
        statusId:
          type: string
          description: The status ID of the ticket
        priority:
          type: string
          description: The priority of the ticket
        priorityId:
          type: string
          description: The priority ID of the ticket
        storyPoints:
          type: number
          description: The story points of the ticket
        account:
          type: string
          description: The account of the ticket
        teamId:
          type: string
          description: The team ID of the ticket
        teamName:
          type: string
          description: The name of the team of the ticket
        teamIdentifier:
          type: string
          description: The identifier of the team of the ticket
        subTeamId:
          type: string
          description: The sub team ID of the ticket
        subTeamName:
          type: string
          description: The name of the sub team of the ticket
        subTeamIdentifier:
          type: string
          description: The identifier of the sub team of the ticket
        isPrivate:
          type: boolean
          description: Whether the ticket is private
        typeId:
          type: string
          description: The type ID of the ticket
        type:
          type: string
          description: The name of the type of the ticket
        assignedAgent:
          type: string
          description: The assigned agent of the ticket
        assignedAgentId:
          type: string
          description: The assigned agent ID of the ticket
        assignedAgentEmail:
          type: string
          description: The assigned agent email of the ticket
        assignedAgentAvatar:
          type: string
          description: The assigned agent avatar of the ticket
        requestorEmail:
          type: string
          description: The requestor email of the ticket
        customerContactId:
          type: string
          description: The customer contact ID of the ticket
        customerContactFirstName:
          type: string
          description: The customer contact first name of the ticket
        customerContactLastName:
          type: string
          description: The customer contact last name of the ticket
        customerContactEmail:
          type: string
          description: The customer contact email of the ticket
        submitterEmail:
          type: string
          description: The submitter email of the ticket
        customFieldValues:
          description: The custom field values
          type: array
          items:
            type: string
        deletedAt:
          type: string
          description: The deleted at date of the ticket
        archivedAt:
          type: string
          description: The archived at date of the ticket
        createdAt:
          type: string
          description: The created at date of the ticket
        updatedAt:
          type: string
          description: The updated at date of the ticket
        formId:
          type: string
          description: The form ID of the ticket
        aiGeneratedTitle:
          type: string
          description: The AI generated title of the ticket
        aiGeneratedSummary:
          type: string
          description: The AI generated summary of the ticket
        sentiment:
          type: string
          description: The sentiment of the ticket
        sentimentId:
          type: string
          description: The sentiment ID of the ticket
        teamIcon:
          type: string
          description: The team icon of the ticket
        teamColor:
          type: string
          description: The team color of the ticket
        teamOrganizationId:
          type: string
          description: The team organization ID of the ticket
        teamParentTeamId:
          type: string
          description: The team parent team ID of the ticket
        teamDescription:
          type: string
          description: The team description of the ticket
        teamConfigurationId:
          type: string
          description: The team configuration ID of the ticket
        teamTeamOwnerId:
          type: string
          description: The team team owner ID of the ticket
        teamIsActive:
          type: boolean
          description: The team is active of the ticket
        teamIsPrivate:
          type: boolean
          description: The team is private of the ticket
        teamCreatedAt:
          type: string
          description: The team created at of the ticket
        teamUpdatedAt:
          type: string
          description: The team updated at of the ticket
        teamDeletedAt:
          type: string
          description: The team deleted at of the ticket
        teamArchivedAt:
          type: string
          description: The team archived at of the ticket
        subTeamIcon:
          type: string
          description: The sub team icon of the ticket
        subTeamColor:
          type: string
          description: The sub team color of the ticket
        subTeamOrganizationId:
          type: string
          description: The sub team organization ID of the ticket
        subTeamParentTeamId:
          type: string
          description: The sub team parent team ID of the ticket
        subTeamDescription:
          type: string
          description: The sub team description of the ticket
        subTeamConfigurationId:
          type: string
          description: The sub team configuration ID of the ticket
        subTeamTeamOwnerId:
          type: string
          description: The sub team team owner ID of the ticket
        subTeamIsActive:
          type: boolean
          description: The sub team is active of the ticket
        subTeamIsPrivate:
          type: boolean
          description: The sub team is private of the ticket
        subTeamCreatedAt:
          type: string
          description: The sub team created at of the ticket
        subTeamUpdatedAt:
          type: string
          description: The sub team updated at of the ticket
        subTeamDeletedAt:
          type: string
          description: The sub team deleted at of the ticket
        subTeamArchivedAt:
          type: string
          description: The sub team archived at of the ticket
        lastCustomerComment:
          type: string
          description: The last customer comment timestamp
        lastVendorComment:
          type: string
          description: The last vendor comment timestamp
        closedAt:
          type: string
          description: The closed at date of the ticket
          nullable: true
        closedBy:
          type: string
          description: The display name of the user who closed the ticket
          nullable: true
        closedById:
          type: string
          description: The ID of the user who closed the ticket
          nullable: true
        closedByEmail:
          type: string
          description: The email of the user who closed the ticket
          nullable: true
        lastComment:
          type: string
          description: >-
            The last comment timestamp (max of lastCustomerComment and
            lastVendorComment)
        isEscalated:
          type: boolean
          description: Whether the ticket is escalated
      required:
        - id
        - ticketIdentifier
        - title
        - ticketId
        - description
        - source
        - accountId
        - status
        - statusId
        - priority
        - priorityId
        - storyPoints
        - account
        - teamId
        - teamName
        - teamIdentifier
        - subTeamId
        - subTeamName
        - subTeamIdentifier
        - isPrivate
        - typeId
        - type
        - assignedAgent
        - assignedAgentId
        - assignedAgentEmail
        - assignedAgentAvatar
        - requestorEmail
        - customerContactId
        - customerContactFirstName
        - customerContactLastName
        - customerContactEmail
        - submitterEmail
        - customFieldValues
        - deletedAt
        - archivedAt
        - createdAt
        - updatedAt
        - formId
        - aiGeneratedTitle
        - aiGeneratedSummary
        - sentiment
        - sentimentId
        - teamIcon
        - teamColor
        - teamOrganizationId
        - teamParentTeamId
        - teamDescription
        - teamConfigurationId
        - teamTeamOwnerId
        - teamIsActive
        - teamIsPrivate
        - teamCreatedAt
        - teamUpdatedAt
        - teamDeletedAt
        - teamArchivedAt
        - subTeamIcon
        - subTeamColor
        - subTeamOrganizationId
        - subTeamParentTeamId
        - subTeamDescription
        - subTeamConfigurationId
        - subTeamTeamOwnerId
        - subTeamIsActive
        - subTeamIsPrivate
        - subTeamCreatedAt
        - subTeamUpdatedAt
        - subTeamDeletedAt
        - subTeamArchivedAt
        - lastCustomerComment
        - lastVendorComment
        - lastComment
        - isEscalated
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: 'Enter your API key '

````