Handle inbound SMS webhook (Twilio)
Inbound webhook called by Twilio when an SMS or MMS is delivered to a Tether-provisioned Twilio number. Persists the message and any attached media, drives automation/AI replies, and responds with empty TwiML.
Body
Sender phone number in E.164 (e.g. +14165550100).
Tether-provisioned Twilio number that received the message.
SMS/MMS text content.
Twilio-assigned message identifier (SM… for SMS, MM… for MMS).
Count of attached media items as a string; 0 for plain SMS.
URL of the first media attachment (Twilio CDN); additional MediaUrlN fields appear when NumMedia > 1.
MIME type of the first media attachment, e.g. image/jpeg.
Response
Empty TwiML response acknowledging receipt. Tether handles persistence + automation server-side; Twilio expects empty TwiML.
The response is of type string.