# Retrieve a ticket

`GET /tickets/{ticket_id}`

> This is a subset of the full specification, limited to the `GET /tickets/{ticket_id}` operation.
>
> You can find the full specification here: /_bundle/docs/references/@2.11/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.11'
  description: This is a subset of the full specification, limited to the `GET /tickets/{ticket_id}` operation. Components more than 3 `$ref` hops away are not included.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
tags:
  - name: Tickets
    description: Everything about your tickets
paths:
  /tickets/{ticket_id}:
    get:
      summary: Retrieve a ticket
      parameters:
        - name: Intercom-Version
          in: header
          schema:
            $ref: '#/components/schemas/intercom_version'
        - name: ticket_id
          in: path
          required: true
          description: The unique identifier for the ticket which is given by Intercom.
          schema:
            type: string
      tags:
        - Tickets
      operationId: getTicket
      description: You can fetch the details of a single ticket.
      responses:
        '200':
          description: Ticket found
          content:
            application/json:
              examples:
                Ticket found:
                  value:
                    type: ticket
                    id: '493'
                    ticket_id: '52'
                    ticket_attributes:
                      _default_title_: attribute_value
                      _default_description_: null
                    ticket_state: submitted
                    ticket_type:
                      type: ticket_type
                      id: '112'
                      name: my-ticket-type-21
                      description: my ticket type description is awesome.
                      icon: 🦁
                      workspace_id: this_is_an_id660_that_should_be_at_least_
                      archived: false
                      created_at: 1719493060
                      updated_at: 1719493060
                      is_internal: false
                      ticket_type_attributes:
                        type: list
                        data:
                          - type: ticket_type_attribute
                            id: '268'
                            workspace_id: this_is_an_id660_that_should_be_at_least_
                            name: _default_title_
                            description: ola
                            data_type: string
                            input_options: null
                            order: 0
                            required_to_create: true
                            required_to_create_for_contacts: false
                            visible_on_create: true
                            visible_to_contacts: false
                            default: false
                            ticket_type_id: 112
                            archived: false
                            created_at: 1719493060
                            updated_at: 1719493060
                          - type: ticket_type_attribute
                            id: '269'
                            workspace_id: this_is_an_id660_that_should_be_at_least_
                            name: _default_description_
                            description: ola
                            data_type: string
                            input_options: null
                            order: 0
                            required_to_create: true
                            required_to_create_for_contacts: false
                            visible_on_create: true
                            visible_to_contacts: false
                            default: false
                            ticket_type_id: 112
                            archived: false
                            created_at: 1719493060
                            updated_at: 1719493060
                      category: Back-office
                    contacts:
                      type: contact.list
                      contacts:
                        - type: contact
                          id: 667d61c48a68186f43bafe91
                          external_id: 038050f6-d917-4b9d-89cb-539b1d371172
                    admin_assignee_id: '0'
                    team_assignee_id: '0'
                    created_at: 1719493061
                    updated_at: 1719493061
                    ticket_parts:
                      type: ticket_part.list
                      ticket_parts:
                        - type: ticket_part
                          id: '134'
                          part_type: ticket_state_updated_by_admin
                          ticket_state: submitted
                          previous_ticket_state: submitted
                          created_at: 1719493061
                          updated_at: 1719493061
                          author:
                            id: '991267912'
                            type: admin
                            name: Ciaran445 Lee
                            email: admin445@email.com
                          attachments: []
                          redacted: false
                      total_count: 1
                    open: true
                    linked_objects:
                      type: list
                      data: []
                      total_count: 0
                      has_more: false
                    category: Back-office
                    is_shared: false
                    ticket_state_internal_label: Submitted
                    ticket_state_external_label: Submitted
              schema:
                $ref: '#/components/schemas/ticket'
        '401':
          description: Unauthorized
          content:
            application/json:
              examples:
                Unauthorized:
                  value:
                    type: error.list
                    request_id: e7ba89f2-3bc8-4fc3-97bc-56f62f342680
                    errors:
                      - code: unauthorized
                        message: Access Token Invalid
              schema:
                $ref: '#/components/schemas/error'
