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

# Twilio Sms

`POST /api/twilio/sms`

## Request

- Base URL: `https://api.versemedical.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.versemedical.com/api/twilio/sms`
- Auth: none declared

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.

## Request body `application/x-www-form-urlencoded`

- BodyTwilioSmsApiTwilioSmsPost
  - `To` string, required
  - `From` string, required
  - `MessageSid` string, required
  - `Body` string

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/versemedical/apis/versemedical-api.md) - [All operations](https://skmtc.dev/versemedical/apis/versemedical-api/llms.txt) - [OpenAPI document](https://skmtc.dev/versemedical/apis/versemedical-api/revisions/420c2032b2cf?raw)
