# Conversation Parts

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

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.15'
  description: This is a subset of the full specification, limited to the `conversation_parts` schema. 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: []
paths: {}
components:
  schemas:
    conversation_part:
      title: Conversation Part
      type: object
      description: A Conversation Part represents a message in the conversation.
      properties:
        type:
          type: string
          description: Always conversation_part
          example: conversation_part
        id:
          type: string
          description: The id representing the conversation part.
          example: '3'
        part_type:
          type: string
          description: The type of conversation part.
          example: comment
        body:
          type: string
          nullable: true
          description: The message body, which may contain HTML. For Twitter, this will show a generic message regarding why the body is obscured. In webhook payloads for API version 2.15+, this field returns plain text.
          example: <p>Okay!</p>
        created_at:
          type: integer
          format: date-time
          description: The time the conversation part was created.
          example: 1663597223
        updated_at:
          type: integer
          format: date-time
          description: The last time the conversation part was updated.
          example: 1663597260
        notified_at:
          type: integer
          format: date-time
          description: The time the user was notified with the conversation part.
          example: 1663597260
        assigned_to:
          $ref: '#/components/schemas/reference'
          nullable: true
          description: The assignee this conversation_part assigned the conversation to, as a reference whose `type` is `admin`, `team` or `bot`. When the part unassigned the conversation, `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/conversation_part_author'
        attachments:
          title: Conversation 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 conversation part
          example: abcd1234
        redacted:
          type: boolean
          description: Whether or not the conversation part has been redacted.
          example: false
        email_message_metadata:
          $ref: '#/components/schemas/email_message_metadata'
          nullable: true
        metadata:
          $ref: '#/components/schemas/conversation_part_metadata'
          nullable: true
        state:
          type: string
          enum:
            - open
            - closed
            - snoozed
          description: Indicates the current state of conversation when the conversation part was created.
          example: open
        tags:
          type: array
          description: A list of tags objects associated with the conversation part.
          items:
            $ref: '#/components/schemas/tag_basic'
          nullable: true
        event_details:
          $ref: '#/components/schemas/event_details'
          nullable: true
        app_package_code:
          type: string
          nullable: true
          example: test-integration
          description: The app package code if this part was created via API. null if the part was not created via API.
    conversation_part_author:
      title: Conversation part author
      type: object
      description: The object who initiated the conversation, which can be a Contact, Admin or Team. Bots and campaigns send messages on behalf of Admins or Teams. For Twitter, this will be blank.
      properties:
        type:
          type: string
          description: The type of the author
          example: admin
        id:
          type: string
          description: The id of the author
          example: '274'
        name:
          type: string
          nullable: true
          description: The name of the author. `null` if the author is a contact that has since been archived or deleted.
          example: Operator
        email:
          type: string
          format: email
          nullable: true
          description: The email of the author. `null` if the author is a contact that has since been archived or deleted.
          example: operator+abcd1234@intercom.io
        from_ai_agent:
          type: boolean
          description: If this conversation part was sent by the AI Agent
          example: true
        is_ai_answer:
          type: boolean
          description: If this conversation part body was generated by the AI Agent
          example: false
    conversation_parts:
      title: Conversation Parts
      type: object
      description: A list of Conversation Part objects for each part message in the conversation. This is only returned when Retrieving a Conversation, and ignored when Listing all Conversations. There is a limit of 500 parts.
      properties:
        type:
          type: string
          description: ''
          enum:
            - conversation_part.list
          example: conversation_part.list
        conversation_parts:
          title: Conversation Parts
          type: array
          description: A list of Conversation Part objects for each part message in the conversation. This is only returned when Retrieving a Conversation, and ignored when Listing all Conversations. There is a limit of 500 parts.
          items:
            $ref: '#/components/schemas/conversation_part'
        total_count:
          type: integer
          description: ''
          example: 1
    conversation_part_metadata:
      title: Conversation Part Metadata
      description: Metadata for a conversation part
      type: object
      properties:
        quick_reply_options:
          type: array
          description: The quick reply options sent by the Admin or bot, presented in this conversation part.
          items:
            allOf:
              - $ref: '#/components/schemas/quick_reply_option'
            properties:
              translations:
                type: object
                nullable: true
                description: The translations for the quick reply option.
                example:
                  en: Hello
                  fr: Bonjour
        quick_reply_uuid:
          type: string
          format: uuid
          description: The unique identifier for the quick reply option that was clicked by the end user.
          example: 123e4567-e89b-12d3-a456-426614174000
    email_message_metadata:
      title: Email Message Metadata
      type: object
      description: Contains metadata if the message was sent as an email
      properties:
        subject:
          type: string
          description: The subject of the email
          example: Question about my order
        email_address_headers:
          title: Email Address Headers
          type: array
          description: A list of an email address headers.
          items:
            $ref: '#/components/schemas/email_address_header'
        message_id:
          type: string
          nullable: true
          description: The unique identifier for the email message as specified in the Message-ID header
          example: <CADKw7xrXzqSn8v3mP8K8Q8yZ6K8Q8yZ6@mail.gmail.com>
    event_details:
      title: Event details of Workflow & actions
      type: object
      anyOf:
        - $ref: '#/components/schemas/conversation_attribute_updated_by_workflow'
        - $ref: '#/components/schemas/conversation_attribute_updated_by_admin'
        - $ref: '#/components/schemas/conversation_attribute_updated_by_user'
        - $ref: '#/components/schemas/custom_action_started'
        - $ref: '#/components/schemas/custom_action_finished'
        - $ref: '#/components/schemas/operator_workflow_event'
    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
    tag_basic:
      title: Tag
      type: object
      x-tags:
        - Tags
      description: A tag allows you to label your contacts, companies, and conversations and list them using that tag.
      properties:
        type:
          type: string
          description: value is "tag"
          example: tag
        id:
          type: string
          description: The id of the tag
          example: '123456'
        name:
          type: string
          description: The name of the tag
          example: Test tag
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
