Bulk messaging
Send one message to many recipients in a single request with the REST API or the HTTP API, and name the batch for reporting.
To send the same text to many people, list their numbers in one request instead of making one request per number.
REST API v1
Put the numbers in to, separated by commas, each in international format (country code first, no +). BatchName is optional; the documentation describes it as "internal use for reporting".
curl "https://msgapi.wire2air.com/rest/v1/message" \
-H "apikey: YOUR_API_KEY" \
--data-urlencode "to=12121234567,12121234568,447700900012" \
--data-urlencode "from=27126" \
--data-urlencode "text=The office is closed today." \
--data-urlencode "BatchName=Closure-2026-10-06"
import urllib.error
import urllib.parse
import urllib.request
params = urllib.parse.urlencode({
"to": "12121234567,12121234568,447700900012",
"from": "27126",
"text": "The office is closed today.",
"BatchName": "Closure-2026-10-06",
})
request = urllib.request.Request(
"https://msgapi.wire2air.com/rest/v1/message",
data=params.encode("utf-8"),
headers={"apikey": "YOUR_API_KEY"},
method="POST",
)
try:
with urllib.request.urlopen(request, timeout=30) as response:
print(response.status, response.read().decode("utf-8"))
except urllib.error.HTTPError as error:
print(error.code, error.read().decode("utf-8"))
const params = new URLSearchParams({
to: "12121234567,12121234568,447700900012",
from: "27126",
text: "The office is closed today.",
BatchName: "Closure-2026-10-06",
});
const response = await fetch("https://msgapi.wire2air.com/rest/v1/message", {
method: "POST",
headers: { apikey: "YOUR_API_KEY" },
body: params, // sent as application/x-www-form-urlencoded
});
console.log(response.status, await response.text());
<?php
$params = http_build_query([
'to' => '12121234567,12121234568,447700900012',
'from' => '27126',
'text' => 'The office is closed today.',
'BatchName' => 'Closure-2026-10-06',
]);
$ch = curl_init('https://msgapi.wire2air.com/rest/v1/message');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $params,
CURLOPT_HTTPHEADER => ['apikey: YOUR_API_KEY'],
CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 30,
]);
$body = curl_exec($ch);
if ($body === false) {
echo 'Request failed: ' . curl_error($ch) . PHP_EOL;
} else {
echo curl_getinfo($ch, CURLINFO_HTTP_CODE) . ' ' . $body . PHP_EOL;
}
curl_close($ch);
using System;
using System.Collections.Generic;
using System.Net.Http;
var parameters = new Dictionary<string, string>
{
["to"] = "12121234567,12121234568,447700900012",
["from"] = "27126",
["text"] = "The office is closed today.",
["BatchName"] = "Closure-2026-10-06",
};
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://msgapi.wire2air.com/rest/v1/message")
{
Content = new FormUrlEncodedContent(parameters),
};
request.Headers.Add("apikey", "YOUR_API_KEY");
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
A bulk request returns 201 with "Type": "Batch" and a batch ID instead of a message ID:
{
"Response": "BATCHJOB Saved successfully",
"URI": "v1/batch/3a2139c4-6910-4716-a5f2-895231dba6eb",
"ID": "3a2139c4-6910-4716-a5f2-895231dba6eb",
"Type": "Batch"
}
All send a message parameters apply, including DeliveryDateTime to schedule the batch.
HTTP API (legacy)
Send SMS accepts the same comma-separated list in to, and an optional BatchName that the documentation describes as "applicable to Mass/Bulk Text Message only".
Limits
Good practice
- Remove duplicates and numbers that have opted out before you send.
- Check the message length: every recipient is charged for every part.
- Send large lists in several requests and keep track of which ones succeeded, so a failure part-way through can be retried without re-sending to everyone.

