SMS and Conversations
Every Saperly line can receive inbound SMS. You can reply and inspect conversation history through the API.
403 with conversation_window_expired. This is a carrier compliance requirement, not a Saperly limitation.Reply SMS works within 24 hours of receiving an inbound message. Proactive outbound SMS (cold outreach) is on the roadmap; use a compliant third-party SMS provider until Saperly ships it.
What happens on inbound SMS
Your webhook receives an event like this:
The timestamp is Unix milliseconds. The message_sid is the upstream carrier identifier.
event field: sms_received for SMS, message for voice calls. This works for both webhook-mode and hosted-mode lines — voice mode does not gate SMS routing. A line without webhookUrl still records the consent record and logs the sms_received compliance event on inbound, but Saperly has nowhere to deliver the event, so your code cannot auto-reply with its own LLM.Reply to a message
Send a reply with the line id, recipient number, and message text. The recipient must have texted you within the last 24 hours.
Response shape
A successful POST /api/v1/messages returns the queued message:
The status field transitions from queued to sent to delivered (or failed) as the carrier processes the message.
List conversation threads
Get one thread
Response shape
GET /api/v1/conversations/{lineId}/{phoneNumber} returns the full message history for the thread, ordered newest to oldest (most recent first):
Each message has a direction (inbound or outbound), the text body, and a timestamp in ISO 8601 format.
Practical constraints
The simplest useful mental model is “reply to active conversations.”
If you are designing a workflow around outbound cold SMS from scratch, stop and check your carrier and registration requirements first.
Good uses
- support follow-up
- appointment confirmation
- delivery coordination
- threaded AI assistance after a user texts first
