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

# List Tickets

> The viewer's support tickets (Zendesk tickets and Salesforce cases on the session's account that the viewer is on), most recently active first. `status` and `source` each keep the tickets matching any of their values; pass `next_cursor` back as `cursor` for the next page.



## OpenAPI

````yaml /api/portal-sdk.openapi.json get /sdk/v1/tickets
openapi: 3.1.0
info:
  title: Statisfy Portal SDK API
  description: >-
    Customer-facing portal APIs under `/sdk/v1`, scoped to the customer in the
    token — see the Portal SDK guide. Every call is authenticated with a minted
    **portal-session token** (bearer) and nothing else: no publishable key,
    because the tenant is read from the token's own claim.
  version: v1
servers:
  - url: https://api.statisfy.com
    description: Production gateway
security:
  - portalSession: []
paths:
  /sdk/v1/tickets:
    get:
      tags:
        - sdk
      summary: List Tickets
      description: >-
        The viewer's support tickets (Zendesk tickets and Salesforce cases on
        the session's account that the viewer is on), most recently active
        first. `status` and `source` each keep the tickets matching any of their
        values; pass `next_cursor` back as `cursor` for the next page.
      operationId: list_tickets_sdk_v1_tickets_get
      parameters:
        - name: status
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  enum:
                    - waiting_on_us
                    - waiting_on_customer
                    - closed
              - type: 'null'
            title: Status
          description: >-
            Repeat to match any of several statuses, for example
            `status=waiting_on_us&status=closed`.
        - name: source
          in: query
          required: false
          schema:
            anyOf:
              - type: array
                items:
                  type: string
                  enum:
                    - zendesk
                    - salesforce
              - type: 'null'
            title: Source
          description: Repeat to match any of several ticketing systems.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 100
            minimum: 1
            default: 25
            title: Limit
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                maxLength: 512
              - type: 'null'
            title: Cursor
          description: The `next_cursor` of the previous page.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SdkTicketListResponse'
        '400':
          description: The cursor is not one this route issued
        '401':
          description: Token is missing or invalid
        '409':
          description: The session acts as no account
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SdkTicketListResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/SdkTicket'
          type: array
          title: Data
        next_cursor:
          anyOf:
            - type: string
            - type: 'null'
          title: Next Cursor
          description: The `cursor` of the next page; `null` on the last page.
      type: object
      required:
        - data
      title: SdkTicketListResponse
      description: One page of the viewer's tickets, most recently active first.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SdkTicket:
      properties:
        id:
          type: string
          title: Id
          description: >-
            The ticket's id in Statisfy. Pass it to `GET
            /sdk/v1/tickets/{ticket_id}`.
        source:
          type: string
          enum:
            - zendesk
            - salesforce
          title: Source
        ticket_number:
          anyOf:
            - type: string
            - type: 'null'
          title: Ticket Number
          description: >-
            The number the ticketing system shows: a Zendesk ticket's id or a
            Salesforce case's number.
        subject:
          anyOf:
            - type: string
            - type: 'null'
          title: Subject
        status:
          anyOf:
            - type: string
              enum:
                - waiting_on_us
                - waiting_on_customer
                - closed
            - type: 'null'
          title: Status
          description: >-
            Whose move it is, or `closed`. `null` for a status your workspace
            defined itself.
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
        updated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Updated At
          description: When the ticket's latest message was written.
      type: object
      required:
        - id
        - source
      title: SdkTicket
      description: A support ticket as the portal lists it.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    portalSession:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Minted portal-session JWT (see the Portal SDK guide for the token
        exchange).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.