Redact Conversation

Beta
POST/v1/messaging/conversations/{id}/actions/redact

Idempotent with Idempotency-Key header. Learn more

Permanently redacts the content of every message in a conversation (GDPR right-to-erasure).

Permissions requiredValues:messaging:delete
The role behind your API key or agent must grant every one of these permissions.
idstring

Conversation ID.

include[]optional arrayenumValues:assigneegroupparticipants

Sub-objects to expand in the response. When omitted, sub-objects are returned as null.

idstring

Conversation ID.

objectstringenumValues:conversation

Resource type identifier.

typestringenumValues:direct_messagegroupsystem

What kind of conversation this is.

  • direct_message: a 1:1 thread between two users.
  • group: a named thread with multiple user or agent members (including customer-facing support cases).
  • system: a system channel that delivers automated account alerts.
audiencestringenumValues:internalcustomer

Whether this is a team-only conversation (internal) or a customer-facing case (customer).

titlestringnullable

The display title of a group conversation.

null for direct messages, where the client derives a title from the participants.

workflow_statusstringnullableenumValues:newopenwaiting_internal

The triage lane of a customer-facing case.

Only set for customer-audience conversations.

  • new: opened but not yet triaged.
  • open: actively being worked.
  • waiting_internal: blocked on the internal team.
  • waiting_external: blocked on an external reply.
  • needs_approval: a drafted reply is awaiting human approval.
  • resolved: closed out.
groupmessaging_groupExpandablenullable

The reusable roster this conversation was started from, when one was used.

null for ad-hoc conversations. Provenance only: members were copied in at creation and are not driven by the roster thereafter.

idstring

Messaging group ID.

objectstringenumValues:messaging_group

Resource type identifier.

namestring

The roster's display name.

memberslistnullable

The roster's members (users and agents).

Always returned as null in this endpoint.
created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last updated timestamp.

statusstringenumValues:activearchivedhidden

The caller's effective status.

  • hidden when the caller has hidden the conversation
  • otherwise the account-level lifecycle state
legal_holdstringenumValues:releasedheld

Whether the conversation is under legal hold.

Exempts the conversation from retention purging and redaction.

assigneeactorExpandablenullable

The case owner, when one is set: a user actor (a team member) or a group actor (a team).

idstring

Unique identifier of the actor.

objectstringenumValues:actor

Resource type identifier.

typestringenumValues:userapi_keyagent

Actor type.

  • user: a human user account.
  • api_key: a programmatic caller authenticating with an API key.
  • agent: an automated agent acting on the account's behalf.
  • group: a shared group identity, such as a "Customer Service" persona, rather than a single individual.
namestringnullable

The actor's display name.

handlestringnullable

Human-readable handle identifying the actor.

  • For user actors: the user's email address.
  • For api_key actors: the redacted key value.

Other actor types carry no handle.

avatar_urlstringnullable

URL of the actor's profile photo, if one is set.

Only populated for user actors.

rolerolenullable

Assigned role.

Always returned as null in this endpoint.
participantslistExpandablenullable

The active participants of the conversation.

objectstringenumValues:list

Resource type identifier.

page_infoobject

Pagination metadata.

next_page_urlstringnullable

Relative URL that fetches the next page of results.

null when the last page has been reached.

previous_page_urlstringnullable

Relative URL that fetches the previous page of results.

null while on the first page.

has_next_pageboolean

Whether more results exist after this page.

has_prev_pageboolean

Whether results exist before this page.

dataarray of conversation_participant

Resources in this page.

idstring

Participant ID.

objectstringenumValues:conversation_participant

Resource type identifier.

typestringenumValues:useragentsystem

The kind of participant.

  • user: an account user (a teammate).
  • agent: an AI agent.
  • system: the system itself, which posts automated messages.
  • customer: an external customer in a support case.
rolestringenumValues:owneradminmember

The participant's permission level in the conversation.

  • owner: can rename or delete the conversation and manage its members and their roles.
  • admin: can add or remove members and rename the conversation.
  • member: can post, react, mute, and leave.
  • viewer: read-only access.
membershipstringenumValues:activeleftremoved

