> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.conversive.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.conversive.ai/_mcp/server.

# Send SMS

POST https://api.sms-magic.com/v1/sms/send
Content-Type: application/json

Send a single SMS or MMS message.

Reference: https://docs.conversive.ai/sms-magic/sms/send-sms

## Authentication

- `apiKey` header (required) — API Key authentication via header

## Request

### Body (application/json)

This endpoint expects an object.

- `sms_text` (string, required) — SMS text.
- `sender_id` (string, required) — Sender ID.
- `mobile_number` (string, required) — Mobile number to send to.
- `mms_url_list` (list of string, optional) — List of MMS media URLs.
- `subject` (string, optional) — Subject for MMS.
- `source` (string, optional, default: 6003) — Source identifier. Default is 6003.

## Response

### 200

SMS submitted successfully.

- `status` (string, optional)
- `message` (string, optional)
- `id` (string, optional)

## Errors

### 401 Unauthorized Error

Missing or invalid API key.

- `message` (string, optional)

## Examples

**Request**

```json
{
  "sms_text": "Your SMS text",
  "sender_id": "11200012",
  "mobile_number": "9891989898"
}
```

**Response**

```json
{
  "status": "submitted",
  "message": "queued",
  "id": "4e770fca-8c68-44e3-901e-9c13e3149945"
}
```

**SDK Code**

```python SMS_sendSms_example
import requests

url = "https://api.sms-magic.com/v1/sms/send"

payload = {
    "sms_text": "Your SMS text",
    "sender_id": "11200012",
    "mobile_number": "9891989898"
}
headers = {
    "apiKey": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript SMS_sendSms_example
const url = 'https://api.sms-magic.com/v1/sms/send';
const options = {
  method: 'POST',
  headers: {apiKey: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"sms_text":"Your SMS text","sender_id":"11200012","mobile_number":"9891989898"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go SMS_sendSms_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.sms-magic.com/v1/sms/send"

	payload := strings.NewReader("{\n  \"sms_text\": \"Your SMS text\",\n  \"sender_id\": \"11200012\",\n  \"mobile_number\": \"9891989898\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("apiKey", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby SMS_sendSms_example
require 'uri'
require 'net/http'

url = URI("https://api.sms-magic.com/v1/sms/send")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["apiKey"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"sms_text\": \"Your SMS text\",\n  \"sender_id\": \"11200012\",\n  \"mobile_number\": \"9891989898\"\n}"

response = http.request(request)
puts response.read_body
```

```java SMS_sendSms_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.sms-magic.com/v1/sms/send")
  .header("apiKey", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"sms_text\": \"Your SMS text\",\n  \"sender_id\": \"11200012\",\n  \"mobile_number\": \"9891989898\"\n}")
  .asString();
```

```php SMS_sendSms_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.sms-magic.com/v1/sms/send', [
  'body' => '{
  "sms_text": "Your SMS text",
  "sender_id": "11200012",
  "mobile_number": "9891989898"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'apiKey' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp SMS_sendSms_example
using RestSharp;

var client = new RestClient("https://api.sms-magic.com/v1/sms/send");
var request = new RestRequest(Method.POST);
request.AddHeader("apiKey", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"sms_text\": \"Your SMS text\",\n  \"sender_id\": \"11200012\",\n  \"mobile_number\": \"9891989898\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift SMS_sendSms_example
import Foundation

let headers = [
  "apiKey": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "sms_text": "Your SMS text",
  "sender_id": "11200012",
  "mobile_number": "9891989898"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.sms-magic.com/v1/sms/send")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```