Skip to content
Wire2AirWire2Air

Send SMS

Legacy

Send a text message to one number or many with the legacy HTTP API (submitsm.aspx). Plain-text response with a job ID.

Last updated

POSTGEThttps://msgapi.wire2air.com/smsapi/submitsm.aspx
Credential
User ID, password and VASID, sent as request parameters
Response
Plain text

Parameters

Parameters
ParameterDescription
version
stringrequired
in body
API version. Always 2.0.
Example: 2.0
userid
stringrequired
in body
Your Wire2Air user ID. See authentication.
password
stringrequired
in body
Your Wire2Air password.
vasid
stringrequired
in body
Your VASID, from Manage Account → API Information.
from
stringrequired
in body
The short code Wire2Air assigned to your account.
Example: 27126
to
stringrequired
in body
Destination mobile number: country code, then the number. Separate several numbers with commas to send the same message to all of them (bulk messaging).
Example: 17220001111
text
stringrequired
in body
The message. See message length.
DeliveryDateTime
stringoptional
in body
When to deliver, in UTC. The example is Sunday, July 13, 1997, 8:00 PM in New York. See scheduling.
Default: nowExample: 07/14/1997 00:00:00
ReplyPath
stringoptional
in body
Your URL that receives replies from the recipient. Available case by case, with the advanced developer API only.
Example: https://example.com/wire2air/replies
BatchName
stringoptional
in body
For bulk sends only: a name for the batch.

The documentation lists these names in capitals (VERSION, USERID …) and uses lower case in its examples; the examples here use lower case for the same reason.

Message length and characters

The previous docs listed these characters as allowed in messages and subjects: a-z, A-Z, 0-9 and . , : ; ! ? ( ) ~ = + - _ \ / @ $ # & % ' ". For a line break, use \r\n, for example Your class is scheduled on\r\nJuly 24th @ 7:00PM.

Examples

curl "https://msgapi.wire2air.com/smsapi/submitsm.aspx" \
  --data-urlencode "version=2.0" \
  --data-urlencode "userid=YOUR_USERID" \
  --data-urlencode "password=YOUR_PASSWORD" \
  --data-urlencode "vasid=YOUR_VASID" \
  --data-urlencode "from=27126" \
  --data-urlencode "to=12121234567" \
  --data-urlencode "text=Your order has shipped."

Response

The response is one line of plain text.

JOBID: [MOBILENUMBER]:[SMSID]
ResponseMeaning
JOBID: [MOBILENUMBER]:[SMSID]Accepted. SMSID is the message's reference.
ERR: 301: Failed authenticationWrong user ID, password or VASID.
ERR: 305: Not enough creditsTop up your account.

Only these two errors are documented for this endpoint. See Errors for the codes other HTTP API endpoints return.