Skip to content
Wire2AirWire2Air

Send a message

POST /message sends an SMS to one number or, with a comma-separated list, to many. Optional scheduling, reply URL and batch name.

Last updated

POSThttps://msgapi.wire2air.com/rest/v1/message
Credential
REST API key, sent in the apikey header
Response
JSON

Parameters

Send the parameters form-encoded in the request body.

Parameters
ParameterDescription
to
stringrequired
in body
Destination mobile number in international format: country code, then the number, digits only (for example 12121234567 in the US, 447700900012 in the UK). Separate several numbers with commas to send in bulk.
Example: 12121234567
from
stringrequired
in body
The short code (or other texting number) Wire2Air assigned to your account.
Example: 27126
text
stringrequired
in body
The message. Any UTF-8 characters, URL-encoded like every other parameter. Not every carrier and handset displays every character; see encoding and length.
Example: Your order has shipped.
DeliveryDateTime
stringoptional
in body
When to deliver the message, in UTC, as MM/DD/YYYY HH:MM:SS. See scheduling.
Default: nowExample: 10/14/2026 13:00:00
Replypath
stringoptional
in body
Your URL that receives replies from the recipient. See inbound SMS.
Example: https://example.com/wire2air/replies
BatchName
stringoptional
in body
For bulk sends only: a name for the batch, for your own reporting.
Example: Closure-2026-10-06

The previous docs wrote these names with a capital first letter (To, From, Text) in the table and in lower case in every example. The examples here use lower case for the three required parameters, as the previous examples did.

Examples

curl "https://msgapi.wire2air.com/rest/v1/message" \
  -H "apikey: YOUR_API_KEY" \
  --data-urlencode "to=12121234567" \
  --data-urlencode "from=27126" \
  --data-urlencode "text=Your order has shipped."

Response

{
  "Response": "Message Queued successfully",
  "URI": "v1/message/outbox/85582790",
  "ID": "85582790",
  "Type": "Out"
}
StatusMeaning
201The message (or batch) has been queued for delivery.
400The request is not valid; StatusMessage says what is missing.
401The API key is missing or incorrect.
429API calls quota exceeded.
500Internal server error; contact support.

201 means queued, not delivered. To learn whether a message reached the handset, use delivery reports.

MMS