# Send Single SMS Message

### <mark style="color:green;">`POST`</mark> `/send/single`

Send a single SMS message to recipient.&#x20;

{% tabs %}
{% tab title="Curl" %}

```hsts
curl -X POST \
"http://api.mobivatebulksms.com/send/single" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer [API Key]' \
-d '{ "originator": "Test", "recipient": "44700011122", "body": "This is a test message", "routeId": "mglobal" }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer [API Key]',
}

json_data = {
    'originator': 'Test',
    'recipient': '44700011122',
    'body': 'This is a test message',
    'routeId': 'mglobal',
}

response = requests.post('http://api.mobivatebulksms.com/send/single', headers=headers, json=json_data)

# Note: json_data will not be serialized by requests
# exactly as it was in the original request.
#data = '{ "originator": "Test", "recipient": "44700011122", "body": "This is a test message", "routeId": "mglobal" }'
#response = requests.post('http://api.mobivatebulksms.com/send/single', headers=headers, data=data)
```

{% endtab %}
{% endtabs %}

#### Send a single SMS message with reference

{% tabs %}
{% tab title="Curl" %}

```hsts
curl -X POST \
"https://api.mobivatebulksms.com/send/single" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer [API Key]' \
-d '{ "originator": "Test", "recipient": "44700011122", "body": "This is a test message", "routeId": "mglobal", "reference": "my-reference-1234" }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer [API Key]',
}

json_data = {
    'originator': 'Test',
    'recipient': '44700011122',
    'body': 'This is a test message',
    'routeId': 'mglobal',
    'reference': 'my-reference-1234',
}

response = requests.post('https://api.mobivatebulksms.com/send/single', headers=headers, json=json_data)

# Note: json_data will not be serialized by requests
# exactly as it was in the original request.
#data = '{ "originator": "Test", "recipient": "44700011122", "body": "This is a test message", "routeId": "mglobal", "reference": "my-reference-1234" }'
#response = requests.post('https://api.mobivatebulksms.com/send/single', headers=headers, data=data)
```

{% endtab %}
{% endtabs %}

**Send a single SMS message with campaign id**

{% tabs %}
{% tab title="Curl" %}

```hsts
curl -X POST \
"https://api.mobivatebulksms.com/send/single" \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer [API Key]' \
-d '{ "originator": "Test", "recipient": "44700011122", "body": "This is a test message", "routeId": "mglobal", "reference": "myref", "campaignId": "abc-123" }'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer [API Key]',
}

json_data = {
    'originator': 'Test',
    'recipient': '44700011122',
    'body': 'This is a test message',
    'routeId': 'mglobal',
    'reference': 'myref',
    'campaignId': 'abc-123',
}

response = requests.post('https://api.mobivatebulksms.com/send/single', headers=headers, json=json_data)

# Note: json_data will not be serialized by requests
# exactly as it was in the original request.
#data = '{ "originator": "Test", "recipient": "44700011122", "body": "This is a test message", "routeId": "mglobal", "reference": "myref", "campaignId": "abc-123" }'
#response = requests.post('https://api.mobivatebulksms.com/send/single', headers=headers, data=data)
```

{% endtab %}
{% endtabs %}

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer [API Key]` |

**Body**

<table><thead><tr><th>Name</th><th width="131">Type</th><th width="111">Required?</th><th>Description</th></tr></thead><tbody><tr><td>originator</td><td>string</td><td>Yes</td><td>Originator/SenderID for SMS messages (MaxLength - AlphaNumeric: 11, numeric: 15).</td></tr><tr><td>recipient</td><td>string</td><td>Yes</td><td>Recipient of SMS Message (Numeric only, MSISDN format inc international prefix).</td></tr><tr><td>body</td><td>string</td><td>Yes</td><td>Message text. </td></tr><tr><td>routeID</td><td>string</td><td>Yes</td><td>Specified message route. </td></tr><tr><td>campaignId</td><td>string</td><td>No</td><td>Attach message to existing campaignId. </td></tr><tr><td>reference</td><td>string</td><td>No</td><td>Your reference, will be provided as part of the delivery receipt for correlation. </td></tr><tr><td>shortenUrls</td><td>boolean</td><td>No</td><td><p>Default: <strong>false</strong></p><p> </p><p>If set to <strong>true</strong>, long urls included in the message will be shortened</p></td></tr></tbody></table>

**Response**

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

```json
{
   "id":"ef5796ce-e326-4a09-9033-6b457039b1ba",
   "originator":"Test",
   "recipient":"44700011122",
   "body":"This is a test message",
   "routeId":"mglobal",
   "reference":null,
   "campaignId":null
}
```

{% endtab %}

{% tab title="401" %}

```json
{
   "code":401,
   "message":"Unauthorized"
}
```

{% endtab %}
{% endtabs %}

To see a full list of SMS Responses and examples [click here](/archived-docs/send-single-sms-message/understanding-sms-response-codes.md).


---

# 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://wiki.mobivatebulksms.com/archived-docs/send-single-sms-message.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.
