# Ticket Parts

> This is a subset of the full specification, limited to the `ticket_parts` schema.
>
> You can find the full specification here: /_bundle/docs/references/@2.12/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.12'
  description: This is a subset of the full specification, limited to the `ticket_parts` schema.
  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: []
paths: {}
components:
  schemas:
    part_attachment:
      title: Part attachment
      type: object
      description: The file attached to a part
      properties:
        type:
          type: string
          description: The type of attachment
          example: upload
        name:
          type: string
          description: The name of the attachment
          example: example.png
        url:
          type: string
          description: The URL of the attachment
          example: https://picsum.photos/200/300
        content_type:
          type: string
          description: The content type of the attachment
          example: image/png
        filesize:
          type: integer
          description: The size of the attachment
          example: 100
        width:
          type: integer
          description: The width of the attachment
          example: 100
        height:
          type: integer
          description: The height of the attachment
          example: 100
    reference:
      title: Reference
      type: object
      description: reference to another object
      properties:
        type:
          type: string
          description: ''
          example: contact
        id:
          type: string
          nullable: true
          description: ''
          example: 1a2b3c
    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
        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
    ticket_part_author:
      title: Ticket part author
      type: object
      description: The author that wrote or triggered the part. Can be a bot, admin, team or user.
      properties:
        type:
          type: string
          description: The type of the author
          example: admin
          enum:
            - admin
            - bot
            - team
            - user
        id:
          type: string
          description: The id of the author
          example: '274'
        name:
          type: string
          nullable: true
          description: The name of the author
          example: Operator
        email:
          type: string
          format: email
          description: The email of the author
          example: operator+abcd1234@intercom.io
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
