import Tabs from @theme/Tabs; import TabItem from @theme/TabItem; SignalWire cXML is a set of actions defined in an XML document that you can use to tell SignalWire what to do when you receive an incoming SMS or MMS message. ## Overview When an SMS or MMS message is sent to one of your SignalWire phone numbers, SignalWire looks up the SignalWire cXML document from the URL you configured, and reads the instructions you provided to determine what to do. SignalWire cXML allows you to dynamically control what happens, responding with specific instructions based on the caller, time of day, incoming message, and much more. :::info Not sending SMS or MMS? SignalWire cXML allows you to control calls as well. Check out [Voice XML](../voice/index.mdx) for more details. ::: ## Request For XML SignalWire makes an HTTP request to your configured endpoint just like a regular web form submission (POST) or page load (GET). Including contextual information about the message in the request to your endpoint, allows you to respond dynamically and fluidly to the message to meet the needs of your application. You can configure the endpoint URL and HTTP Method in your phone number settings panel on your SignalWire Dashboard, or via the REST API. ## Request Parameters SignalWire sends the following parameters, as either URL query parameters or POST parameters, to your endpoint when it receives a message: | Parameter | Description | | :-- | :- | | MessageSid string | A unique identifier for the message. May be used to later retrieve this message from the REST API. | | AccountSid string | The unique ID of the Account this message is associated with. | | From string | The phone number that sent this message, in E.164 format. | | To string | The phone number of the message recipient, in E.164 format. | | Body string | The text body of the message. | | NumMedia integer | The number of media items associated with the message. | | MediaUrl{X} string
only if media present | The URL to the media received in the message. URLs are publicly available but unguessable. Each media entry has its own entry, where X is a zero-based index of the media. Example: MediaUrl0 | | MediaContentType{X} string
only if media present | The content-type of the media stored at MediaUrl{X}, where X is a zero-based index of the media. Example: MediaContentType0 | ## Responding to SignalWire An example SignalWire cXML document that sends two messages back to the sender when a message is received: