sms
Send and receive SMS and iMessage messages. See SMS vs. iMessage for the difference and requirements.
List messages
Lists SMS and iMessage messages for a lead (or the whole organization), newest last. Use `channel` on each returned message to tell SMS and iMessage messages apart.
Send a message
Sends a text or voice message to a lead over SMS or iMessage. For `channel: 'imessage'`, `lineId` is required and either `text` or `mediaUrl` (a voice recording, see `uploadVoice`) must be set. For SMS, only `text` is supported.
List message threads
Lists one thread per lead the organization has messaged (SMS or iMessage), most recently active first.
List a lead's conversations
Lists every distinct conversation (one per phone number or iMessage line) a lead has been messaged from or by.
Mark a conversation read
Marks a lead's unread inbound messages as read. For iMessage conversations, this also reports the read receipt back in real time so the lead sees it reflected on their end.
Retry a failed message
Resends a message that previously failed to send, using its original content, channel, and line/number. The original failed message is kept as-is; a new message is created for the retry attempt.
React to a message
Adds or removes a tapback reaction on an iMessage message. Send the same reaction again with `remove: true` to remove it, or a different reaction to replace it. iMessage only; not available for SMS or on messages that failed to send.
Show a typing indicator
Shows the 'typingโฆ' indicator to a lead in real time over iMessage while a reply is being composed. Only works within a few minutes of the lead's last message; fails silently outside that window. iMessage only.
Upload a voice message
Uploads an audio recording to send as an iMessage voice message. Multipart/form-data with the file under the 'voice' field. Browser-recorded formats (webm/ogg) are automatically converted; mp3/wav/m4a/caf/aac are accepted as-is. Returns a public URL to pass as `mediaUrl` on `send`.
Count unread messages
Returns the total number of unread inbound messages (SMS and iMessage combined) across the organization.