Keyword credits
Buy keyword credits with the card stored on your account, or remove unused credits, with the legacy HTTP API (subscribekeywords.aspx).
https://mzone.wire2air.com/mserver/api/subscribekeywords.aspxThe previous docs called this the "Keyword Subscribe API".
Parameters
| Parameter | In | Description |
|---|---|---|
| USERID stringrequired in body | body | Your Wire2Air user ID. |
| PASSWORD stringrequired in body | body | Your Wire2Air password. |
| KEYWORDCREDITS integerrequired in body | body | How many keyword credits to add. A negative number removes credits from the account. |
Examples
curl "https://mzone.wire2air.com/mserver/api/subscribekeywords.aspx" \
--data-urlencode "USERID=YOUR_USERID" \
--data-urlencode "PASSWORD=YOUR_PASSWORD" \
--data-urlencode "KEYWORDCREDITS=1"
import urllib.error
import urllib.parse
import urllib.request
params = urllib.parse.urlencode({
"USERID": "YOUR_USERID",
"PASSWORD": "YOUR_PASSWORD",
"KEYWORDCREDITS": "1",
})
request = urllib.request.Request(
"https://mzone.wire2air.com/mserver/api/subscribekeywords.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({
USERID: "YOUR_USERID",
PASSWORD: "YOUR_PASSWORD",
KEYWORDCREDITS: "1",
});
const response = await fetch("https://mzone.wire2air.com/mserver/api/subscribekeywords.aspx", {
method: "POST",
body: params, // sent as application/x-www-form-urlencoded
});
console.log(response.status, await response.text());
<?php
$params = http_build_query([
'USERID' => 'YOUR_USERID',
'PASSWORD' => 'YOUR_PASSWORD',
'KEYWORDCREDITS' => '1',
]);
$ch = curl_init('https://mzone.wire2air.com/mserver/api/subscribekeywords.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>
{
["USERID"] = "YOUR_USERID",
["PASSWORD"] = "YOUR_PASSWORD",
["KEYWORDCREDITS"] = "1",
};
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://mzone.wire2air.com/mserver/api/subscribekeywords.aspx")
{
Content = new FormUrlEncodedContent(parameters),
};
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
Response
000:Keyword credits successfully applied to your account.
| Error | Meaning |
|---|---|
Err:300:Invalid Userid or password | Wrong user ID or password. |
Err:703:Missing User Name | USERID is missing. |
Err:704:Missing Password | PASSWORD is missing. |
Err:705:Keyword is taken, Please try another keyword | Listed for this endpoint in the previous docs. |
Err:715: Error while performing account update | The account could not be updated. |
Err:716: Credit card declined. | The stored card was declined. |
718:Keyword credit removal failed, No keyword credits assigned to account. | Nothing to remove. Note: no Err: prefix. |
719:Keyword credit removal failed, all available credits are in-use. | All credits are in use by keywords. Note: no Err: prefix. |

