# Conversation Part

> This is a subset of the full specification, limited to the `conversation_part` 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_part` 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:
    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_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_address_header:
      title: Email Address Header
      type: object
      description: Contains data for an email address header for a conversation part that was sent as an email.
      properties:
        type:
          type: string
          description: The type of email address header
          example: from
        email_address:
          type: string
          description: The email address
          example: jdoe@example.com
        name:
          type: string
          nullable: true
          description: The name associated with the email address
          example: Joe Example
    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>
    conversation_attribute_updated_by_workflow:
      title: Part type - conversation_attribute_updated_by_workflow
      type: object
      description: Contains details about the workflow that was triggered and any Custom Data Attributes (CDAs) that were modified during the workflow execution for conversation part type <code>conversation_attribute_updated_by_workflow</code>.
      properties:
        workflow:
          type: object
          properties:
            name:
              type: string
              description: Name of the workflow
              example: Workflow 1
        attribute:
          type: object
          properties:
            name:
              type: string
              description: Name of the CDA updated
              example: flight_category
        value:
          type: object
          properties:
            name:
              type: string
              description: Value of the CDA updated
              example: vip_status
    conversation_attribute_updated_by_admin:
      title: Part type - conversation_attribute_updated_by_admin
      type: object
      description: Contains details about Custom Data Attributes (CDAs) that were modified by an admin (operator) for conversation part type <code>conversation_attribute_updated_by_admin</code>.
      properties:
        attribute:
          type: object
          properties:
            name:
              type: string
              description: Name of the CDA updated
              example: jira_issue_key
        value:
          type: object
          properties:
            name:
              type: string
              description: Current value of the CDA updated
              example: PROJ-007
            previous:
              type: string
              nullable: true
              description: Previous value of the CDA
              example: PROJ-006
    conversation_attribute_updated_by_user:
      title: Part type - conversation_attribute_updated_by_user
      type: object
      description: Contains details about Custom Data Attributes (CDAs) that were modified by a user for conversation part type <code>conversation_attribute_updated_by_user</code>.
      properties:
        attribute:
          type: object
          properties:
            name:
              type: string
              description: Name of the CDA updated
              example: Priority
        value:
          type: object
          properties:
            name:
              type: string
              description: Current value of the CDA updated
              example: High
            previous:
              type: string
              nullable: true
              description: Previous value of the CDA (null for older events)
              example: Medium
    custom_action_started:
      title: Part type - custom_action_started
      type: object
      description: Contains details about name of the action that was initiated for conversation part type <code>custom_action_started</code>.
      properties:
        action:
          type: object
          properties:
            name:
              type: string
              description: Name of the action
              example: Jira Create Issue
    custom_action_finished:
      title: Part type - custom_action_finished
      type: object
      description: Contains details about final status of the completed action for conversation part type <code>custom_action_finished</code>.
      properties:
        action:
          type: object
          properties:
            name:
              type: string
              description: Name of the action
              example: Jira Create Issue
            result:
              type: string
              description: Status of the action
              enum:
                - success
                - failed
              example: success
    operator_workflow_event:
      title: Part type - operator_workflow_event
      type: object
      description: Contains details about name of the workflow for conversation part type <code>operator_workflow_event</code>.
      properties:
        workflow:
          type: object
          properties:
            name:
              type: string
              description: The name of the workflow
              example: Custom Bot 1
        event:
          type: object
          properties:
            type:
              type: string
              description: Type of the workflow event initiated
              example: wait_finished
            result:
              type: string
              description: Result of the workflow event
              example: Finsihed waiting
    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
    quick_reply_option:
      title: Quick Reply Option
      type: object
      properties:
        text:
          type: string
          description: The text to display in this quick reply option.
        uuid:
          type: string
          format: uuid
          description: A unique identifier for this quick reply option. This value will be available within the metadata of the comment conversation part that is created when a user clicks on this reply option.
      required:
        - text
        - uuid
    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
```