The participant's membership in the conversation.

  • active: currently a member.
  • left: voluntarily left the conversation.
  • removed: removed by an admin.
  • hidden: still a member but has hidden the conversation from their own list.
notificationsstringenumValues:unmutedmuted

The participant's notification preference for the conversation.

  • unmuted: receives normal notifications.
  • muted: notifications are suppressed (mentions may still pierce the mute).
actoractornullable

The actor this participant represents: a user (account user) or an agent.

null for system participants.

Always returned as null in this endpoint.
agent_trigger_policystringnullableenumValues:mentionkeywordalways

For agent participants, when the agent is invoked in response to messages.

null for non-agent participants.

  • mention: only when the agent is @mentioned.
  • keyword: when a message contains one of the agent's trigger keywords.
  • always: on every human message in the conversation.
agent_trigger_keywordsarray of string

For agent participants with a keyword/mention policy, the keywords that trigger it.

topicentityExpandablenullable

The app resource this conversation is anchored to (e.g. an order).

null when the conversation has no topic anchor.

idstring

Unique identifier for the entity.

objectstringenumValues:entity

Resource type identifier.

typestringenumValues:accountactorentity

The resource kind that this entity references, as an object-type value (e.g. user, account).

Unlike object — which is always entity — this names the underlying resource the id points to.

namestringnullable

