Send invitation
Invite up to 100 numbers to an existing survey, poll or trivia campaign with the legacy HTTP API (sendinvitation.aspx).
https://mzone.wire2air.com/mserver/api/sendinvitation.aspxSends the invitation of an existing survey, polling or trivia campaign to a list of numbers.
Parameters
| Parameter | In | Description |
|---|---|---|
| APPKEY stringrequired in body | body | Your app key. See authentication. |
| Shortcode stringrequired in body | body | The campaign's short code. |
| KEYWORD stringrequired in body | body | The campaign's keyword. |
| MOBILENUMBER stringrequired in body | body | Comma-separated mobile numbers in international format, country code first. At most 100 per request. |
| DELIVERYDATETIME stringoptional in body | body | When to send, in Eastern Time (not UTC, unlike the other endpoints). Must be now or in the future. |
Examples
curl "https://mzone.wire2air.com/mserver/api/sendinvitation.aspx" \
--data-urlencode "APPKEY=YOUR_APPKEY" \
--data-urlencode "Shortcode=27126" \
--data-urlencode "KEYWORD=survey" \
--data-urlencode "MOBILENUMBER=12121234567,12121234568"
import urllib.error
import urllib.parse
import urllib.request
params = urllib.parse.urlencode({
"APPKEY": "YOUR_APPKEY",
"Shortcode": "27126",
"KEYWORD": "survey",
"MOBILENUMBER": "12121234567,12121234568",
})
request = urllib.request.Request(
"https://mzone.wire2air.com/mserver/api/sendinvitation.aspx",
data=params.encode("utf-8"),
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({
APPKEY: "YOUR_APPKEY",
Shortcode: "27126",
KEYWORD: "survey",
MOBILENUMBER: "12121234567,12121234568",
});
const response = await fetch("https://mzone.wire2air.com/mserver/api/sendinvitation.aspx", {
method: "POST",
body: params, // sent as application/x-www-form-urlencoded
});
console.log(response.status, await response.text());
<?php
$params = http_build_query([
'APPKEY' => 'YOUR_APPKEY',
'Shortcode' => '27126',
'KEYWORD' => 'survey',
'MOBILENUMBER' => '12121234567,12121234568',
]);
$ch = curl_init('https://mzone.wire2air.com/mserver/api/sendinvitation.aspx');
curl_setopt_array($ch, [
CURLOPT_POST => true,
CURLOPT_POSTFIELDS => $params,
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>
{
["APPKEY"] = "YOUR_APPKEY",
["Shortcode"] = "27126",
["KEYWORD"] = "survey",
["MOBILENUMBER"] = "12121234567,12121234568",
};
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://mzone.wire2air.com/mserver/api/sendinvitation.aspx")
{
Content = new FormUrlEncodedContent(parameters),
};
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
Response
OK
| Error | Meaning |
|---|---|
Err:300:Invalid User credentials | The app key is wrong. |
Err:700:Missing User APP Key | APPKEY is missing. |
Err:700:Missing Shortcode | Shortcode is missing. |
Err:700:Missing Keyword | KEYWORD is missing. |
Err:700:Missing Mobile Number | MOBILENUMBER is missing. |
Err:702:Invalid Keyword | The keyword is not one of your campaigns. |
Err:721:Cannot send invite to more than 100 numbers | Split the list into requests of 100 or fewer. |
Err:722:The Delivery Date Time should be now or in the future | DELIVERYDATETIME is in the past. |
700 covers four different problems here, so read the message text, not only the number.

