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

# Get Ticket

> One of the viewer's tickets, by the `id` the list gives, and every message of its thread they can see, oldest first. A ticket the list would leave out is not found.



## OpenAPI

````yaml /api/portal-sdk.openapi.json get /sdk/v1/tickets/{ticket_id}
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/{ticket_id}:
    get:
      tags:
        - sdk
      summary: Get Ticket
      description: >-
        One of the viewer's tickets, by the `id` the list gives, and every
        message of its thread they can see, oldest first. A ticket the list
        would leave out is not found.
      operationId: get_ticket_sdk_v1_tickets__ticket_id__get
      parameters:
        - name: ticket_id
          in: path
          required: true
          schema:
            type: string
            title: Ticket Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SdkTicketThreadResponse'
        '401':
          description: Token is missing or invalid
        '404':
          description: The viewer has no ticket with this id
        '409':
          description: The session acts as no account
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    SdkTicketThreadResponse:
      properties:
        ticket:
          $ref: '#/components/schemas/SdkTicket'
        messages:
          items:
            $ref: '#/components/schemas/SdkTicketMessage'
          type: array
          title: Messages
      type: object
      required:
        - ticket
        - messages
      title: SdkTicketThreadResponse
      description: >-
        One of the viewer's tickets and every message of its thread they can
        see, oldest 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.
    SdkTicketMessage:
      properties:
        id:
          type: string
          title: Id
        sent_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Sent At
        author:
          $ref: '#/components/schemas/SdkTicketMessageAuthor'
        text:
          type: string
          title: Text
          description: Plain text, as stored.
      type: object
      required:
        - id
        - author
        - text
      title: SdkTicketMessage
      description: A message of a ticket's thread the viewer can see.
    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
    SdkTicketMessageAuthor:
      properties:
        side:
          anyOf:
            - type: string
              enum:
                - customer
                - team
            - type: 'null'
          title: Side
          description: >-
            `customer` for the customer's side, `team` for your team or the AI
            that answers for it, `null` when the sender is unknown.
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
          description: The sender's name when known. Never an email address.
        is_you:
          type: boolean
          title: Is You
          default: false
          description: Whether the viewer wrote the message.
      type: object
      title: SdkTicketMessageAuthor
      description: Who wrote a ticket message.
  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.