> ## Documentation Index
> Fetch the complete documentation index at: https://deepline.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Intercom Retrieve Conversation: Inputs, Cost & CLI Example

> Retrieve a conversation. Intercom Intercom Retrieve Conversation docs include request fields, response shape, pricing notes, and Deepline CLI examples.

## Run in Enrichment Spreadsheet

<Info>
  Use this function as a column step in `deepline enrich`.
</Info>

```bash theme={null}
deepline enrich --input leads.csv --output leads.enriched.csv --with 'result=intercom_retrieve_conversation:{"conversation_id":"{{conversation_id}}"}' --json
```

<Tip>
  Map payload values to spreadsheet columns with `{{column_name}}` placeholders.
</Tip>

## Input Schema

| Name                           | Type      | Required | Default | Description                                                                                         |
| ------------------------------ | --------- | -------- | ------- | --------------------------------------------------------------------------------------------------- |
| `payload.conversation_id`      | `integer` | Yes      |         | The id of the conversation to target                                                                |
| `payload.display_as`           | `string`  | No       |         | Set to plaintext to retrieve conversation messages in plain text.                                   |
| `payload.include_translations` | `boolean` | No       |         | If set to true, conversation parts will be translated to the detected language of the conversation. |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "You can fetch the details of a single conversation. This will return a single Conversation model with all its conversation parts. {% admonition type=\"warning\" name=\"Hard limit of 500 parts\" %} The maximum number of conversation parts that can be returned via the API is 500. If you have more than that we will return the 500 most recent conversation parts. {% /admonition %} For AI agent conversation metadata, please note that you need to have the agent enabled in your workspace, which is a [paid feature](https://www.intercom.com/help/en/articles/8205718-fin-resolutions#h_97f8c2e671).",
    "properties": {
      "conversation_id": {
        "type": "integer",
        "description": "The id of the conversation to target"
      },
      "display_as": {
        "type": "string",
        "description": "Set to plaintext to retrieve conversation messages in plain text."
      },
      "include_translations": {
        "type": "boolean",
        "description": "If set to true, conversation parts will be translated to the detected language of the conversation."
      }
    },
    "required": [
      "conversation_id"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output Schema

| Name          | Type     | Required | Default | Description                                                                                                                                                                                       |
| ------------- | -------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `result.data` | `object` | Yes      |         | Conversations are how you can communicate with users in Intercom. They are created when a contact replies to an outbound message, or when one admin directly sends a message to a single contact. |
| `result.meta` | `object` | No       |         | Additional response metadata (status, paging).                                                                                                                                                    |

<details>
  <summary>Show raw output schema</summary>

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Standard tool result payload.",
    "properties": {
      "data": {
        "type": "object",
        "description": "Conversations are how you can communicate with users in Intercom. They are created when a contact replies to an outbound message, or when one admin directly sends a message to a single contact.",
        "properties": {
          "type": {
            "type": "string",
            "description": "Always conversation."
          },
          "id": {
            "type": "string",
            "description": "The id representing the conversation."
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "The title given to the conversation."
          },
          "created_at": {
            "type": "integer",
            "description": "The time the conversation was created.",
            "format": "date-time"
          },
          "updated_at": {
            "type": "integer",
            "description": "The last time the conversation was updated.",
            "format": "date-time"
          },
          "waiting_since": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The last time a Contact responded to an Admin. In other words, the time a customer started waiting for a response. Set to null if last reply is from an Admin.",
            "format": "date-time"
          },
          "snoozed_until": {
            "type": [
              "integer",
              "null"
            ],
            "description": "If set this is the time in the future when this conversation will be marked as open. i.e. it will be in a snoozed state until this time. i.e. it will be in a snoozed state until this time.",
            "format": "date-time"
          },
          "open": {
            "type": "boolean",
            "description": "Indicates whether a conversation is open (true) or closed (false)."
          },
          "state": {
            "type": "string",
            "description": "Can be set to \"open\", \"closed\" or \"snoozed\".",
            "enum": [
              "open",
              "closed",
              "snoozed"
            ]
          },
          "read": {
            "type": "boolean",
            "description": "Indicates whether a conversation has been read."
          },
          "priority": {
            "type": "string",
            "description": "If marked as priority, it will return priority or else not_priority.",
            "enum": [
              "priority",
              "not_priority"
            ]
          },
          "admin_assignee_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The id of the admin assigned to the conversation. If it's not assigned to an admin it will return null."
          },
          "team_assignee_id": {
            "type": [
              "integer",
              "null"
            ],
            "description": "The id of the team assigned to the conversation. If it's not assigned to a team it will return null."
          },
          "company": {
            "type": "object",
            "description": "Companies allow you to represent organizations using your product. Each company will have its own description and be associated with contacts. You can fetch, create, update and list companies.",
            "properties": {
              "type": {
                "type": "string",
                "description": "Value is `company`",
                "enum": [
                  "company"
                ]
              },
              "id": {
                "type": "string",
                "description": "The Intercom defined id representing the company."
              },
              "name": {
                "type": "string",
                "description": "The name of the company."
              },
              "app_id": {
                "type": "string",
                "description": "The Intercom defined code of the workspace the company is associated to."
              },
              "plan": {
                "type": "object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "Value is always \"plan\""
                  },
                  "id": {
                    "type": "string",
                    "description": "The id of the plan"
                  },
                  "name": {
                    "type": "string",
                    "description": "The name of the plan"
                  }
                },
                "additionalProperties": false
              },
              "company_id": {
                "type": "string",
                "description": "The company id you have defined for the company."
              },
              "remote_created_at": {
                "type": "integer",
                "description": "The time the company was created by you."
              },
              "created_at": {
                "type": "integer",
                "description": "The time the company was added in Intercom."
              },
              "updated_at": {
                "type": "integer",
                "description": "The last time the company was updated."
              },
              "last_request_at": {
                "type": "integer",
                "description": "The time the company last recorded making a request."
              },
              "size": {
                "type": "integer",
                "description": "The number of employees in the company."
              },
              "website": {
                "type": "string",
                "description": "The URL for the company website."
              },
              "industry": {
                "type": "string",
                "description": "The industry that the company operates in."
              },
              "monthly_spend": {
                "type": "integer",
                "description": "How much revenue the company generates for your business."
              },
              "session_count": {
                "type": "integer",
                "description": "How many sessions the company has recorded."
              },
              "user_count": {
                "type": "integer",
                "description": "The number of users in the company."
              },
              "custom_attributes": {
                "type": "object",
                "description": "The custom attributes you have set on the company.",
                "additionalProperties": {
                  "type": "string"
                }
              },
              "tags": {
                "type": "object",
                "description": "The list of tags associated with the company",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "The type of the object",
                    "enum": [
                      "tag.list"
                    ]
                  },
                  "tags": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "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\""
                        },
                        "id": {
                          "type": "string",
                          "description": "The id of the tag"
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the tag"
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              },
              "segments": {
                "type": "object",
                "description": "The list of segments associated with the company",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "The type of the object",
                    "enum": [
                      "segment.list"
                    ]
                  },
                  "segments": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "description": "A segment is a group of your contacts defined by the rules that you set.",
                      "properties": {
                        "type": {
                          "type": "string",
                          "description": "The type of object.",
                          "enum": [
                            "segment"
                          ]
                        },
                        "id": {
                          "type": "string",
                          "description": "The unique identifier representing the segment."
                        },
                        "name": {
                          "type": "string",
                          "description": "The name of the segment."
                        },
                        "created_at": {
                          "type": "integer",
                          "description": "The time the segment was created."
                        },
                        "updated_at": {
                          "type": "integer",
                          "description": "The time the segment was updated."
                        },
                        "person_type": {
                          "type": "string",
                          "description": "Type of the contact: contact (lead) or user.",
                          "enum": [
                            "contact",
                            "user"
                          ]
                        },
                        "count": {
                          "type": [
                            "integer",
                            "null"
                          ],
                          "description": "The number of items in the user segment. It's returned when `include_count=true` is included in the request."
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          "tags": {
            "type": "object",
            "description": "A list of tags objects associated with a conversation",
            "properties": {
              "type": {
                "type": "string",
                "description": "The type of the object",
                "enum": [
                  "tag.list"
                ]
              },
              "tags": {
                "type": "array",
                "description": "A list of tags objects associated with the conversation.",
                "items": {
                  "type": "object",
                  "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\""
                    },
                    "id": {
                      "type": "string",
                      "description": "The id of the tag"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the tag"
                    },
                    "applied_at": {
                      "type": [
                        "integer",
                        "null"
                      ],
                      "description": "The time when the tag was applied to the object. Only present when the tag is returned as part of a tagging operation on a contact, conversation, or ticket.",
                      "format": "date-time"
                    },
                    "applied_by": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "description": "reference to another object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "additionalProperties": false
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          },
          "conversation_rating": {
            "type": [
              "object",
              "null"
            ],
            "description": "The Conversation Rating object which contains information on the rating and/or remark added by a Contact and the Admin assigned to the conversation.",
            "properties": {
              "rating": {
                "type": "integer",
                "description": "The rating, between 1 and 5, for the conversation."
              },
              "remark": {
                "type": "string",
                "description": "An optional field to add a remark to correspond to the number rating"
              },
              "created_at": {
                "type": "integer",
                "description": "The time the rating was requested in the conversation being rated.",
                "format": "date-time"
              },
              "updated_at": {
                "type": "integer",
                "description": "The time the rating was last updated.",
                "format": "date-time"
              },
              "contact": {
                "type": "object",
                "description": "reference to contact object",
                "properties": {
                  "type": {
                    "type": "string",
                    "description": "always contact",
                    "enum": [
                      "contact"
                    ]
                  },
                  "id": {
                    "type": "string",
                    "description": "The unique identifier for the contact which is given by Intercom."
                  },
                  "external_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The unique identifier for the contact which is provided by the Client."
                  }
                },
                "additionalProperties": false
              },
              "teammate": {
                "type": "object",
                "description": "reference to another object",
                "properties": {
                  "type": {
                    "type": "string"
                  },
                  "id": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          },
          "source": {
            "type": "object",
            "description": "The type of the conversation part that started this conversation. Can be Contact, Admin, Campaign, Automated or Operator initiated.",
            "properties": {
              "type": {
                "type": "string",
                "description": "This includes conversation, email, facebook, instagram, phone_call, phone_switch, push, sms, twitter and whatsapp.",
                "enum": [
                  "conversation",
                  "email",
                  "facebook",
                  "instagram",
                  "phone_call",
                  "phone_switch",
                  "push",
                  "sms",
                  "twitter",
                  "whatsapp"
                ]
              },
              "id": {
                "type": "string",
                "description": "The id representing the message."
              },
              "delivered_as": {
                "type": "string",
                "description": "The conversation's initiation type. Possible values are customer_initiated, campaigns_initiated (legacy campaigns), operator_initiated (Custom bot), automated (Series and other outbounds with dynamic audience message) and admin_initiated (fixed audience message, ticket initiated by an admin, group email)."
              },
              "subject": {
                "type": "string",
                "description": "Optional. The message subject. For Twitter, this will show a generic message regarding why the subject is obscured. In webhook payloads for API version 2.15+, this field returns plain text."
              },
              "body": {
                "type": "string",
                "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."
              },
              "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"
                  },
                  "id": {
                    "type": "string",
                    "description": "The id of the author"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The name of the author"
                  },
                  "email": {
                    "type": "string",
                    "description": "The email of the author",
                    "format": "email"
                  },
                  "from_ai_agent": {
                    "type": "boolean",
                    "description": "If this conversation part was sent by the AI Agent"
                  },
                  "is_ai_answer": {
                    "type": "boolean",
                    "description": "If this conversation part body was generated by the AI Agent"
                  }
                },
                "additionalProperties": false
              },
              "attachments": {
                "type": "array",
                "description": "A list of attachments for the part.",
                "items": {
                  "type": "object",
                  "description": "The file attached to a part",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "The type of attachment"
                    },
                    "name": {
                      "type": "string",
                      "description": "The name of the attachment"
                    },
                    "url": {
                      "type": "string",
                      "description": "The URL of the attachment"
                    },
                    "content_type": {
                      "type": "string",
                      "description": "The content type of the attachment"
                    },
                    "filesize": {
                      "type": "integer",
                      "description": "The size of the attachment"
                    },
                    "width": {
                      "type": "integer",
                      "description": "The width of the attachment"
                    },
                    "height": {
                      "type": "integer",
                      "description": "The height of the attachment"
                    }
                  },
                  "additionalProperties": false
                }
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The URL where the conversation was started. For Twitter, Email, and Bots, this will be blank."
              },
              "redacted": {
                "type": "boolean",
                "description": "Whether or not the source message has been redacted. Only applicable for contact initiated messages."
              }
            },
            "additionalProperties": false
          },
          "contacts": {
            "type": "object",
            "description": "The list of contacts (users or leads) involved in this conversation. This will only contain one customer unless more were added via the group conversation feature.",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "contact.list"
                ]
              },
              "contacts": {
                "type": "array",
                "description": "The list of contacts (users or leads) involved in this conversation. This will only contain one customer unless more were added via the group conversation feature.",
                "items": {
                  "type": "object",
                  "description": "reference to contact object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "always contact",
                      "enum": [
                        "contact"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "description": "The unique identifier for the contact which is given by Intercom."
                    },
                    "external_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The unique identifier for the contact which is provided by the Client."
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          },
          "teammates": {
            "type": [
              "object",
              "null"
            ],
            "description": "The list of teammates who participated in the conversation (wrote at least one conversation part).",
            "properties": {
              "type": {
                "type": "string",
                "description": "The type of the object - `admin.list`."
              },
              "teammates": {
                "type": "array",
                "description": "The list of teammates who participated in the conversation (wrote at least one conversation part).",
                "items": {
                  "type": "object",
                  "description": "reference to another object",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          },
          "custom_attributes": {
            "type": "object",
            "description": "An object containing the different custom attributes associated to the conversation as key-value pairs. For relationship attributes the value will be a list of custom object instance models. System-defined attributes such as \"CX Score rating\" and \"CX Score explanation\" may also be included.",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                },
                {
                  "type": "object",
                  "additionalProperties": true
                },
                {
                  "type": "object",
                  "description": "The list of associated custom object instances for a given reference attribute on the parent object.",
                  "properties": {
                    "type": {
                      "type": "string"
                    },
                    "instances": {
                      "type": "array",
                      "description": "The list of associated custom object instances for a given reference attribute on the parent object.",
                      "items": {
                        "type": [
                          "object",
                          "null"
                        ],
                        "description": "A Custom Object Instance represents an instance of a custom object type. This allows you to create and set custom attributes to store data about your customers that is not already captured by Intercom. The parent object includes recommended default attributes and you can add your own custom attributes.",
                        "properties": {
                          "id": {
                            "type": "string",
                            "description": "The Intercom defined id representing the custom object instance."
                          },
                          "external_id": {
                            "type": "string",
                            "description": "The id you have defined for the custom object instance."
                          },
                          "external_created_at": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "The time when the Custom Object instance was created in the external system it originated from.",
                            "format": "date-time"
                          },
                          "external_updated_at": {
                            "type": [
                              "integer",
                              "null"
                            ],
                            "description": "The time when the Custom Object instance was last updated in the external system it originated from.",
                            "format": "date-time"
                          },
                          "created_at": {
                            "type": "integer",
                            "description": "The time the attribute was created as a UTC Unix timestamp",
                            "format": "date-time"
                          },
                          "updated_at": {
                            "type": "integer",
                            "description": "The time the attribute was last updated as a UTC Unix timestamp",
                            "format": "date-time"
                          },
                          "type": {
                            "type": "string",
                            "description": "The identifier of the custom object type that defines the structure of the custom object instance."
                          },
                          "custom_attributes": {
                            "type": "object",
                            "description": "The custom attributes you have set on the custom object instance.",
                            "additionalProperties": {
                              "type": "string"
                            }
                          }
                        },
                        "additionalProperties": false
                      }
                    }
                  },
                  "additionalProperties": false
                }
              ]
            }
          },
          "first_contact_reply": {
            "type": [
              "object",
              "null"
            ],
            "description": "An object containing information on the first users message. For a contact initiated message this will represent the users original message.",
            "properties": {
              "created_at": {
                "type": "integer",
                "format": "date-time"
              },
              "type": {
                "type": "string"
              },
              "url": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "additionalProperties": false
          },
          "sla_applied": {
            "type": [
              "object",
              "null"
            ],
            "description": "The SLA Applied object contains the details for which SLA has been applied to this conversation. Important: if there are any canceled sla_events for the conversation - meaning an SLA has been manually removed from a conversation, the sla_status will always be returned as null.",
            "properties": {
              "type": {
                "type": "string",
                "description": "object type"
              },
              "sla_name": {
                "type": "string",
                "description": "The name of the SLA as given by the teammate when it was created."
              },
              "sla_status": {
                "type": "string",
                "description": "SLA statuses: - `hit`: If there’s at least one hit event in the underlying sla_events table, and no “missed” or “canceled” events for the conversation. - `missed`: If there are any missed sla_events for the conversation and no canceled events. If there’s even a single missed sla event, the status will always be missed. A missed status is not applied when the SLA expires, only the next time a teammate replies. - `active`: An SLA has been applied to a conversation, but has not yet been fulfilled. SLA status is active only if there are no “hit, “missed”, or “canceled” events.",
                "enum": [
                  "hit",
                  "missed",
                  "cancelled",
                  "active"
                ]
              }
            },
            "additionalProperties": false
          },
          "statistics": {
            "type": [
              "object",
              "null"
            ],
            "description": "A Statistics object containing all information required for reporting, with timestamps and calculated metrics.",
            "properties": {
              "type": {
                "type": "string"
              },
              "time_to_assignment": {
                "type": "integer",
                "description": "Duration until last assignment before first admin reply. In seconds."
              },
              "time_to_admin_reply": {
                "type": "integer",
                "description": "Duration until first admin reply. Subtracts out of business hours. In seconds."
              },
              "time_to_first_close": {
                "type": "integer",
                "description": "Duration until conversation was closed first time. Subtracts out of business hours. In seconds."
              },
              "time_to_last_close": {
                "type": "integer",
                "description": "Duration until conversation was closed last time. Subtracts out of business hours. In seconds."
              },
              "median_time_to_reply": {
                "type": "integer",
                "description": "Median based on all admin replies after a contact reply. Subtracts out of business hours. In seconds."
              },
              "first_contact_reply_at": {
                "type": "integer",
                "description": "Time of first text conversation part from a contact.",
                "format": "date-time"
              },
              "first_assignment_at": {
                "type": "integer",
                "description": "Time of first assignment after first_contact_reply_at.",
                "format": "date-time"
              },
              "first_admin_reply_at": {
                "type": "integer",
                "description": "Time of first admin reply after first_contact_reply_at.",
                "format": "date-time"
              },
              "first_close_at": {
                "type": "integer",
                "description": "Time of first close after first_contact_reply_at.",
                "format": "date-time"
              },
              "last_assignment_at": {
                "type": "integer",
                "description": "Time of last assignment after first_contact_reply_at.",
                "format": "date-time"
              },
              "last_assignment_admin_reply_at": {
                "type": "integer",
                "description": "Time of first admin reply since most recent assignment.",
                "format": "date-time"
              },
              "last_contact_reply_at": {
                "type": "integer",
                "description": "Time of the last conversation part from a contact.",
                "format": "date-time"
              },
              "last_admin_reply_at": {
                "type": "integer",
                "description": "Time of the last conversation part from an admin.",
                "format": "date-time"
              },
              "last_close_at": {
                "type": "integer",
                "description": "Time of the last conversation close.",
                "format": "date-time"
              },
              "last_closed_by_id": {
                "type": "string",
                "description": "The last admin who closed the conversation. Returns a reference to an Admin object."
              },
              "count_reopens": {
                "type": "integer",
                "description": "Number of reopens after first_contact_reply_at."
              },
              "count_assignments": {
                "type": "integer",
                "description": "Number of assignments after first_contact_reply_at."
              },
              "count_conversation_parts": {
                "type": "integer",
                "description": "Total number of conversation parts."
              },
              "assigned_team_first_response_time": {
                "type": "array",
                "description": "An array of conversation response time objects",
                "items": {
                  "type": "object",
                  "description": "Details of first response time of assigned team in seconds.",
                  "properties": {
                    "team_id": {
                      "type": "integer",
                      "description": "Id of the assigned team."
                    },
                    "team_name": {
                      "type": "string",
                      "description": "Name of the assigned Team, null if team does not exist, Unassigned if no team is assigned."
                    },
                    "response_time": {
                      "type": "integer",
                      "description": "First response time of assigned team in seconds."
                    }
                  },
                  "additionalProperties": false
                }
              },
              "assigned_team_first_response_time_in_office_hours": {
                "type": "array",
                "description": "An array of conversation response time objects within office hours",
                "items": {
                  "type": "object",
                  "description": "Details of first response time of assigned team in seconds.",
                  "properties": {
                    "team_id": {
                      "type": "integer",
                      "description": "Id of the assigned team."
                    },
                    "team_name": {
                      "type": "string",
                      "description": "Name of the assigned Team, null if team does not exist, Unassigned if no team is assigned."
                    },
                    "response_time": {
                      "type": "integer",
                      "description": "First response time of assigned team in seconds."
                    }
                  },
                  "additionalProperties": false
                }
              },
              "handling_time": {
                "type": "integer",
                "description": "Time from conversation assignment to conversation close in seconds."
              },
              "adjusted_handling_time": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "Adjusted handling time for conversation in seconds. This is the active handling time excluding idle periods when teammates are not actively working on the conversation."
              }
            },
            "additionalProperties": false
          },
          "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",
                "enum": [
                  "conversation_part.list"
                ]
              },
              "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": {
                  "type": "object",
                  "description": "A Conversation Part represents a message in the conversation.",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "Always conversation_part"
                    },
                    "id": {
                      "type": "string",
                      "description": "The id representing the conversation part."
                    },
                    "part_type": {
                      "type": "string",
                      "description": "The type of conversation part."
                    },
                    "body": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "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."
                    },
                    "created_at": {
                      "type": "integer",
                      "description": "The time the conversation part was created.",
                      "format": "date-time"
                    },
                    "updated_at": {
                      "type": "integer",
                      "description": "The last time the conversation part was updated.",
                      "format": "date-time"
                    },
                    "notified_at": {
                      "type": "integer",
                      "description": "The time the user was notified with the conversation part.",
                      "format": "date-time"
                    },
                    "assigned_to": {
                      "type": "object",
                      "description": "reference to another object",
                      "properties": {
                        "type": {
                          "type": "string"
                        },
                        "id": {
                          "type": [
                            "string",
                            "null"
                          ]
                        }
                      },
                      "additionalProperties": false
                    },
                    "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"
                        },
                        "id": {
                          "type": "string",
                          "description": "The id of the author"
                        },
                        "name": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The name of the author"
                        },
                        "email": {
                          "type": "string",
                          "description": "The email of the author",
                          "format": "email"
                        },
                        "from_ai_agent": {
                          "type": "boolean",
                          "description": "If this conversation part was sent by the AI Agent"
                        },
                        "is_ai_answer": {
                          "type": "boolean",
                          "description": "If this conversation part body was generated by the AI Agent"
                        }
                      },
                      "additionalProperties": false
                    },
                    "attachments": {
                      "type": "array",
                      "description": "A list of attachments for the part.",
                      "items": {
                        "type": "object",
                        "description": "The file attached to a part",
                        "properties": {
                          "type": {
                            "type": "string",
                            "description": "The type of attachment"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the attachment"
                          },
                          "url": {
                            "type": "string",
                            "description": "The URL of the attachment"
                          },
                          "content_type": {
                            "type": "string",
                            "description": "The content type of the attachment"
                          },
                          "filesize": {
                            "type": "integer",
                            "description": "The size of the attachment"
                          },
                          "width": {
                            "type": "integer",
                            "description": "The width of the attachment"
                          },
                          "height": {
                            "type": "integer",
                            "description": "The height of the attachment"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "external_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The external id of the conversation part"
                    },
                    "redacted": {
                      "type": "boolean",
                      "description": "Whether or not the conversation part has been redacted."
                    },
                    "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"
                        },
                        "email_address_headers": {
                          "type": "array",
                          "description": "A list of an email address headers.",
                          "items": {
                            "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"
                              },
                              "email_address": {
                                "type": "string",
                                "description": "The email address"
                              },
                              "name": {
                                "type": [
                                  "string",
                                  "null"
                                ],
                                "description": "The name associated with the email address"
                              }
                            },
                            "additionalProperties": false
                          }
                        },
                        "message_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "description": "The unique identifier for the email message as specified in the Message-ID header"
                        }
                      },
                      "additionalProperties": false
                    },
                    "metadata": {
                      "type": "object",
                      "description": "Metadata for a conversation part",
                      "properties": {
                        "quick_reply_options": {
                          "type": "array",
                          "description": "The quick reply options sent by the Admin or bot, presented in this conversation part.",
                          "items": {
                            "type": "object",
                            "properties": {
                              "text": {
                                "type": "string",
                                "description": "The text to display in this quick reply option."
                              },
                              "uuid": {
                                "type": "string",
                                "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.",
                                "format": "uuid"
                              }
                            },
                            "required": [
                              "text",
                              "uuid"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "quick_reply_uuid": {
                          "type": "string",
                          "description": "The unique identifier for the quick reply option that was clicked by the end user.",
                          "format": "uuid"
                        }
                      },
                      "additionalProperties": false
                    },
                    "state": {
                      "type": "string",
                      "description": "Indicates the current state of conversation when the conversation part was created.",
                      "enum": [
                        "open",
                        "closed",
                        "snoozed"
                      ]
                    },
                    "tags": {
                      "type": [
                        "array",
                        "null"
                      ],
                      "description": "A list of tags objects associated with the conversation part.",
                      "items": {
                        "type": "object",
                        "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\""
                          },
                          "id": {
                            "type": "string",
                            "description": "The id of the tag"
                          },
                          "name": {
                            "type": "string",
                            "description": "The name of the tag"
                          }
                        },
                        "additionalProperties": false
                      }
                    },
                    "event_details": {
                      "type": "object",
                      "anyOf": [
                        {
                          "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 conversation_attribute_updated_by_workflow .",
                          "properties": {
                            "workflow": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Name of the workflow"
                                }
                              },
                              "additionalProperties": false
                            },
                            "attribute": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Name of the CDA updated"
                                }
                              },
                              "additionalProperties": false
                            },
                            "value": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Value of the CDA updated"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "description": "Contains details about Custom Data Attributes (CDAs) that were modified by an admin (operator) for conversation part type conversation_attribute_updated_by_admin .",
                          "properties": {
                            "attribute": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Name of the CDA updated"
                                }
                              },
                              "additionalProperties": false
                            },
                            "value": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Current value of the CDA updated"
                                },
                                "previous": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Previous value of the CDA"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "description": "Contains details about Custom Data Attributes (CDAs) that were modified by a user for conversation part type conversation_attribute_updated_by_user .",
                          "properties": {
                            "attribute": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Name of the CDA updated"
                                }
                              },
                              "additionalProperties": false
                            },
                            "value": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Current value of the CDA updated"
                                },
                                "previous": {
                                  "type": [
                                    "string",
                                    "null"
                                  ],
                                  "description": "Previous value of the CDA (null for older events)"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "description": "Contains details about name of the action that was initiated for conversation part type custom_action_started .",
                          "properties": {
                            "action": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Name of the action"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "description": "Contains details about final status of the completed action for conversation part type custom_action_finished .",
                          "properties": {
                            "action": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "Name of the action"
                                },
                                "result": {
                                  "type": "string",
                                  "description": "Status of the action",
                                  "enum": [
                                    "success",
                                    "failed"
                                  ]
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "description": "Contains details about name of the workflow for conversation part type operator_workflow_event .",
                          "properties": {
                            "workflow": {
                              "type": "object",
                              "properties": {
                                "name": {
                                  "type": "string",
                                  "description": "The name of the workflow"
                                }
                              },
                              "additionalProperties": false
                            },
                            "event": {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "description": "Type of the workflow event initiated"
                                },
                                "result": {
                                  "type": "string",
                                  "description": "Result of the workflow event"
                                }
                              },
                              "additionalProperties": false
                            }
                          },
                          "additionalProperties": false
                        }
                      ]
                    },
                    "app_package_code": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The app package code if this part was created via API. null if the part was not created via API."
                    }
                  },
                  "additionalProperties": false
                }
              },
              "total_count": {
                "type": "integer"
              }
            },
            "additionalProperties": false
          },
          "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"
                ]
              },
              "total_count": {
                "type": "integer",
                "description": "The total number of linked objects."
              },
              "has_more": {
                "type": "boolean",
                "description": "Whether or not there are more linked objects than returned."
              },
              "data": {
                "type": "array",
                "description": "An array containing the linked conversations and linked tickets.",
                "items": {
                  "type": "object",
                  "description": "A linked conversation or ticket.",
                  "properties": {
                    "type": {
                      "type": "string",
                      "description": "ticket or conversation",
                      "enum": [
                        "ticket",
                        "conversation"
                      ]
                    },
                    "id": {
                      "type": "string",
                      "description": "The ID of the linked object"
                    },
                    "category": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "Category of the Linked Ticket Object.",
                      "enum": [
                        "Customer",
                        "Back-office",
                        "Tracker",
                        null
                      ]
                    }
                  },
                  "additionalProperties": false
                }
              }
            },
            "additionalProperties": false
          },
          "ai_agent_participated": {
            "type": "boolean",
            "description": "Indicates whether the AI Agent participated in the conversation."
          },
          "ai_agent": {
            "type": "object",
            "description": "Data related to AI Agent involvement in the conversation.",
            "properties": {
              "source_type": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The type of the source that triggered AI Agent involvement in the conversation.",
                "enum": [
                  "essentials_plan_setup",
                  "profile",
                  "workflow",
                  "workflow_preview",
                  "fin_preview"
                ]
              },
              "source_title": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The title of the source that triggered AI Agent involvement in the conversation. If this is `essentials_plan_setup` then it will return `null`."
              },
              "last_answer_type": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The type of the last answer delivered by AI Agent. If no answer was delivered then this will return `null`",
                "enum": [
                  null,
                  "ai_answer",
                  "custom_answer"
                ]
              },
              "resolution_state": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The resolution state of AI Agent. If no AI or custom answer has been delivered then this will return `null`.",
                "enum": [
                  "assumed_resolution",
                  "confirmed_resolution",
                  "escalated",
                  "negative_feedback",
                  "procedure_handoff",
                  null
                ]
              },
              "rating": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "The customer satisfaction rating given to AI Agent, from 1-5."
              },
              "rating_remark": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "The customer satisfaction rating remark given to AI Agent."
              },
              "created_at": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "The time when the AI agent rating was created.",
                "format": "date-time"
              },
              "updated_at": {
                "type": [
                  "integer",
                  "null"
                ],
                "description": "The time when the AI agent rating was last updated.",
                "format": "date-time"
              },
              "content_sources": {
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "content_source.list"
                    ]
                  },
                  "total_count": {
                    "type": "integer",
                    "description": "The total number of content sources used by AI Agent in the conversation."
                  },
                  "content_sources": {
                    "type": "array",
                    "description": "The content sources used by AI Agent in the conversation.",
                    "items": {
                      "type": "object",
                      "description": "The content source used by AI Agent in the conversation.",
                      "properties": {
                        "content_type": {
                          "type": "string",
                          "description": "The type of the content source.",
                          "enum": [
                            "file",
                            "article",
                            "external_content",
                            "content_snippet",
                            "workflow_connector_action"
                          ]
                        },
                        "url": {
                          "type": "string",
                          "description": "The internal URL linking to the content source for teammates."
                        },
                        "title": {
                          "type": "string",
                          "description": "The title of the content source."
                        },
                        "locale": {
                          "type": "string",
                          "description": "The ISO 639 language code of the content source."
                        }
                      },
                      "additionalProperties": false
                    }
                  }
                },
                "additionalProperties": false
              }
            },
            "additionalProperties": false
          }
        },
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "description": "Additional response metadata (status, paging).",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Advanced: Direct CLI

<Info>
  Use direct execution for single payload debugging.
</Info>

```bash theme={null}
deepline tools execute intercom_retrieve_conversation --payload '{
  "conversation_id": "integer"
}' --json
```

### CLI flags

| Flag                        | Description                                         |
| --------------------------- | --------------------------------------------------- |
| `--json`                    | Print machine-readable output.                      |
| `--wait`                    | Wait for terminal provider status when supported.   |
| `--debug`                   | Enable wait mode with additional status/log output. |
| `--wait-timeout SECONDS`    | Max seconds to wait in wait mode.                   |
| `--poll-interval SECONDS`   | Polling interval in seconds during wait mode.       |
| `--timeout SECONDS`         | Request timeout in seconds.                         |
| `--connect-timeout SECONDS` | Connection timeout in seconds.                      |

## Cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.
* Billing mode: `no_bill`.
