# Send SMS to Thing

{% hint style="warning" %}
Before using this API, please make sure that your SIM card profiles and your Monogoto account supports MT SMS functionality
{% endhint %}

## Send an SMS to a single Thing

<mark style="color:blue;">`GET`</mark> `https://console.monogoto.io/thing/ThingId_ICCID_{ICCID}/sms`

#### Path Parameters

| Name                                    | Type   | Description           |
| --------------------------------------- | ------ | --------------------- |
| ICCID<mark style="color:red;">\*</mark> | String | The ICCID of your SIM |

#### Headers

| Name                                          | Type   | Description               |
| --------------------------------------------- | ------ | ------------------------- |
| TOKEN\_HERE<mark style="color:red;">\*</mark> | String | Your authentication token |

#### Request Body

| Name                                           | Type   | Description                           |
| ---------------------------------------------- | ------ | ------------------------------------- |
| SMS\_CONTENT<mark style="color:red;">\*</mark> | String | SMS message content                   |
| SENDER\_NAME                                   | String | Sender name you wish recipient to see |

{% tabs %}
{% tab title="200: OK OK" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized" %}

```javascript
{
    // Response
}
```

{% endtab %}

{% tab title="404: Not Found Not found" %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Please note that in order for SMS message to reach a Thing, it must be connected to the network.
{% endhint %}

### Example using **cURL**:

```bash
curl -X POST \
    --url "https://console.monogoto.io/thing/ThingId_ICCID_{ICCID}/sms" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer {TOKEN_HERE}" \
    -d "{ \"Message\": \"{SMS_CONTENT}\", \"From\": \"{SENDER_NAME}\"}"
```

{% hint style="info" %}
Add your **Token**, **Thing ICCID** in the POST request, as well as the **SMS Content** and the **Sender Name**.
{% endhint %}

Example of request:

```bash
curl -X POST \
    --url "https://console.monogoto.io/thing/ThingId_ICCID_8912372646888991/sms" \
    -H "accept: application/json" \
    -H "Content-Type: application/json" \
    -H "Authorization: Bearer eyJhb6IkpXVCJ9.eyJSb2xlIjoiVXN4lclByb2ZpbGVJZF9kZGM2MThhNC0wNTI1LTQ2MmUtYWN3NzhhMGQxYmbSI6Im4zgFkbWluIiwiQ3VzdG9tsbCwiVXNlcklkIjoiVklkXzg5Yj5Y2OGEyUtNDQThhLTEzZjA0MzJhZDE3YyINTAzgZmUtZGI51My00ZjRiLTktN2U5Yjc0ZWU1ZThlIiwiaWNzM3MjI5L2MDY3NTE2Mjl9.99aSLzP7kTgK6TZGW-xalrMu0GkW6viunt3XxbNng" \
    -d "{ \"Message\": \"Hello\", \"From\": \"console\"}"
```

Expected result showing ID of the SMS message:

```json
ThingId_ICCID_8912372646888991_1606995009188_0.4954212857733442
```


---

# 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://docs.monogoto.io/developer/api/sms/send-sms-from-portal-to-single-thing.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.
