# 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.18/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.18'
  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. A part type this version does not recognise is returned as `unknown`; versions before 2.18 return `comment` for those parts. Every value other than `unknown` is also accepted by the `include_part_types` and `exclude_part_types` query parameters when retrieving a conversation.
          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
        user_ip:
          type: string
          nullable: true
          description: The IP address of the end user who authored this conversation part, when available. Null otherwise, including for parts not authored by an end user.
          example: 203.0.113.42
        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.
        admin_assignee_id:
          type: integer
          nullable: true
          description: The id of the teammate that this conversation_part assigned the conversation to, or 0 if the part removed the teammate. Null or absent when the part did not change the teammate, including an unassignment that did not name which assignee it cleared. A bot is reported here, because assignment treats anything that is not a team as a teammate.
          example: 991267715
        team_assignee_id:
          type: integer
          nullable: true
          description: The id of the team that this conversation_part assigned the conversation to, or 0 if the part removed the team. Null or absent when the part did not change the team, including an unassignment that did not name which assignee it cleared. A part can assign a team and a teammate at the same time, for example when the team uses Round Robin distribution and the teammate is resolved inline. In that case assigned_to reports only the teammate, and these two fields report each assignee separately.
          example: 5017691
        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
        receipts:
          type: object
          nullable: true
          description: What happened to this part for each recipient it was sent to. Null when delivery receipts have not been recorded for this part.
          properties:
            overall_state:
              type: string
              description: The state of the part across all recipients. The worst recipient state wins, except `partially_sent`, which means some recipients have it and others do not.
              enum:
                - failed_to_send
                - sending
                - sent
                - seen
                - partially_sent
              example: sent
            recipients:
              type: array
              description: One entry per recipient the part was sent to, in send order.
              items:
                type: object
                properties:
                  participant_id:
                    type: string
                    description: The id of the recipient, a contact id or an admin id.
                    example: 6762f0dd1bb69f9f2193bb83
                  participant_type:
                    type: string
                    description: Whether the recipient is a contact (`user`) or a teammate (`admin`).
                    enum:
                      - user
                      - admin
                    example: user
                  state:
                    type: string
                    description: The delivery state for this recipient.
                    enum:
                      - sending
                      - sent
                      - seen
                      - failed_to_send
                    example: sent
                  channel:
                    type: string
                    description: The channel the part was sent on.
                    example: email
                  state_updated_at:
                    type: integer
                    format: date-time
                    description: The time the state last changed, as a UTC Unix timestamp.
                    example: 1663597223
                  error_code:
                    type: string
                    nullable: true
                    description: The reason Intercom could not send to this recipient, when it could not. Null otherwise.
                    enum:
                      - email_address_ignored
                      - user_suppressed
                      - user_marked_as_spam
                      - user_mailbox_full_suppressed
                      - user_bounced
                      - user_not_contactable
                      - banned_domain
                      - reply_to_sender_only
                      - suppress_cc_emails
                      - unverified_cc_recipient
                      - null
                    example: user_bounced
                  address:
                    type: string
                    nullable: true
                    description: The email address the part was sent to, for contact recipients. Null for teammates or when it is not known.
                    example: joe@example.com
        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.
        translations:
          type: object
          nullable: true
          description: A map of the reply text keyed by locale code. Backs the `conversation.admin.replied.translated` webhook topic. `original` holds the locale code the reply was written in, when it is known; every other key holds the reply translated into that locale.
          properties:
            original:
              type: string
              description: The locale code identifying the language the reply was originally written in.
              example: en
          additionalProperties:
            type: string
          example:
            original: en
            en: <p>Hello</p>
            fr: <p>Bonjour</p>
    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_option_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
    call_summary:
      title: Part type - call_summary
      type: object
      description: Contains the id of the call the summary describes, for conversation part type <code>call_summary</code>. A conversation can contain several calls, and therefore several call summaries, so this identifies which call each summary belongs to. The id matches the <code>id</code> returned by the Calls API and by the <code>call.started</code>, <code>call.ended</code>, <code>call.recording_available</code> and <code>call.transcription_available</code> webhook topics.
      properties:
        call_id:
          type: string
          description: The id of the call the summary describes
          example: '3822007689'
    ai_agent_event_otp_email_verification_failed:
      title: Part type - ai_agent_event (otp_email_verification_failed)
      type: object
      description: Contains the reason Fin could not verify a contact by one-time passcode email, for conversation part type <code>ai_agent_event</code> when the event type is <code>otp_email_verification_failed</code>. Other <code>ai_agent_event</code> event types are not described here.
      properties:
        event:
          type: object
          description: The event the part records
          example:
            type: otp_email_verification_failed
            value: OTP email verification failed
            data:
              otp_email_verification_failed:
                reason: no_email
          properties:
            type:
              type: string
              description: The event type
              example: otp_email_verification_failed
            value:
              type: string
              description: A readable label for the event
              example: OTP email verification failed
            data:
              type: object
              description: Data recorded with the event. Empty when the failure was recorded without a reason.
              example:
                otp_email_verification_failed:
                  reason: no_email
              properties:
                otp_email_verification_failed:
                  type: object
                  description: Details of the failed verification
                  example:
                    reason: no_email
                  properties:
                    reason:
                      type: string
                      description: Why the one-time passcode email could not verify the contact. Treat this as a free-form string and fall back to <code>value</code> for a reason you do not recognise. <code>no_email</code> means the contact has no email address on record.
                      example: no_email
    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'
        - $ref: '#/components/schemas/call_summary'
        - $ref: '#/components/schemas/ai_agent_event_otp_email_verification_failed'
        - $ref: '#/components/schemas/standalone_platform_handoff'
    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
    standalone_platform_handoff:
      title: Part type - standalone_platform_handoff
      type: object
      description: Contains the handoff Fin attempted to an external platform, for conversation part type <code>standalone_platform_handoff</code>.
      properties:
        handoff:
          type: object
          description: The handoff Fin attempted.
          properties:
            type:
              type: string
              description: The handoff type. One of <code>zendesk_ticket</code>, <code>zendesk_agent</code>, <code>salesforce_case</code>, <code>salesforce_in_app_messaging</code>, <code>salesforce_team</code>, <code>external_agent</code> or <code>external_ticket</code>. Older parts can also return <code>salesforce_chat</code>.
              example: salesforce_case
            success:
              type: boolean
              nullable: true
              description: <code>true</code> when the handoff completed and <code>false</code> when it failed. <code>null</code> means no outcome was recorded on this part, for example a Salesforce in-app messaging handoff that was only initiated.
              example: true
            data:
              type: object
              description: Details of the handoff. Always present. For a successful <code>salesforce_case</code> handoff it holds the created Case's <code>case_id</code> and <code>case_number</code>; otherwise it is an empty object.
              properties:
                case_id:
                  type: string
                  description: The ID of the Salesforce Case created by the handoff.
                  example: 500XX0000001
                case_number:
                  type: string
                  description: The number of the Salesforce Case created by the handoff.
                  example: '00001234'
              example:
                case_id: 500XX0000001
                case_number: '00001234'
          example:
            type: salesforce_case
            success: true
            data:
              case_id: 500XX0000001
              case_number: '00001234'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
