Send a reply in a conversation and persist it.
sendMessageInChat, email → AgentMail replyToEmail (threaded to the latest inbound) or sendEmail if no inbound exists yet. On success the new message row is inserted and last_message_at is advanced (guarded against going backwards). The external send happens before the DB insert — if the insert fails after a successful send, the response is a 500 warning the caller not to retry.
/api/conversations/{id}/messages with other verbs. See the sibling page for related operations on the same resource.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Conversation UUID. Must be owned by the authenticated user — other callers get 404.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Reply payload. The channel-specific handler (LinkedIn via Unipile, email via AgentMail) picks whichever fields it supports.
Reply sent and persisted. message.external_id is the provider id (email) or null for LinkedIn (back-filled later).
The persisted outbound message row. For LinkedIn replies, external_id starts as null and is back-filled asynchronously when the Unipile webhook echoes the send.