---
title: Send SMS
slug: jWxc-send-sms
createdAt: 2026-02-05T09:33:58.280Z
---

## Purpose

Sends an SMS message to the SIM specified in the \<iccid> element.

This command allows applications to transmit SMS messages directly to mobile devices.

:::hint{type="info"}
This function is not available for Open-User-Group SIM types (e.g. MultiNET KPN-O).
:::

### Endpoint

```xml
POST https://api.m2miportal.com
Content-Type: application/xml
Accept: application/xml
```



### Request (XML)

```xml
<send-sms version="1" api-id="123456">
  <authentication>
    <username>username</username>
    <password>password</password>
  </authentication>
  <iccid>1234567890123456789</iccid>
  <message-text>Let’s meet at the station</message-text>
  <data-coding>default</data-coding>
  <origin>447890123456</origin>
  <sms-uid>123abcde4567</sms-uid>
</send-sms>
```

### Response (Success)

```xml
<send-sms-response api-id="123456">
  <api-outcome>Success</api-outcome>
</send-sms-response>
```

### Request Elements

| Element         | Required | Description                                                        |
| --------------- | -------- | ------------------------------------------------------------------ |
| \<iccid>        | Yes      | Target SIM ICCID.                                                  |
| \<message-text> | Yes      | SMS message content. Maximum 160 characters.                       |
| \<data-coding>  | No       | Encoding type. Default is default.                                 |
| \<origin>       | No       | Custom origination number (Manx Telecom SIMs only).                |
| \<sms-uid>      | No       | Client-defined unique identifier (max 12 alphanumeric characters). |

### Message Length Rules

- Maximum length: **160 characters**&#x20;
- Messages longer than 160 characters will return **Invalid Content**&#x20;
- Characters must conform to the **GSM 7-bit default alphabet** (3GPP TS 23.038)&#x20;
- Characters from the GSM 7-bit extension table count as **two characters**&#x20;
- Other character sets may produce unpredictable results&#x20;

## Origination Number (\<origin>)

If \<origin> is:

- **Omitted** → An appropriate origination number is used and replies will route back to the SIM Insight platform.&#x20;
- **Specified (Manx Telecom SIMs only)** → Replies will not be directed to the SIM Insight platform and will not be available via the SMS Log or API.&#x20;
- **Specified for other SIM types** → The element will be ignored.

## Binary SMS (MultiNET KPN-C Only)

For SIM type **MultiNET KPN-C**, the \<data-coding> element may be set to:

:::BlockQuote
\<data-coding>binary\</data-coding>
:::

In this case:

- Message must be encoded as **Base64**&#x20;
- Maximum \<message-text> length remains 160 characters&#x20;
- Maximum binary payload size is **120 bytes**&#x20;
- Binary encoded SMS MO is not supported&#x20;

### Example

Binary values:

:::BlockQuote
00 01 FF FE 80 7F
:::

Base64 encoded:

:::BlockQuote
AAH//oB/
:::

Request elements:

:::BlockQuote
\<message-text>AAH//oB/\</message-text>
\<data-coding>binary\</data-coding>
:::

## SMS User ID (\<sms-uid>)

The optional \<sms-uid>:

- Maximum 12 alphanumeric characters&#x20;
- Must be unique (client responsibility)&#x20;
- Will be included in delivery receipt information&#x20;
- Allows cross-referencing of messages&#x20;

## Delivery Behaviour

- If a device is unavailable, messages are queued and retried&#x20;
- Retry period is a minimum of **72 hours**&#x20;
- Delivery status can be retrieved via SMS Log or API&#x20;
- Some operators impose queue limits (e.g. KPN: 60 messages per SIM)&#x20;
- If the operator queue limit is exceeded, the API response will be:&#x20;

:::BlockQuote
Rejected by operator
:::

:::hint{type="info"}
### Operational Notes

- SMS can only be delivered to Active SIMs.
- SMS availability depends on SIM type and operator support.
- Delivery is not guaranteed and may be asynchronous.
- Operator limits may result in message rejection.
:::

:::hint{type="info"}
## Response (Failure)

If a request cannot be processed, the response will include:

- api-outcome indicating failure&#x20;
- An error description explaining the reason&#x20;

Failure responses may occur due to:

- Invalid authentication credentials&#x20;
- Invalid or unknown identifiers (for example ICCID or MSISDN)&#x20;
- Invalid or missing parameters&#x20;
- Values not permitted for the specified SIM type or account configuration&#x20;
- Insufficient permissions&#x20;

Integrating systems should validate input data before submission and implement appropriate error handling and logging.
:::

