---
title: "Twilio Sms"
method: POST
path: "/api/twilio/sms"
---

# Twilio Sms

`POST /api/twilio/sms`

Webhook for inbound SMS received through Twilio.

`Body` MUST have a default. Twilio sends `Body=` (empty) for a media-only
MMS — a patient texting a photo of their insurance card with no caption —
and FastAPI treats an empty form value as absent, so a required `Body`
fails validation with a 422 and the message is never recorded. Twilio does
not retry inbound webhooks on 4xx, so those messages were lost outright
(VM-10490). The legacy Flask route read `request.values["Body"]`, which
returned the empty string, hence the regression on migration.

To/From/MessageSid stay required: Twilio always sends them, so a request
without them is malformed rather than media-only.

## Response `200`

Successful Response

- unknown

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/versemedical/apis/fastapi.md) · [All operations](https://skmtc.dev/versemedical/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/versemedical/fastapi/revisions/2fa122a248bb/schema)
