> For the complete documentation index, see [llms.txt](https://apidocs.api19.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://apidocs.api19.com/sms-mms/receive-sms-mms.md).

# Receive SMS/MMS

## Portal Settings

Inside the portal, in your user settings (at the top right of the screen drop down), you can set the incoming URL. When you receive an MMS or SMS, you will receive the following as POST variables:

| Argument    | Value              | Type       |
| ----------- | ------------------ | ---------- |
| source      | yes                | int        |
| destination | yes                | int        |
| message     | no                 | string     |
| attachments | json array of urls | json       |
| type        | yes                | sms or mms |
| cost        | cost of message    | int        |

Here's an example:

{% tabs %}
{% tab title="Received Post SMS" %}

```php
HTTP Post Variables OR JSON Post

(
    [source] => 3038882222
    [destination] => 7206321111
    [message] => hello
    [type] => sms
    [cost] => 0
)
```

{% endtab %}

{% tab title="Received Post MMS" %}

```php
 HTTP Post Variables OR JSON Post

(
    [source] => 3038882222
    [destination] => 7206321111
    [message] => 
    [attachments] => ["https:\/\/mmsdata.net\/3a95-ea85-4978-b723-4f29b73f96dc.png"]
    [type] => mms
    [cost] => 0
)
```

{% endtab %}
{% endtabs %}
