# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.api19.com/sms-mms/receive-sms-mms.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
