# Redact a conversation part

You can redact a conversation part or the source message of a conversation (as seen in the source object).

{% admonition type="info" name="Redacting parts and messages" %}
If you are redacting a conversation part, it must have a body. If you are redacting a source message, it must have been created by a contact. We will return a conversation_part_not_redactable error if these criteria are not met.
{% /admonition %}

Endpoint: POST /conversations/redact
Version: 2.15
Security: bearerAuth

## Header parameters:

  - `Intercom-Version` (string)
    Intercom API version.By default, it's equal to the version set in the app package.
    Enum: "1.0", "1.1", "1.2", "1.3", "1.4", "2.0", "2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "2.8", "2.9", "2.10", "2.11", "2.12", "2.13", "2.14"

## Response 200 fields (application/json):

  - `type` (string)
    Always conversation.
    Example: "conversation"

  - `id` (string)
    The id representing the conversation.
    Example: "1295"

  - `title` (string,null)
    The title given to the conversation.
    Example: "Conversation Title"

  - `created_at` (integer)
    The time the conversation was created.
    Example: 1663597223

  - `updated_at` (integer)
    The last time the conversation was updated.
    Example: 1663597260

  - `waiting_since` (integer,null)
    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.
    Example: 1663597260

  - `snoozed_until` (integer,null)
    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.
    Example: 1663597260

  - `open` (boolean)
    Indicates whether a conversation is open (true) or closed (false).
    Example: true

  - `state` (string)
    Can be set to "open", "closed" or "snoozed".
    Enum: "open", "closed", "snoozed"

  - `read` (boolean)
    Indicates whether a conversation has been read.
    Example: true

  - `priority` (string)
    If marked as priority, it will return priority or else not_priority.
    Enum: "priority", "not_priority"

  - `admin_assignee_id` (integer,null)
    The id of the admin assigned to the conversation. If it's not assigned to an admin it will return null.

  - `team_assignee_id` (integer,null)
    The id of the team assigned to the conversation. If it's not assigned to a team it will return null.
    Example: 5017691

  - `company` (object)
    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.

  - `company.type` (string)
    Value is company
    Enum: "company"

  - `company.id` (string)
    The Intercom defined id representing the company.
    Example: "531ee472cce572a6ec000006"

  - `company.name` (string)
    The name of the company.
    Example: "Blue Sun"

  - `company.app_id` (string)
    The Intercom defined code of the workspace the company is associated to.
    Example: "ecahpwf5"

  - `company.plan` (object)

  - `company.plan.type` (string)
    Value is always "plan"
    Example: "plan"

  - `company.plan.id` (string)
    The id of the plan
    Example: "269315"

  - `company.plan.name` (string)
    The name of the plan
    Example: "Pro"

  - `company.company_id` (string)
    The company id you have defined for the company.
    Example: "6"

  - `company.remote_created_at` (integer)
    The time the company was created by you.
    Example: 1663597223

  - `company.created_at` (integer)
    The time the company was added in Intercom.
    Example: 1663597223

  - `company.updated_at` (integer)
    The last time the company was updated.
    Example: 1663597223

  - `company.last_request_at` (integer)
    The time the company last recorded making a request.
    Example: 1663597223

  - `company.size` (integer)
    The number of employees in the company.
    Example: 100

  - `company.website` (string)
    The URL for the company website.
    Example: "https://www.intercom.com"

  - `company.industry` (string)
    The industry that the company operates in.
    Example: "Software"

  - `company.monthly_spend` (integer)
    How much revenue the company generates for your business.
    Example: 100

  - `company.session_count` (integer)
    How many sessions the company has recorded.
    Example: 100

  - `company.user_count` (integer)
    The number of users in the company.
    Example: 100

  - `company.custom_attributes` (object)
    The custom attributes you have set on the company.
    Example: {"paid_subscriber":true,"monthly_spend":155.5,"team_mates":9}

  - `company.tags` (object)
    The list of tags associated with the company

  - `company.tags.type` (string)
    The type of the object
    Enum: "tag.list"

  - `company.tags.tags` (array)

  - `company.tags.tags.type` (string)
    value is "tag"
    Example: "tag"

  - `company.tags.tags.id` (string)
    The id of the tag
    Example: "123456"

  - `company.tags.tags.name` (string)
    The name of the tag
    Example: "Test tag"

  - `company.segments` (object)
    The list of segments associated with the company

  - `company.segments.type` (string)
    The type of the object
    Enum: "segment.list"

  - `company.segments.segments` (array)

  - `company.segments.segments.type` (string)
    The type of object.
    Enum: "segment"

  - `company.segments.segments.id` (string)
    The unique identifier representing the segment.
    Example: "56203d253cba154d39010062"

  - `company.segments.segments.name` (string)
    The name of the segment.
    Example: "Active"

  - `company.segments.segments.created_at` (integer)
    The time the segment was created.
    Example: 1394621988

  - `company.segments.segments.updated_at` (integer)
    The time the segment was updated.
    Example: 1394622004

  - `company.segments.segments.person_type` (string)
    Type of the contact: contact (lead) or user.
    Enum: "contact", "user"

  - `company.segments.segments.count` (integer,null)
    The number of items in the user segment. It's returned when include_count=true is included in the request.
    Example: 3

  - `tags` (object)
    A list of tags objects associated with a conversation

  - `tags.type` (string)
    The type of the object
    Enum: "tag.list"

  - `tags.tags` (array)
    A list of tags objects associated with the conversation.

  - `tags.tags.type` (string)
    value is "tag"
    Example: "tag"

  - `tags.tags.id` (string)
    The id of the tag
    Example: "123456"

  - `tags.tags.name` (string)
    The name of the tag
    Example: "Test tag"

  - `tags.tags.applied_at` (integer,null)
    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.
    Example: 1663597223

  - `tags.tags.applied_by` (object,null)
    The admin who applied the tag. Only present when the tag is returned as part of a tagging operation on a contact, conversation, or ticket.

  - `tags.tags.applied_by.type` (string)
    Example: "contact"

  - `tags.tags.applied_by.id` (string,null)
    Example: "1a2b3c"

  - `conversation_rating` (object,null)
    The Conversation Rating object which contains information on the rating and/or remark added by a Contact and the Admin assigned to the conversation.

  - `conversation_rating.rating` (integer)
    The rating, between 1 and 5, for the conversation.
    Example: 5

  - `conversation_rating.remark` (string)
    An optional field to add a remark to correspond to the number rating

  - `conversation_rating.created_at` (integer)
    The time the rating was requested in the conversation being rated.
    Example: 1671028894

  - `conversation_rating.updated_at` (integer)
    The time the rating was last updated.
    Example: 1671028894

  - `conversation_rating.contact` (object)
    reference to contact object

  - `conversation_rating.contact.type` (string)
    always contact
    Enum: "contact"

  - `conversation_rating.contact.id` (string)
    The unique identifier for the contact which is given by Intercom.
    Example: "5ba682d23d7cf92bef87bfd4"

  - `conversation_rating.contact.external_id` (string,null)
    The unique identifier for the contact which is provided by the Client.
    Example: "70"

  - `conversation_rating.teammate` (object)
    reference to another object

  - `conversation_rating.teammate.type` (string)
    Example: "contact"

  - `conversation_rating.teammate.id` (string,null)
    Example: "1a2b3c"

  - `source` (object)
    The type of the conversation part that started this conversation. Can be Contact, Admin, Campaign, Automated or Operator initiated.

  - `source.type` (string)
    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"

  - `source.id` (string)
    The id representing the message.
    Example: "3"

  - `source.delivered_as` (string)
    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).
    Example: "operator_initiated"

  - `source.subject` (string)
    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.

  - `source.body` (string)
    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>Hey there!</p>"

  - `source.author` (object)
    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.

  - `source.author.type` (string)
    The type of the author
    Example: "admin"

  - `source.author.id` (string)
    The id of the author
    Example: "274"

  - `source.author.name` (string,null)
    The name of the author
    Example: "Operator"

  - `source.author.email` (string)
    The email of the author
    Example: "operator+abcd1234@intercom.io"

  - `source.author.from_ai_agent` (boolean)
    If this conversation part was sent by the AI Agent
    Example: true

  - `source.author.is_ai_answer` (boolean)
    If this conversation part body was generated by the AI Agent

  - `source.attachments` (array)
    A list of attachments for the part.

  - `source.attachments.type` (string)
    The type of attachment
    Example: "upload"

  - `source.attachments.name` (string)
    The name of the attachment
    Example: "example.png"

  - `source.attachments.url` (string)
    The URL of the attachment
    Example: "https://picsum.photos/200/300"

  - `source.attachments.content_type` (string)
    The content type of the attachment
    Example: "image/png"

  - `source.attachments.filesize` (integer)
    The size of the attachment
    Example: 100

  - `source.attachments.width` (integer)
    The width of the attachment
    Example: 100

  - `source.attachments.height` (integer)
    The height of the attachment
    Example: 100

  - `source.url` (string,null)
    The URL where the conversation was started. For Twitter, Email, and Bots, this will be blank.

  - `source.redacted` (boolean)
    Whether or not the source message has been redacted. Only applicable for contact initiated messages.

  - `contacts` (object)
    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.

  - `contacts.type` (string)
    Enum: "contact.list"

  - `contacts.contacts` (array)
    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.

  - `teammates` (object,null)
    The list of teammates who participated in the conversation (wrote at least one conversation part).

  - `teammates.type` (string)
    The type of the object - admin.list.
    Example: "admin.list"

  - `teammates.teammates` (array)
    The list of teammates who participated in the conversation (wrote at least one conversation part).

  - `custom_attributes` (object)
    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.
    Example: {"paid_subscriber":true,"monthly_spend":155.5,"team_mates":9,"start_date_iso8601":"2023-03-04T09:46:14Z","end_date_timestamp":1677923174,"CX Score rating":4,"CX Score explanation":"The conversation was resolved quickly and the customer expressed satisfaction with the outcome."}

  - `first_contact_reply` (object,null)
    An object containing information on the first users message. For a contact initiated message this will represent the users original message.

  - `first_contact_reply.created_at` (integer)
    Example: 1663597223

  - `first_contact_reply.type` (string)
    Example: "conversation"

  - `first_contact_reply.url` (string,null)
    Example: "https://developers.intercom.com/"

  - `sla_applied` (object,null)
    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.

  - `sla_applied.type` (string)
    object type
    Example: "conversation_sla_summary"

  - `sla_applied.sla_name` (string)
    The name of the SLA as given by the teammate when it was created.

  - `sla_applied.sla_status` (string)
    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"

  - `statistics` (object,null)
    A Statistics object containing all information required for reporting, with timestamps and calculated metrics.

  - `statistics.type` (string)
    Example: "conversation_statistics"

  - `statistics.time_to_assignment` (integer)
    Duration until last assignment before first admin reply. In seconds.
    Example: 2310

  - `statistics.time_to_admin_reply` (integer)
    Duration until first admin reply. Subtracts out of business hours. In seconds.
    Example: 2310

  - `statistics.time_to_first_close` (integer)
    Duration until conversation was closed first time. Subtracts out of business hours. In seconds.
    Example: 2310

  - `statistics.time_to_last_close` (integer)
    Duration until conversation was closed last time. Subtracts out of business hours. In seconds.
    Example: 2310

  - `statistics.median_time_to_reply` (integer)
    Median based on all admin replies after a contact reply. Subtracts out of business hours. In seconds.
    Example: 2310

  - `statistics.first_contact_reply_at` (integer)
    Time of first text conversation part from a contact.
    Example: 1663597233

  - `statistics.first_assignment_at` (integer)
    Time of first assignment after first_contact_reply_at.
    Example: 1663597233

  - `statistics.first_admin_reply_at` (integer)
    Time of first admin reply after first_contact_reply_at.
    Example: 1663597233

  - `statistics.first_close_at` (integer)
    Time of first close after first_contact_reply_at.
    Example: 1663597233

  - `statistics.last_assignment_at` (integer)
    Time of last assignment after first_contact_reply_at.
    Example: 1663597233

  - `statistics.last_assignment_admin_reply_at` (integer)
    Time of first admin reply since most recent assignment.
    Example: 1663597233

  - `statistics.last_contact_reply_at` (integer)
    Time of the last conversation part from a contact.
    Example: 1663597233

  - `statistics.last_admin_reply_at` (integer)
    Time of the last conversation part from an admin.
    Example: 1663597233

  - `statistics.last_close_at` (integer)
    Time of the last conversation close.
    Example: 1663597233

  - `statistics.last_closed_by_id` (string)
    The last admin who closed the conversation. Returns a reference to an Admin object.
    Example: "c3po"

  - `statistics.count_reopens` (integer)
    Number of reopens after first_contact_reply_at.
    Example: 1

  - `statistics.count_assignments` (integer)
    Number of assignments after first_contact_reply_at.
    Example: 1

  - `statistics.count_conversation_parts` (integer)
    Total number of conversation parts.
    Example: 1

  - `statistics.assigned_team_first_response_time` (array)
    An array of conversation response time objects

  - `statistics.assigned_team_first_response_time.team_id` (integer)
    Id of the assigned team.
    Example: 100

  - `statistics.assigned_team_first_response_time.team_name` (string)
    Name of the assigned Team, null if team does not exist, Unassigned if no team is assigned.
    Example: "Team One"

  - `statistics.assigned_team_first_response_time.response_time` (integer)
    First response time of assigned team in seconds.
    Example: 2310

  - `statistics.assigned_team_first_response_time_in_office_hours` (array)
    An array of conversation response time objects within office hours

  - `statistics.handling_time` (integer)
    Time from conversation assignment to conversation close in seconds.
    Example: 2310

  - `statistics.adjusted_handling_time` (integer,null)
    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.
    Example: 1800

  - `conversation_parts` (object)
    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.

  - `conversation_parts.type` (string)
    Enum: "conversation_part.list"

  - `conversation_parts.conversation_parts` (array)
    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.

  - `conversation_parts.conversation_parts.type` (string)
    Always conversation_part
    Example: "conversation_part"

  - `conversation_parts.conversation_parts.id` (string)
    The id representing the conversation part.
    Example: "3"

  - `conversation_parts.conversation_parts.part_type` (string)
    The type of conversation part.
    Example: "comment"

  - `conversation_parts.conversation_parts.body` (string,null)
    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>"

  - `conversation_parts.conversation_parts.created_at` (integer)
    The time the conversation part was created.
    Example: 1663597223

  - `conversation_parts.conversation_parts.updated_at` (integer)
    The last time the conversation part was updated.
    Example: 1663597260

  - `conversation_parts.conversation_parts.notified_at` (integer)
    The time the user was notified with the conversation part.
    Example: 1663597260

  - `conversation_parts.conversation_parts.assigned_to` (object)
    reference to another object

  - `conversation_parts.conversation_parts.author` (object)
    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.

  - `conversation_parts.conversation_parts.attachments` (array)
    A list of attachments for the part.

  - `conversation_parts.conversation_parts.external_id` (string,null)
    The external id of the conversation part
    Example: "abcd1234"

  - `conversation_parts.conversation_parts.redacted` (boolean)
    Whether or not the conversation part has been redacted.

  - `conversation_parts.conversation_parts.email_message_metadata` (object)
    Contains metadata if the message was sent as an email

  - `conversation_parts.conversation_parts.email_message_metadata.subject` (string)
    The subject of the email
    Example: "Question about my order"

  - `conversation_parts.conversation_parts.email_message_metadata.email_address_headers` (array)
    A list of an email address headers.

  - `conversation_parts.conversation_parts.email_message_metadata.email_address_headers.type` (string)
    The type of email address header
    Example: "from"

  - `conversation_parts.conversation_parts.email_message_metadata.email_address_headers.email_address` (string)
    The email address
    Example: "jdoe@example.com"

  - `conversation_parts.conversation_parts.email_message_metadata.email_address_headers.name` (string,null)
    The name associated with the email address
    Example: "Joe Example"

  - `conversation_parts.conversation_parts.email_message_metadata.message_id` (string,null)
    The unique identifier for the email message as specified in the Message-ID header
    Example: "<CADKw7xrXzqSn8v3mP8K8Q8yZ6K8Q8yZ6@mail.gmail.com>"

  - `conversation_parts.conversation_parts.metadata` (object)
    Metadata for a conversation part

  - `conversation_parts.conversation_parts.metadata.quick_reply_options` (array)
    The quick reply options sent by the Admin or bot, presented in this conversation part.

  - `conversation_parts.conversation_parts.metadata.quick_reply_options.translations` (object,null)
    The translations for the quick reply option.
    Example: {"en":"Hello","fr":"Bonjour"}

  - `conversation_parts.conversation_parts.metadata.quick_reply_options.text` (string, required)
    The text to display in this quick reply option.

  - `conversation_parts.conversation_parts.metadata.quick_reply_options.uuid` (string, required)
    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.

  - `conversation_parts.conversation_parts.metadata.quick_reply_uuid` (string)
    The unique identifier for the quick reply option that was clicked by the end user.
    Example: "123e4567-e89b-12d3-a456-426614174000"

  - `conversation_parts.conversation_parts.state` (string)
    Indicates the current state of conversation when the conversation part was created.
    Enum: "open", "closed", "snoozed"

  - `conversation_parts.conversation_parts.tags` (array,null)
    A list of tags objects associated with the conversation part.

  - `conversation_parts.conversation_parts.event_details` (object)

  - `conversation_parts.conversation_parts.app_package_code` (string,null)
    The app package code if this part was created via API. null if the part was not created via API.
    Example: "test-integration"

  - `conversation_parts.total_count` (integer)
    Example: 1

  - `linked_objects` (object)
    An object containing metadata about linked conversations and linked tickets. Up to 1000 can be returned.

  - `linked_objects.type` (string)
    Always list.
    Enum: "list"

  - `linked_objects.total_count` (integer)
    The total number of linked objects.
    Example: 100

  - `linked_objects.has_more` (boolean)
    Whether or not there are more linked objects than returned.

  - `linked_objects.data` (array)
    An array containing the linked conversations and linked tickets.

  - `linked_objects.data.type` (string)
    ticket or conversation
    Enum: "ticket", "conversation"

  - `linked_objects.data.id` (string)
    The ID of the linked object
    Example: "7583"

  - `linked_objects.data.category` (string,null)
    Category of the Linked Ticket Object.
    Enum: "Customer", "Back-office", "Tracker", null

  - `ai_agent_participated` (boolean)
    Indicates whether the AI Agent participated in the conversation.
    Example: true

  - `ai_agent` (object)
    Data related to AI Agent involvement in the conversation.

  - `ai_agent.source_type` (string,null)
    The type of the source that triggered AI Agent involvement in the conversation.
    Enum: "essentials_plan_setup", "profile", "workflow", "workflow_preview", "fin_preview"

  - `ai_agent.source_title` (string,null)
    The title of the source that triggered AI Agent involvement in the conversation. If this is essentials_plan_setup then it will return null.
    Example: "My AI Workflow"

  - `ai_agent.last_answer_type` (string,null)
    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"

  - `ai_agent.resolution_state` (string,null)
    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

  - `ai_agent.rating` (integer,null)
    The customer satisfaction rating given to AI Agent, from 1-5.
    Example: 4

  - `ai_agent.rating_remark` (string,null)
    The customer satisfaction rating remark given to AI Agent.
    Example: "Very helpful!"

  - `ai_agent.created_at` (integer,null)
    The time when the AI agent rating was created.
    Example: 1663597260

  - `ai_agent.updated_at` (integer,null)
    The time when the AI agent rating was last updated.
    Example: 1663597260

  - `ai_agent.content_sources` (object)

  - `ai_agent.content_sources.type` (string)
    Enum: "content_source.list"

  - `ai_agent.content_sources.total_count` (integer)
    The total number of content sources used by AI Agent in the conversation.
    Example: 1

  - `ai_agent.content_sources.content_sources` (array)
    The content sources used by AI Agent in the conversation.

  - `ai_agent.content_sources.content_sources.content_type` (string)
    The type of the content source.
    Enum: "file", "article", "external_content", "content_snippet", "workflow_connector_action"

  - `ai_agent.content_sources.content_sources.url` (string)
    The internal URL linking to the content source for teammates.
    Example: "/fin-ai-agent/content?content=content_snippet&id=3234924"

  - `ai_agent.content_sources.content_sources.title` (string)
    The title of the content source.
    Example: "My internal content snippet"

  - `ai_agent.content_sources.content_sources.locale` (string)
    The ISO 639 language code of the content source.
    Example: "en"

## Response 401 fields (application/json):

  - `type` (string, required)
    The type is error.list
    Example: "error.list"

  - `request_id` (string,null)
    Example: "f93ecfa8-d08a-4325-8694-89aeb89c8f85"

  - `errors` (array, required)
    An array of one or more error objects

  - `errors.code` (string, required)
    A string indicating the kind of error, used to further qualify the HTTP response code
    Example: "unauthorized"

  - `errors.message` (string,null)
    Optional. Human readable description of the error.
    Example: "Access Token Invalid"

  - `errors.field` (string,null)
    Optional. Used to identify a particular field or query parameter that was in error.
    Example: "email"


