SMS
Post-call SMS templates, rendering, and delivery status.
OpenPhn fires an SMS after a call completes when the number has a template with a matching trigger expression. SMS is post-call only today — no mid-call sends.
Templates
Each number owns a list of SMS templates. Each template has:
- trigger — a predicate evaluated against the call outcome and caller
info. Example:
outcome.booked == true. - body — Jinja2-ish template with access to
outcome,caller_phone,caller_name,business_name.
Configure templates via PATCH /v1/numbers/{number_id}.
Dry-run
POST /v1/numbers/{number_id}/sms/preview renders a template against a
synthetic outcome. Useful for proofreading templates before saving.
Delivery tracking
Every send becomes an SmsSend row: to, from, body, status
(queued → sent → delivered | failed | undelivered), and
twilio_message_sid.
GET /v1/calls/{call_id}/sms_sendslists SMS sent after a given call.- Twilio posts delivery status updates to OpenPhn at
/webhooks/twilio/sms/status/{send_id}(signature verified). The send row updates accordingly.
Compliance
SMS from an OpenPhn-provisioned number inherits the number's A2P 10DLC registration and brand. If you're sending from a BYO Twilio number, your own 10DLC registration applies. See Compliance.