Send Message
Beta/v1/messaging/conversations/{id}/messagesIdempotent with Idempotency-Key header. Learn more
Posts a message to a conversation.
With mode = send (the default) the message is delivered — immediately, or queued when scheduled_at is set — and the request is idempotent on client_message_id. With mode = draft a customer-reply draft is proposed on an external case: it is held at status draft for human approval rather than sent, and channel is required.
idstringConversation ID.
include[]optional arrayenumValues:senderauthorresourceSub-objects to expand in the response. When omitted, sub-objects are returned as null.
bodystringMessage body.
Required unless the message carries at least one attachment or a resource link.
modeoptional stringenumValues:senddraftWhether to deliver the message now or hold it as a customer-reply draft. Defaults to send.
send: delivers the message (immediately, or atscheduled_at). This is the default.draft: proposes a customer-reply draft on an external case, held for human approval rather than sent. Requireschannel.
channeloptional stringenumValues:messageemailThe channel a draft will be sent over when approved (mode = draft).
message: delivered as an in-conversation chat message.email: delivered as an outbound email from the conversation's bridged inbox.
source_thread_message_idoptional stringThe internal thread message a draft is composed from, when drafting from a thread (mode = draft).
client_message_idstringClient-supplied dedupe key.
A resend with the same value returns the original message. Required when sending (mode = send); ignored for drafts.
audienceoptional stringenumValues:internalcustomerWho the message is addressed to on an external case. Defaults to internal.
customer: sends a customer-visible reply, branded "Customer Service" and delivered by email on an email-bridged case.internal: posts a team-only note that the customer never sees.
When omitted, the message is posted as an internal team-only note.
subjectoptional stringThe email subject for a customer reply on an email-bridged case (audience = customer).
ccoptional array of stringAdditional email recipients to copy on a customer reply (email channel).
scheduled_atoptional string (date-time)When set, queue the message for delivery at this future time instead of sending now.
The created message has status scheduled.
reply_to_message_idoptional stringThe message this one is a reply to.
link_resource_typeoptional stringenumValues:accountactorentityType of a resource to link in the message, paired with link_resource_id.
link_resource_idoptional stringID of a resource to link in the message, paired with link_resource_type.
attachmentsoptional array of objectAttachments to include with the message.
kindstringenumValues:fileimagelinkThe kind of attachment.
s3_keyoptional stringThe object-storage key from the upload-url response (required for file/image).
filenameoptional stringThe original filename (file/image).
content_typeoptional stringThe MIME content type (file/image).
size_bytesoptional integerThe size in bytes (file/image).
urloptional stringThe external URL (required for link).
resource_typeoptional stringThe linked resource type (required for resource).
resource_idoptional stringThe linked resource id (required for resource).
mentionsoptional array of stringAccount user ids explicitly @mentioned in the message.
A mention delivers a notification even when the recipient has muted the conversation.
idstringMessage ID.
objectstringenumValues:chat_messageResource type identifier.
kindstringenumValues:chatsystem_eventagentThe 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:draftscheduledsentThe 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; onlysentmessages carry asequence.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:internalexternalsystemWho 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.
The conversation this message belongs to.
idstringConversation ID.
objectstringenumValues:conversationResource type identifier.
typestringenumValues:direct_messagegroupsystemWhat 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:internalcustomerWhether this is a team-only conversation (internal) or a customer-facing case (customer).
titlestringnullableThe display title of a group conversation.
null for direct messages, where the client derives a title from the participants.
workflow_statusstringnullableenumValues:newopenwaiting_internalThe 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.
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.
null in this endpoint.statusstringenumValues:activearchivedhiddenThe caller's effective status.
hiddenwhen the caller has hidden the conversation- otherwise the account-level lifecycle state
legal_holdstringenumValues:releasedheldWhether the conversation is under legal hold.
Exempts the conversation from retention purging and redaction.
assigneeactornullableThe case owner, when one is set: a user actor (a team member) or a group actor (a team).
null in this endpoint.The active participants of the conversation.
objectstringenumValues:listResource type identifier.
page_infoobjectPagination metadata.
next_page_urlstringnullableRelative URL that fetches the next page of results.
null when the last page has been reached.
previous_page_urlstringnullableRelative URL that fetches the previous page of results.
null while on the first page.
has_next_pagebooleanWhether more results exist after this page.
has_prev_pagebooleanWhether results exist before this page.
dataarray of conversation_participantResources in this page.
idstringParticipant ID.
objectstringenumValues:conversation_participantResource type identifier.
typestringenumValues:useragentsystemThe 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:owneradminmemberThe 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:activeleftremovedThe 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:unmutedmutedThe participant's notification preference for the conversation.
unmuted: receives normal notifications.muted: notifications are suppressed (mentions may still pierce the mute).
actoractornullableThe actor this participant represents: a user (account user) or an agent.
null for system participants.
null in this endpoint.agent_trigger_policystringnullableenumValues:mentionkeywordalwaysFor 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 stringFor agent participants with a keyword/mention policy, the keywords that trigger it.
topicentitynullableThe app resource this conversation is anchored to (e.g. an order).
null when the conversation has no topic anchor.
null in this endpoint.unreadintegerNumber of messages the caller has not yet read.
last_message_atstring (date-time)nullableWhen the most recent message was sent.
null when the conversation has no messages yet.
last_messagechat_messageExpandablenullableThe most recent message in the conversation.
null when the conversation has no messages yet.
idstringMessage ID.
objectstringenumValues:chat_messageResource type identifier.
kindstringenumValues:chatsystem_eventagentThe 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:draftscheduledsentThe 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; onlysentmessages carry asequence.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:internalexternalsystemWho 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.
The conversation this message belongs to.
null in this endpoint.sequenceintegerMonotonic per-conversation ordering sequence.
bodystringnullableMessage body.
null for templated or deleted messages.
subjectstringnullableThe email subject of a customer-reply draft on an email-bridged case.
senderactornullableThe 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.
null in this endpoint.authoractornullableThe 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.
null in this endpoint.Files, images, links, or resources attached to the message.
null in this endpoint.reply_tochat_messagenullableThe message this one replies to.
null in this endpoint.resourceentitynullableThe app resource this message links to.
null in this endpoint.channelstringenumValues:messageemailHow 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)nullableWhen a scheduled message is due to be delivered.
agent_runagent_runnullableThe agent run that produced this message, for deep-linking from an agent reply to its run.
null for messages not produced by an agent.
null in this endpoint.streaming_statestringnullableThe 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_idstringnullableThe client-supplied dedupe key echoed back for optimistic-UI reconciliation.
null for server-generated messages.
edited_atstring (date-time)nullableWhen the message was last edited.
deleted_atstring (date-time)nullableWhen 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.
sequenceintegerMonotonic per-conversation ordering sequence.
bodystringnullableMessage body.
null for templated or deleted messages.
subjectstringnullableThe email subject of a customer-reply draft on an email-bridged case.
senderactorExpandablenullableThe 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.
idstringUnique identifier of the actor.
objectstringenumValues:actorResource type identifier.
typestringenumValues:userapi_keyagentActor 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.
namestringnullableThe actor's display name.
handlestringnullableHuman-readable handle identifying the actor.
- For
useractors: the user's email address. - For
api_keyactors: the redacted key value.
Other actor types carry no handle.
avatar_urlstringnullableURL of the actor's profile photo, if one is set.
Only populated for user actors.
Assigned role.
null in this endpoint.authoractorExpandablenullableThe 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.
idstringUnique identifier of the actor.
objectstringenumValues:actorResource type identifier.
typestringenumValues:userapi_keyagentActor 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.
namestringnullableThe actor's display name.
handlestringnullableHuman-readable handle identifying the actor.
- For
useractors: the user's email address. - For
api_keyactors: the redacted key value.
Other actor types carry no handle.
avatar_urlstringnullableURL of the actor's profile photo, if one is set.
Only populated for user actors.
Assigned role.
null in this endpoint.Files, images, links, or resources attached to the message.
objectstringenumValues:listResource type identifier.
page_infoobjectPagination metadata.
next_page_urlstringnullableRelative URL that fetches the next page of results.
null when the last page has been reached.
previous_page_urlstringnullableRelative URL that fetches the previous page of results.
null while on the first page.
has_next_pagebooleanWhether more results exist after this page.
has_prev_pagebooleanWhether results exist before this page.
dataarray of message_attachmentResources in this page.
idstringAttachment ID.
objectstringenumValues:message_attachmentResource type identifier.
kindstringenumValues:fileimagelinkThe 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.
filenamestringnullableThe original filename for uploaded attachments.
null for link/resource attachments.
content_typestringnullableThe MIME content type for uploaded attachments.
null for link/resource attachments.
size_bytesintegernullableThe size in bytes for uploaded attachments.
null when unknown or for link/resource attachments.
urlstringnullableA time-limited download URL for uploaded (file/image) attachments, or the link URL.
null for resource attachments.
resourceentitynullableThe linked in-app resource for resource attachments.
null for file/image/link attachments.
null in this endpoint.created_atstring (date-time)Creation timestamp.
reply_tochat_messageExpandablenullableThe message this one replies to.
idstringMessage ID.
objectstringenumValues:chat_messageResource type identifier.
kindstringenumValues:chatsystem_eventagentThe 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:draftscheduledsentThe 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; onlysentmessages carry asequence.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:internalexternalsystemWho 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.
The conversation this message belongs to.
null in this endpoint.sequenceintegerMonotonic per-conversation ordering sequence.
bodystringnullableMessage body.
null for templated or deleted messages.
subjectstringnullableThe email subject of a customer-reply draft on an email-bridged case.
senderactorExpandablenullableThe 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.
idstringUnique identifier of the actor.
objectstringenumValues:actorResource type identifier.
typestringenumValues:userapi_keyagentActor 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.
namestringnullableThe actor's display name.
handlestringnullableHuman-readable handle identifying the actor.
- For
useractors: the user's email address. - For
api_keyactors: the redacted key value.
Other actor types carry no handle.
avatar_urlstringnullableURL of the actor's profile photo, if one is set.
Only populated for user actors.
Assigned role.
null in this endpoint.authoractorExpandablenullableThe 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.
idstringUnique identifier of the actor.
objectstringenumValues:actorResource type identifier.
typestringenumValues:userapi_keyagentActor 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.
namestringnullableThe actor's display name.
handlestringnullableHuman-readable handle identifying the actor.
- For
useractors: the user's email address. - For
api_keyactors: the redacted key value.
Other actor types carry no handle.
avatar_urlstringnullableURL of the actor's profile photo, if one is set.
Only populated for user actors.
Assigned role.
null in this endpoint.Files, images, links, or resources attached to the message.
objectstringenumValues:listResource type identifier.
page_infoobjectPagination metadata.
next_page_urlstringnullableRelative URL that fetches the next page of results.
null when the last page has been reached.
previous_page_urlstringnullableRelative URL that fetches the previous page of results.
null while on the first page.
has_next_pagebooleanWhether more results exist after this page.
has_prev_pagebooleanWhether results exist before this page.
dataarray of message_attachmentResources in this page.
idstringAttachment ID.
objectstringenumValues:message_attachmentResource type identifier.
kindstringenumValues:fileimagelinkThe 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.
filenamestringnullableThe original filename for uploaded attachments.
null for link/resource attachments.
content_typestringnullableThe MIME content type for uploaded attachments.
null for link/resource attachments.
size_bytesintegernullableThe size in bytes for uploaded attachments.
null when unknown or for link/resource attachments.
urlstringnullableA time-limited download URL for uploaded (file/image) attachments, or the link URL.
null for resource attachments.
resourceentitynullableThe linked in-app resource for resource attachments.
null for file/image/link attachments.
null in this endpoint.created_atstring (date-time)Creation timestamp.
reply_tochat_messageExpandablenullableThe message this one replies to.
null in this endpoint.resourceentityExpandablenullableThe app resource this message links to.
null in this endpoint.channelstringenumValues:messageemailHow 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)nullableWhen a scheduled message is due to be delivered.
agent_runagent_runExpandablenullableThe agent run that produced this message, for deep-linking from an agent reply to its run.
null for messages not produced by an agent.
null in this endpoint.streaming_statestringnullableThe 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_idstringnullableThe client-supplied dedupe key echoed back for optimistic-UI reconciliation.
null for server-generated messages.
edited_atstring (date-time)nullableWhen the message was last edited.
deleted_atstring (date-time)nullableWhen the message was deleted (tombstone).
created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last update timestamp.
resourceentityExpandablenullableThe app resource this message links to.
idstringUnique identifier for the entity.
objectstringenumValues:entityResource type identifier.
typestringenumValues:accountactorentityThe 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.
namestringnullableHuman-readable display name for the entity (e.g. a user's full name, a sales order number).
handlestringnullableSecondary human-readable identifier (e.g. email address, username, redacted API key value).
channelstringenumValues:messageemailHow 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)nullableWhen a scheduled message is due to be delivered.
agent_runagent_runExpandablenullableThe agent run that produced this message, for deep-linking from an agent reply to its run.
null for messages not produced by an agent.
idstringAgent run ID.
objectstringenumValues:agent_runResource type identifier.
trigger_typestringenumValues:scheduledmanualeventHow this run was initiated.
scheduled: started by the agent's cron schedule.event: started in response to a platform event.manual: started by an explicit request; seetriggered_by.chat: started by a message in a conversation, with the agent's reply posted back into that conversation.
statusstringenumValues:pendingrunningcompletedCurrent run status.
pending: queued but not yet started.running: currently executing.awaiting_input: paused, waiting for user input before continuing.awaiting_approval: paused, waiting for a pending action to be approved.completed: finished successfully.failed: stopped after an error; seeerror_message.cancelled: stopped before completion by a user.
definitionagent_definitionnullableFull agent definition for this run.
null in this endpoint.inputobjectnullableInput provided to the agent at the start of the run, as JSON.
Encoded as a JSON value (object, array, string, number, boolean, or null), not a JSON-encoded string.
outputobjectnullableFinal output produced by the agent, as JSON.
Populated only once the run has completed successfully.
Encoded as a JSON value (object, array, string, number, boolean, or null), not a JSON-encoded string.
error_messagestringnullableError message if the run failed.
triggered_byactornullableActor that triggered this run.
Null for scheduled or event-triggered runs.
null in this endpoint.started_atstring (date-time)nullableWhen the run started executing.
completed_atstring (date-time)nullableWhen the run completed.
duration_msintegernullableDuration in milliseconds.
Actions performed during this run.
null in this endpoint.Timeline steps for this run.
null in this endpoint.created_atstring (date-time)When this run was created.
updated_atstring (date-time)When this run was last updated.
streaming_statestringnullableThe 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_idstringnullableThe client-supplied dedupe key echoed back for optimistic-UI reconciliation.
null for server-generated messages.
edited_atstring (date-time)nullableWhen the message was last edited.
deleted_atstring (date-time)nullableWhen the message was deleted (tombstone).
created_atstring (date-time)Creation timestamp.
updated_atstring (date-time)Last update timestamp.
Responses
Successful response for Send Message