Keyword register
Register a keyword on a short code, point its incoming messages at your URL, or delete it, with the legacy HTTP API.
https://mzone.wire2air.com/mserver/servicemanager/api/RegisterKeywordAPI.aspxCheck that the keyword is free first with keyword lookup. If registration fails with Err:711:Keyword credits not enough, add credits with keyword credits.
Parameters
| Parameter | In | Description |
|---|---|---|
| USERID stringrequired in body | body | Your Wire2Air user ID. |
| PASSWORD stringrequired in body | body | Your Wire2Air password. |
| VASID stringrequired in body | body | Your VASID. |
| SHORTCODE stringrequired in body | body | The short code to register the keyword on. |
| SERVICE NAME stringrequired in body | body | A name for the service. See the note below about this parameter's name. |
| KEYWORD stringrequired in body | body | The keyword. At least 4 characters ( Err:710). |
| PROCESSORURL stringrequired in body | body | The URL of your web service that receives this keyword's messages. See inbound SMS. |
| HELPMSG stringrequired in body | body | The reply sent when someone texts HELP. |
| STOPMSG stringrequired in body | body | The reply sent when someone opts out (STOP). |
| ACTION stringoptional in body | body | ADD registers a new service with the keyword; DELETE deletes the keyword from the service. |
Examples
curl "https://mzone.wire2air.com/mserver/servicemanager/api/RegisterKeywordAPI.aspx" \
--data-urlencode "USERID=YOUR_USERID" \
--data-urlencode "PASSWORD=YOUR_PASSWORD" \
--data-urlencode "VASID=YOUR_VASID" \
--data-urlencode "SHORTCODE=27126" \
--data-urlencode "SERVICENAME=Order updates" \
--data-urlencode "KEYWORD=orders" \
--data-urlencode "PROCESSORURL=https://example.com/wire2air/inbound" \
--data-urlencode "HELPMSG=Order updates from Example Co. Reply STOP to cancel." \
--data-urlencode "STOPMSG=You will no longer receive order updates." \
--data-urlencode "ACTION=ADD"
import urllib.error
import urllib.parse
import urllib.request
params = urllib.parse.urlencode({
"USERID": "YOUR_USERID",
"PASSWORD": "YOUR_PASSWORD",
"VASID": "YOUR_VASID",
"SHORTCODE": "27126",
"SERVICENAME": "Order updates",
"KEYWORD": "orders",
"PROCESSORURL": "https://example.com/wire2air/inbound",
"HELPMSG": "Order updates from Example Co. Reply STOP to cancel.",
"STOPMSG": "You will no longer receive order updates.",
"ACTION": "ADD",
})
request = urllib.request.Request(
"https://mzone.wire2air.com/mserver/servicemanager/api/RegisterKeywordAPI.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",
VASID: "YOUR_VASID",
SHORTCODE: "27126",
SERVICENAME: "Order updates",
KEYWORD: "orders",
PROCESSORURL: "https://example.com/wire2air/inbound",
HELPMSG: "Order updates from Example Co. Reply STOP to cancel.",
STOPMSG: "You will no longer receive order updates.",
ACTION: "ADD",
});
const response = await fetch("https://mzone.wire2air.com/mserver/servicemanager/api/RegisterKeywordAPI.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',
'VASID' => 'YOUR_VASID',
'SHORTCODE' => '27126',
'SERVICENAME' => 'Order updates',
'KEYWORD' => 'orders',
'PROCESSORURL' => 'https://example.com/wire2air/inbound',
'HELPMSG' => 'Order updates from Example Co. Reply STOP to cancel.',
'STOPMSG' => 'You will no longer receive order updates.',
'ACTION' => 'ADD',
]);
$ch = curl_init('https://mzone.wire2air.com/mserver/servicemanager/api/RegisterKeywordAPI.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",
["VASID"] = "YOUR_VASID",
["SHORTCODE"] = "27126",
["SERVICENAME"] = "Order updates",
["KEYWORD"] = "orders",
["PROCESSORURL"] = "https://example.com/wire2air/inbound",
["HELPMSG"] = "Order updates from Example Co. Reply STOP to cancel.",
["STOPMSG"] = "You will no longer receive order updates.",
["ACTION"] = "ADD",
};
using var client = new HttpClient();
using var request = new HttpRequestMessage(HttpMethod.Post, "https://mzone.wire2air.com/mserver/servicemanager/api/RegisterKeywordAPI.aspx")
{
Content = new FormUrlEncodedContent(parameters),
};
using var response = await client.SendAsync(request);
Console.WriteLine($"{(int)response.StatusCode} {await response.Content.ReadAsStringAsync()}");
Response
SERVICEID:SYSTEM GENERATED SERVICEID
| Error | Meaning |
|---|---|
Err:300:Invalid Userid or password | Wrong user ID or password. |
Err:700:Missing Shortcode | SHORTCODE is missing. |
Err:701:Missing VASID | VASID is missing. |
Err:702:Missing Keyword | KEYWORD is missing. |
Err:703:Missing User Name | USERID is missing. |
Err:704:Missing Password | PASSWORD is missing. |
Err:705:Keyword is taken, Please try another keyword | The keyword is already in use on this short code. |
Err:706:Service Name is required | The service name is missing. |
Err:707:Help Message is required | HELPMSG is missing. |
Err:708:Unsubscribe Message is required | STOPMSG is missing. |
Err:709:Processor URL is required | PROCESSORURL is missing. |
Err:710:Keyword length should be minimum 4 characters | The keyword is shorter than 4 characters. |
Err:711:Keyword credits not enough | No keyword credits left. |
Err:712:Sticky Session not allowed | Not described further in the documentation. |
Err:714:Missing Keyword | Listed as well as 702 with the same message. |