components:
  schemas:
    contact_reference:
      title: Contact Reference
      type: object
      description: reference to contact object
      properties:
        type:
          type: string
          description: always contact
          enum:
            - contact
          example: contact
        id:
          type: string
          description: The unique identifier for the contact which is given by Intercom.
          example: 5ba682d23d7cf92bef87bfd4
        external_id:
          type: string
          nullable: true
          description: The unique identifier for the contact which is provided by the Client.
          example: f3b87a2e09d514c6c2e79b9a
      required:
        - type
        - id
    error:
      type: object
      title: Error
      description: The API will return an Error List for a failed request, which will contain one or more Error objects.
      properties:
        type:
          type: string
          description: The type is error.list
          example: error.list
        request_id:
          type: string
          nullable: true
          format: uuid
          description: ''
          example: f93ecfa8-d08a-4325-8694-89aeb89c8f85
        errors:
          type: array
          description: An array of one or more error objects
          items:
            properties:
              code:
                type: string
                description: A string indicating the kind of error, used to further qualify the HTTP response code
                example: unauthorized
              message:
                type: string
                nullable: true
                description: Optional. Human readable description of the error.
                example: Access Token Invalid
              field:
                type: string
                nullable: true
                description: Optional. Used to identify a particular field or query parameter that was in error.
                example: email
            required:
              - code
      required:
        - type
        - errors
    file_attribute:
      title: File
      type: object
      description: The value describing a file upload set for a custom attribute
      properties:
        type:
          type: string
          example: upload
        name:
          type: string
          description: The name of the file
          example: Screenshot.png
        url:
          type: string
          description: The url of the file. This is a temporary URL and will expire after 30 minutes.
          example: https://intercom-attachments-1.com/.../Screenshot.png
        content_type:
          type: string
          description: The type of file
          example: image/png
        filesize:
          type: integer
          description: The size of the file in bytes
          example: 11308309
        width:
          type: integer
          description: The width of the file in pixels, if applicable
          example: 3024
        height:
          type: integer
          description: The height of the file in pixels, if applicable
          example: 1964
      required:
        - type
        - name
        - url
        - content_type
        - filesize
        - width
        - height
    intercom_version:
      description: Intercom API version.</br>By default, it's equal to the version set in the app package.
      type: string
      example: '2.11'
      default: '2.11'
      enum:
        - '1.0'
        - '1.1'
        - '1.2'
        - '1.3'
        - '1.4'
        - '2.0'
        - '2.1'
        - '2.2'
        - '2.3'
        - '2.4'
        - '2.5'
        - '2.6'
        - '2.7'
        - '2.8'
        - '2.9'
        - '2.10'
        - '2.11'
        - Preview
    linked_object:
      title: Linked Object
      type: object
      description: A linked conversation or ticket.
      properties:
        type:
          type: string
          description: ticket or conversation
          enum:
            - ticket
            - conversation
          example: ticket
        id:
          type: string
          description: The ID of the linked object
          example: '7583'
        category:
          type: string
          description: Category of the Linked Ticket Object.
          enum:
            - Customer
            - Back-office
            - Tracker
            - null
          example: Customer
          nullable: true
      required:
        - type
        - id
        - category
    linked_object_list:
      title: Linked Objects
      type: object
      description: An object containing metadata about linked conversations and linked tickets. Up to 1000 can be returned.
      properties:
        type:
          type: string
          description: Always list.
          enum:
            - list
          example: list
        total_count:
          type: integer
          description: The total number of linked objects.
          example: 100
        has_more:
          type: boolean
          description: Whether or not there are more linked objects than returned.
          example: false
        data:
          type: array
          description: An array containing the linked conversations and linked tickets.
          items:
            $ref: '#/components/schemas/linked_object'
      required:
        - type
        - total_count
        - has_more
        - data
    ticket:
      title: Ticket
      type: object
      x-tags:
        - Tickets
      description: Tickets are how you track requests from your users.
      properties:
        type:
          type: string
          description: Always ticket
          enum:
            - ticket
          default: ticket
          example: ticket
        id:
          type: string
          description: The unique identifier for the ticket which is given by Intercom.
          example: '1295'
        ticket_id:
          type: string
          description: The ID of the Ticket used in the Intercom Inbox and Messenger. Do not use ticket_id for API queries.
          example: '1390'
        category:
          type: string
          description: Category of the Ticket.
          enum:
            - Customer
            - Back-office
            - Tracker
          example: Customer
        ticket_attributes:
          $ref: '#/components/schemas/ticket_custom_attributes'
        ticket_state:
          type: string
          description: The state the ticket is currently in
          enum:
            - submitted
            - in_progress
            - waiting_on_customer
            - resolved
          example: submitted
        ticket_type:
          $ref: '#/components/schemas/ticket_type'
          nullable: true
        contacts:
          $ref: '#/components/schemas/ticket_contacts'
        admin_assignee_id:
          type: string
          description: The id representing the admin assigned to the ticket.
          example: '1295'
        team_assignee_id:
          type: string
          description: The id representing the team assigned to the ticket.
          example: '1295'
        created_at:
          type: integer
          format: date-time
          description: The time the ticket was created as a UTC Unix timestamp.
          example: 1663597223
        updated_at:
          type: integer
          format: date-time
          description: The last time the ticket was updated as a UTC Unix timestamp.
          example: 1663597260
        open:
          type: boolean
          description: Whether or not the ticket is open. If false, the ticket is closed.
          example: true
        snoozed_until:
          type: integer
          format: date-time
          description: The time the ticket will be snoozed until as a UTC Unix timestamp. If null, the ticket is not currently snoozed.
          example: 1663597260
        linked_objects:
          $ref: '#/components/schemas/linked_object_list'
        ticket_parts:
          $ref: '#/components/schemas/ticket_parts'
        is_shared:
          type: boolean
          description: Whether or not the ticket is shared with the customer.
          example: true
        ticket_state_internal_label:
          type: string
          description: The state the ticket is currently in, in a human readable form - visible in Intercom
        ticket_state_external_label:
          type: string
          description: The state the ticket is currently in, in a human readable form - visible to customers, in the messenger, email and tickets portal.
      required:
        - type
        - id
        - ticket_id
        - category
        - ticket_attributes
        - ticket_state
        - ticket_type
        - contacts
    ticket_contacts:
      title: Contacts
      type: object
      x-tags:
        - Tickets
      description: The list of contacts affected by a ticket.
      properties:
        type:
          type: string
          description: always contact.list
          enum:
            - contact.list
          example: contact.list
        contacts:
          type: array
          description: The list of contacts affected by this ticket.
          items:
            $ref: '#/components/schemas/contact_reference'
      required:
        - type
        - contacts
    ticket_custom_attributes:
      title: Ticket Attributes
      type: object
      description: An object containing the different attributes associated to the ticket as key-value pairs. For the default title and description attributes, the keys are `_default_title_` and `_default_description_`.
      additionalProperties:
        anyOf:
          - type: string
            nullable: true
          - type: number
          - type: boolean
          - type: array
          - $ref: '#/components/schemas/file_attribute'
      example:
        _default_title_: Found a bug
        _default_description_: The button's not working
    ticket_part:
      title: Ticket Part
      type: object
      x-tags:
        - Tickets
      description: A Ticket Part represents a message in the ticket.
      properties:
        type:
          type: string
          description: Always ticket_part
          example: ticket_part
          enum:
            - ticket_part
        id:
          type: string
          description: The id representing the ticket part.
          example: '3'
        part_type:
          type: string
          description: The type of ticket part.
          example: comment
        body:
          type: string
          nullable: true
          description: The message body, which may contain HTML.
          example: <p>Okay!</p>
        previous_ticket_state:
          type: string
          enum:
            - submitted
            - in_progress
            - waiting_on_customer
            - resolved
          description: The previous state of the ticket.
          example: submitted
        ticket_state:
          type: string
          enum:
            - submitted
            - in_progress
            - waiting_on_customer
            - resolved
          description: The state of the ticket.
          example: submitted
        created_at:
          type: integer
          format: date-time
          description: The time the ticket part was created.
          example: 1663597223
        updated_at:
          type: integer
          format: date-time
          description: The last time the ticket part was updated.
          example: 1663597260
        assigned_to:
          $ref: '#/components/schemas/reference'
          nullable: true
          description: The assignee this ticket_part assigned the ticket to, as a reference whose `type` is `admin`, `team` or `bot`. When the part unassigned the ticket, `type` is `nobody_admin` and `id` is `null`. Null when the part did not change the assignment, or when the assignee has since been deleted.
        author:
          $ref: '#/components/schemas/ticket_part_author'
        attachments:
          title: Ticket part attachments
          type: array
          description: A list of attachments for the part.
          items:
            $ref: '#/components/schemas/part_attachment'
        external_id:
          type: string
          nullable: true
          description: The external id of the ticket part
          example: abcd1234
        redacted:
          type: boolean
          description: Whether or not the ticket part has been redacted.
          example: false
      required:
        - type
        - id
        - part_type
        - body
        - ticket_state
        - created_at
    ticket_parts:
      title: Ticket Parts
      type: object
      description: A list of Ticket Part objects for each note and event in the ticket. There is a limit of 500 parts.
      properties:
        type:
          type: string
          description: ''
          enum:
            - ticket_part.list
          example: ticket_part.list
        ticket_parts:
          title: Tickt Parts
          type: array
          description: A list of Ticket Part objects for each ticket. There is a limit of 500 parts.
          items:
            $ref: '#/components/schemas/ticket_part'
        total_count:
          type: integer
          description: ''
          example: 2
      required:
        - type
        - ticket_parts
        - total_count
    ticket_type:
      title: Ticket Type
      type: object
      x-tags:
        - Tickets
      description: A ticket type, used to define the data fields to be captured in a ticket.
      properties:
        type:
          type: string
          description: String representing the object's type. Always has the value `ticket_type`.
          example: ticket_type
          enum:
            - ticket_type
        id:
          type: string
          description: The id representing the ticket type.
          example: '1295'
        category:
          type: string
          description: Category of the Ticket Type.
          enum:
            - Customer
            - Back-office
            - Tracker
          example: Customer
        name:
          type: string
          description: The name of the ticket type
          example: Bug
        description:
          type: string
          description: The description of the ticket type
          example: A bug that has been reported.
        icon:
          type: string
          description: The icon of the ticket type
          example: 🐞
        workspace_id:
          type: string
          description: The id of the workspace that the ticket type belongs to.
          example: ecahpwf5
        ticket_type_attributes:
          $ref: '#/components/schemas/ticket_type_attribute_list'
        archived:
          type: boolean
          description: Whether the ticket type is archived or not.
          example: false
        created_at:
          type: integer
          format: timestamp
          description: The date and time the ticket type was created.
        updated_at:
          type: integer
          format: timestamp
          description: The date and time the ticket type was last updated.
      required:
        - type
        - id
        - category
        - name
        - description
        - icon
        - workspace_id
        - ticket_type_attributes
        - archived
        - created_at
    ticket_type_attribute_list:
      title: Ticket Type Attributes
      type: object
      description: A list of attributes associated with a given ticket type.
      properties:
        type:
          type: string
          description: String representing the object's type. Always has the value `ticket_type_attributes.list`.
          enum:
            - ticket_type_attributes.list
        ticket_type_attributes:
          type: array
          description: A list of ticket type attributes associated with a given ticket type.
          items:
            $ref: '#/components/schemas/ticket_type_attribute'
      required:
        - type
        - ticket_type_attributes
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
