Skip to content
Wire2AirWire2Air

Getting started

Get your Wire2Air API credentials, find the base URLs and send your first text message.

Last updated

What you need

  • A Wire2Air account with a texting number: a short code (for example 27126) or another number Wire2Air has assigned to you. Wherever these docs say from or SHORTCODE, they mean this number.
  • Message credits on the account. Every sent message part uses credits; see message length.
  • A server that can make HTTPS requests. Keep all calls server-side, so your credentials never reach a browser or a phone.

Get your credentials

Log in to the Wire2Air dashboard at app.wire2air.com with your username and password. (The old address, mzone.wire2air.com, now redirects there.)

REST API key

  1. Go to Manage Account → Manage API Keys.
  2. Select Generate New API Key.
  3. Enter a name for the key. It is only a label, so pick anything that tells you where the key is used.
  4. Copy the key with the Copy to Clipboard icon.
  5. Select Save Changes. The message "API Key saved successfully" appears above the table.

HTTP API credentials

The legacy HTTP API uses your account user ID and password together with a VASID. Find the VASID under Manage Account → API Information. Some HTTP API endpoints use an app key (APPKEY) instead; the carrier lookup page says it is under Manage Account → API Information too.

Authentication explains which credential each endpoint takes.

Base URLs

APIBase URL
REST API v1https://msgapi.wire2air.com/rest/v1
HTTP API, send SMShttps://msgapi.wire2air.com/smsapi/submitsm.aspx
HTTP API, send MMShttp://mms.wire2air.com/mms/submitmms.aspx (plain HTTP; see Send MMS)
HTTP API, other endpointsListed on each endpoint's page

Send your first message

Send a POST to /message with your API key in the apikey header. Replace YOUR_API_KEY, the destination number and the from number with your own.

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."

A queued message returns HTTP 201 and a JSON body with the message ID:

201 Created
{
  "Response": "Message Queued successfully",
  "URI": "v1/message/outbox/85582790",
  "ID": "85582790",
  "Type": "Out"
}

If something is wrong, the response is HTTP 400 with an application error, for example a missing text:

400 Bad Request
{
  "StatusCode": 703,
  "StatusMessage": "Text Message missing."
}

Testing

Next steps