Human-readable display name for the entity (e.g. a user's full name, a sales order number).

handlestringnullable

Secondary human-readable identifier (e.g. email address, username, redacted API key value).

unreadinteger

Number of messages the caller has not yet read.

last_message_atstring (date-time)nullable

When the most recent message was sent.

null when the conversation has no messages yet.

last_messagechat_messageExpandablenullable

The most recent message in the conversation.

null when the conversation has no messages yet.

idstring

Message ID.

objectstringenumValues:chat_message

Resource type identifier.

kindstringenumValues:chatsystem_eventagent

The kind of message.

  • chat: a user-authored chat message.
  • system_event: a system-generated event message.
  • agent: a message authored by an AI agent participant.
  • scheduled: a message materialized from a scheduled send.
  • alert: a system or producer alert rendered as a message.
  • email: an inbound email materialized into the conversation by the email bridge.
statusstringenumValues:draftscheduledsent

The lifecycle state of the message.

  • draft: an editable customer-reply draft awaiting approval; not in the timeline.
  • scheduled: queued for delivery at a future time; not yet in the timeline.
  • sent: a delivered timeline message; only sent messages carry a sequence.
  • canceled: a scheduled message canceled before delivery.
  • rejected: a draft discarded without sending.
  • failed: a scheduled message that exhausted delivery attempts.
  • superseded: a draft replaced by a newer one for the same source thread.
visibilitystringenumValues:internalexternalsystem

Who can see this message.

  • internal: a team-only note.
  • external: sent to or received from an external party (e.g. the customer on a support case).
  • system: an event shown to both the team and the customer.

On a customer-facing conversation, customer payloads only ever carry external and system messages.

conversationconversationnullable

The conversation this message belongs to.

Always returned as null in this endpoint.
sequenceinteger

Monotonic per-conversation ordering sequence.

bodystringnullable

Message body.

null for templated or deleted messages.

subjectstringnullable

The email subject of a customer-reply draft on an email-bridged case.

senderactorExpandablenullable

The actor that sent the message, as displayed. When the message was posted under a sender identity (a persona / group), this is that persona; otherwise it is the authoring user.

null for pure system messages.

idstring

Unique identifier of the actor.

objectstringenumValues:actor

Resource type identifier.

typestringenumValues:userapi_keyagent

Actor type.

  • user: a human user account.
  • api_key: a programmatic caller authenticating with an API key.
  • agent: an automated agent acting on the account's behalf.
  • group: a shared group identity, such as a "Customer Service" persona, rather than a single individual.
namestringnullable

The actor's display name.

handlestringnullable

Human-readable handle identifying the actor.

  • For user actors: the user's email address.
  • For api_key actors: the redacted key value.

Other actor types carry no handle.

avatar_urlstringnullable

URL of the actor's profile photo, if one is set.

Only populated for user actors.

rolerolenullable

Assigned role.

Always returned as null in this endpoint.
authoractorExpandablenullable

The underlying account user who authored the message.

null for system messages, or when the message was posted under an anonymizing sender identity and the caller is not entitled to see the real author.

idstring

Unique identifier of the actor.

objectstringenumValues:actor

Resource type identifier.

typestringenumValues:userapi_keyagent

Actor type.

  • user: a human user account.
  • api_key: a programmatic caller authenticating with an API key.
  • agent: an automated agent acting on the account's behalf.
  • group: a shared group identity, such as a "Customer Service" persona, rather than a single individual.
namestringnullable

The actor's display name.

handlestringnullable

Human-readable handle identifying the actor.

  • For user actors: the user's email address.
  • For api_key actors: the redacted key value.

Other actor types carry no handle.

avatar_urlstringnullable

URL of the actor's profile photo, if one is set.

Only populated for user actors.

rolerolenullable

Assigned role.

Always returned as null in this endpoint.
attachmentslistExpandablenullable

Files, images, links, or resources attached to the message.

objectstringenumValues:list

Resource type identifier.

page_infoobject

Pagination metadata.

next_page_urlstringnullable

Relative URL that fetches the next page of results.

null when the last page has been reached.

previous_page_urlstringnullable

Relative URL that fetches the previous page of results.

null while on the first page.

has_next_pageboolean

Whether more results exist after this page.

has_prev_pageboolean

Whether results exist before this page.

dataarray of message_attachment

Resources in this page.

idstring

Attachment ID.

objectstringenumValues:message_attachment

Resource type identifier.

kindstringenumValues:fileimagelink

The kind of attachment, which determines how it is stored and which of the fields below are populated.

  • file: an uploaded non-image file.
  • image: an uploaded image.
  • link: an external URL reference, with no stored file.
  • resource: a reference to an in-app resource, such as an order.
filenamestringnullable

The original filename for uploaded attachments.

null for link/resource attachments.

content_typestringnullable

The MIME content type for uploaded attachments.

null for link/resource attachments.

size_bytesintegernullable

The size in bytes for uploaded attachments.

null when unknown or for link/resource attachments.

urlstringnullable

A time-limited download URL for uploaded (file/image) attachments, or the link URL.

null for resource attachments.

resourceentitynullable

The linked in-app resource for resource attachments.

null for file/image/link attachments.

Always returned as null in this endpoint.
created_atstring (date-time)

Creation timestamp.

reply_tochat_messagenullable

The message this one replies to.

Always returned as null in this endpoint.
resourceentityExpandablenullable

The app resource this message links to.

idstring

Unique identifier for the entity.

objectstringenumValues:entity

Resource type identifier.

typestringenumValues:accountactorentity

The resource kind that this entity references, as an object-type value (e.g. user, account).

Unlike object — which is always entity — this names the underlying resource the id points to.

namestringnullable

Human-readable display name for the entity (e.g. a user's full name, a sales order number).

handlestringnullable

Secondary human-readable identifier (e.g. email address, username, redacted API key value).

channelstringenumValues:messageemail

How the message was delivered (or, for a draft, how it will be on approve).

  • message: delivered as an in-conversation chat message.
  • email: delivered as email through the conversation's bridged inbox.
scheduled_atstring (date-time)nullable

When a scheduled message is due to be delivered.

agent_runagent_runnullable

The agent run that produced this message, for deep-linking from an agent reply to its run.

null for messages not produced by an agent.

Always returned as null in this endpoint.
streaming_statestringnullable

The streaming state of a reply.

streaming while the body is still being generated (it fills in via realtime updates); complete once finalized.

null for ordinary messages.

client_message_idstringnullable

The client-supplied dedupe key echoed back for optimistic-UI reconciliation.

null for server-generated messages.

edited_atstring (date-time)nullable

When the message was last edited.

deleted_atstring (date-time)nullable

When the message was deleted (tombstone).

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last update timestamp.

created_atstring (date-time)

Creation timestamp.

updated_atstring (date-time)

Last update timestamp.

Responses

200

Successful response for Redact Conversation