Text
Text | Get
This command can be used to send text messages to individual numbers through HTTP GET request
Resource URL
https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg
Details
Key | Description | Example |
---|---|---|
key | Your API Key received from AlphaMSG | d17deb54c123db94d05d5598fcfdf28074abed5aaba675ebe6adf114a8a8wq35 |
mt | Message Type. Valid Values: T-Text, I-Invite, P-Poll, S-Survey | T |
ti | Title of the Text Message | Hello AlphaMSG |
msg | Content of the Text Message | This is a sample message to say hello to AlphaMSG users |
num | List of phone numbers, (without country code) separated by comma, for whom the message to be sent | 9876543210,9988776655 |
pri | Priority of the message. Valid Values: H, M, L - where H-High (Alert/Critical), M-Medium (Caution/Warning), L-Low (Information) | H |
del | Delivery mode of the message. Valid Values: I, R - where I-Instant (Push notification will be delivered instantly), R-Regular (Push notification will be delivered within 2 mins). Default Value - R | I |
Sample Code
<?php
// Account details
$key = urlencode('d17deb54c123db94d05d5598fcfdf28074abed5aaba675ebe6adf114a8a8wq35');
//Message details
$mt = urlencode('T');
$ti = urlencode('Hello AlphaMSG');
$num = urlencode('9876543210,9988776655');
$msg = rawurlencode('This is a sample message to say hello to AlphaMSG users');
$pri = urlencode('H');
// Prepare data for POST request
$data = 'key=' . $key . '&mt=' . $mt . '&ti=' . $ti . '&num=' . $num . '&msg=' . $msg . '&pri=' . $pri;
// Send the GET request with cURL
$ch = curl_init('https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg/?' . $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Process your response here
echo $response;
?>
Text | Post
This command can be used to send text messages to individual numbers through HTTP POST request.
Resource URL
https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg
Details
Key | Description | Example |
---|---|---|
key | Your API Key received from AlphaMSG | d17deb54c123db94d05d5598fcfdf28074abed5aaba675ebe6adf114a8a8wq35 |
mt | Message Type. Valid Values: T-Text, I-Invite, P-Poll, S-Survey | T |
ti | Title of the Text Message | Hello AlphaMSG |
msg | Content of the Text Message | This is a sample message to say hello to AlphaMSG users |
num | List of phone numbers, (without country code) separated by comma, for whom the message to be sent | 9876543210,9988776655 |
pri | Priority of the message. Valid Values: H, M, L - where H-High (Alert/Critical), M-Medium (Caution/Warning), L-Low (Information) | H |
del | Delivery mode of the message. Valid Values: I, R - where I-Instant (Push notification will be delivered instantly), R-Regular (Push notification will be delivered within 2 mins). Default Value - R | I |
Sample Code
<?php
// Account details
$apiKey = urlencode('Your apiKey');
// Message details
$numbers = urlencode('9876543210,918987654321');
$sender = urlencode('ALPHAM');
$message = rawurlencode('This is your message');
// Prepare data for POST request
$data = 'apikey=' . $apiKey . '&numbers=' . $numbers . "&sender=" . $sender . "&message=" . $message;
// Send the GET request with cURL
$ch = curl_init('https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg?' . $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Process your response here
echo $response;
?>
Invite | Get
This command can be used to send invites to individual numbers through HTTP GET request
Resource URL
https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg
Details
Key | Description | Example |
---|---|---|
key | Your API Key received from AlphaMSG | d17deb54c123db94d05d5598fcfdf28074abed5aaba675ebe6adf114a8a8wq35 |
mt | Message Type. Valid Values: T-Text, I-Invite, P-Poll, S-Survey | T |
ti | Title of the Invite | Hello AlphaMSG |
loc | Content of the Invite | ABC Hall, XYZ Road, Chennai |
edt | Event Date. Format: YYYYMMDD | 20180801 |
eti | Event Time. Format: HH24MMSS | 183000 |
num | List of phone numbers, (without country code) separated by comma, for whom the invite to be sent | 9876543210,9988776655 |
del | Delivery mode of the message. Valid Values: I, R - where I-Instant (Push notification will be delivered instantly), R-Regular (Push notification will be delivered within 2 mins). Default Value - R | I |
Sample Code
<?php
// Account details
$apiKey = urlencode('Your apiKey');
// Message details
$numbers = urlencode('9876543210,918987654321');
$sender = urlencode('ALPHAM');
$message = rawurlencode('This is your message');
// Prepare data for POST request
$data = 'apikey=' . $apiKey . '&numbers=' . $numbers . "&sender=" . $sender . "&message=" . $message;
// Send the GET request with cURL
$ch = curl_init('https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg?' . $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Process your response here
echo $response;
?>
Invite | Post
This command can be used to send invites to individual numbers through HTTP POST request
Resource URL
https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg
Details
Key | Description | Example |
---|---|---|
key | Your API Key received from AlphaMSG | d17deb54c123db94d05d5598fcfdf28074abed5aaba675ebe6adf114a8a8wq35 |
mt | Message Type. Valid Values: T-Text, I-Invite, P-Poll, S-Survey | I |
ti | Title of the Invite | Hello AlphaMSG |
msg | Content of the Invite | This is a sample invite to welcome AlphaMSG users to a grand launch |
loc | Event Location | ABC Hall, XYZ Road, Chennai |
edt | Event Date. Format: YYYYMMDD | 20180801 |
eti | Event Time. Format: HH24MMSS | 183000 |
num | List of phone numbers, (without country code) separated by comma, for whom the invite to be sent | 9876543210,9988776655 |
del | Delivery mode of the message. Valid Values: I, R - where I-Instant (Push notification will be delivered instantly), R-Regular (Push notification will be delivered within 2 mins). Default Value - R | I |
Sample Code
<?php
// Account details
$apiKey = urlencode('Your apiKey');
// Message details
$numbers = urlencode('9876543210,918987654321');
$sender = urlencode('ALPHAM');
$message = rawurlencode('This is your message');
// Prepare data for POST request
$data = 'apikey=' . $apiKey . '&numbers=' . $numbers . "&sender=" . $sender . "&message=" . $message;
// Send the GET request with cURL
$ch = curl_init('https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg?' . $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Process your response here
echo $response;
?>
Poll | Get
This command can be used to send polls to individual numbers through HTTP GET request
Resource URL
https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg
Details
Key | Description | Example |
---|---|---|
key | Your API Key received from AlphaMSG | d17deb54c123db94d05d5598fcfdf28074abed5aaba675ebe6adf114a8a8wq35 |
mt | Message Type. Valid Values: T-Text, I-Invite, P-Poll, S-Survey | P |
ti | Title of the Poll | Hello AlphaMSG |
ped | Poll End Date. Format: YYYYMMDD | 20180801 |
pet | Poll End Time. Format: HH24MMSS | 183000 |
que | Question to be displayed to the users | How's is experience with AlphaMSG? |
opts | Options separated by the delimiter ~# | Good~#Ok~#Bad |
num | List of phone numbers, (without country code) separated by comma, for whom the poll to be sent | 9876543210,9988776655 |
del | Delivery mode of the message. Valid Values: I, R - where I-Instant (Push notification will be delivered instantly), R-Regular (Push notification will be delivered within 2 mins). Default Value - R | I |
Sample Code
<?php
// Account details
$apiKey = urlencode('Your apiKey');
// Message details
$numbers = urlencode('9876543210,918987654321');
$sender = urlencode('ALPHAM');
$message = rawurlencode('This is your message');
// Prepare data for POST request
$data = 'apikey=' . $apiKey . '&numbers=' . $numbers . "&sender=" . $sender . "&message=" . $message;
// Send the GET request with cURL
$ch = curl_init('https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg?' . $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Process your response here
echo $response;
?>
Poll | Post
This command can be used to send polls to individual numbers through HTTP POST request
Resource URL
https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg
Details
Key | Description | Example |
---|---|---|
key | Your API Key received from AlphaMSG | d17deb54c123db94d05d5598fcfdf28074abed5aaba675ebe6adf114a8a8wq35 |
mt | Message Type. Valid Values: T-Text, I-Invite, P-Poll, S-Survey | P |
ti | Title of the Poll | Hello AlphaMSG |
ped | Poll End Date. Format: YYYYMMDD | 20180801 |
pet | Poll End Time. Format: HH24MMSS | 183000 |
que | Question to be displayed to the users | How's is experience with AlphaMSG? |
opts | Options separated by the delimiter ~# | Good~#Ok~#Bad |
num | List of phone numbers, (without country code) separated by comma, for whom the poll to be sent | 9876543210,9988776655 |
del | Delivery mode of the message. Valid Values: I, R - where I-Instant (Push notification will be delivered instantly), R-Regular (Push notification will be delivered within 2 mins). Default Value - R | I |
Sample Code
<?php
// Account details
$apiKey = urlencode('Your apiKey');
// Message details
$numbers = urlencode('9876543210,918987654321');
$sender = urlencode('ALPHAM');
$message = rawurlencode('This is your message');
// Prepare data for POST request
$data = 'apikey=' . $apiKey . '&numbers=' . $numbers . "&sender=" . $sender . "&message=" . $message;
// Send the GET request with cURL
$ch = curl_init('https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg?' . $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Process your response here
echo $response;
?>
Survey | Get
This command can be used to send surveys messages to individual numbers through HTTP GET request
Resource URL
https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg
Details
Key | Description | Example | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
key | Your API Key received from AlphaMSG | d17deb54c123db94d05d5598fcfdf28074abed5aaba675ebe6adf114a8a8wq35 | ||||||||||||
mt | Message Type. Valid Values: T-Text, I-Invite, P-Poll, S-Survey | S | ||||||||||||
ti | Title of the Survey | Hello AlphaMSG | ||||||||||||
desc | A short description about this survey | This is a sample survey to get the user input on AlphaMSG | ||||||||||||
sed | Survey End Date. Format: YYYYMMDD | 20180801 | ||||||||||||
set | Survey End Time. Format: HH24MMSS | 183000 | ||||||||||||
noq | Number of questions | 3 | ||||||||||||
ques | List of Questions and Options to be displayed to the users | |||||||||||||
| ||||||||||||||
num | List of phone numbers, (without country code) separated by comma, for whom the survey to be sent | 9876543210,9988776655 | ||||||||||||
del | Delivery mode of the message. Valid Values: I, R - where I-Instant (Push notification will be delivered instantly), R-Regular (Push notification will be delivered within 2 mins). Default Value - R | I |
Sample Code
<?php
// Account details
$apiKey = urlencode('Your apiKey');
// Message details
$numbers = urlencode('9876543210,918987654321');
$sender = urlencode('ALPHAM');
$message = rawurlencode('This is your message');
// Prepare data for POST request
$data = 'apikey=' . $apiKey . '&numbers=' . $numbers . "&sender=" . $sender . "&message=" . $message;
// Send the GET request with cURL
$ch = curl_init('https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg?' . $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Process your response here
echo $response;
?>
Survey | Post
This command can be used to send surveys to individual numbers through HTTP POST request
Resource URL
https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg
Details
Key | Description | Example | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
key | Your API Key received from AlphaMSG | d17deb54c123db94d05d5598fcfdf28074abed5aaba675ebe6adf114a8a8wq35 | ||||||||||||
mt | Message Type. Valid Values: T-Text, I-Invite, P-Poll, S-Survey | S | ||||||||||||
ti | Title of the Survey | Hello AlphaMSG | ||||||||||||
desc | A short description about this survey | This is a sample survey to get the user input on AlphaMSG | ||||||||||||
sed | Survey End Date. Format: YYYYMMDD | 20180801 | ||||||||||||
set | Survey End Time. Format: HH24MMSS | 183000 | ||||||||||||
noq | Number of questions | 3 | ||||||||||||
ques | List of Questions and Options to be displayed to the users | |||||||||||||
| ||||||||||||||
num | List of phone numbers, (without country code) separated by comma, for whom the survey to be sent | 9876543210,9988776655 | ||||||||||||
del | Delivery mode of the message. Valid Values: I, R - where I-Instant (Push notification will be delivered instantly), R-Regular (Push notification will be delivered within 2 mins). Default Value - R | I |
Sample Code
<?php
// Account details
$apiKey = urlencode('Your apiKey');
// Message details
$numbers = urlencode('9876543210,918987654321');
$sender = urlencode('ALPHAM');
$message = rawurlencode('This is your message');
// Prepare data for POST request
$data = 'apikey=' . $apiKey . '&numbers=' . $numbers . "&sender=" . $sender . "&message=" . $message;
// Send the GET request with cURL
$ch = curl_init('https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg?' . $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Process your response here
echo $response;
?>
Message Usage | Get
This command can be used to get the number of message sent for the current month through HTTP GET request
Resource URL
https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/msgUsage
Details
Key | Description | Example |
---|---|---|
key | Your API Key received from AlphaMSG | d17deb54c123db94d05d5598fcfdf28074abed5aaba675ebe6adf114a8a8wq35 |
dateFrom | Optional. Date from which you want to know the message count. Format: YYYYMMDD | 20180601 |
dateTo | Mandatory if dateFrom is given. Date to which you want to know the message count. Format: YYYYMMDD | 20180731 |
Sample Code
<?php
// Account details
$apiKey = urlencode('Your apiKey');
// Message details
$numbers = urlencode('9876543210,918987654321');
$sender = urlencode('ALPHAM');
$message = rawurlencode('This is your message');
// Prepare data for POST request
$data = 'apikey=' . $apiKey . '&numbers=' . $numbers . "&sender=" . $sender . "&message=" . $message;
// Send the GET request with cURL
$ch = curl_init('https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg?' . $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Process your response here
echo $response;
?>
Message Usage | Post
This command can be used to get the number of message sent for the current month through HTTP POST request
Resource URL
https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/msgUsage
Details
Key | Description | Example |
---|---|---|
key | Your API Key received from AlphaMSG | d17deb54c123db94d05d5598fcfdf28074abed5aaba675ebe6adf114a8a8wq35 |
dateFrom | Optional. Date from which you want to know the message count. Format: YYYYMMDD | 20180601 |
dateTo | Mandatory if dateFrom is given. Date to which you want to know the message count. Format: YYYYMMDD | 20180731 |
Sample Code
<?php
// Account details
$apiKey = urlencode('Your apiKey');
// Message details
$numbers = urlencode('9876543210,918987654321');
$sender = urlencode('ALPHAM');
$message = rawurlencode('This is your message');
// Prepare data for POST request
$data = 'apikey=' . $apiKey . '&numbers=' . $numbers . "&sender=" . $sender . "&message=" . $message;
// Send the GET request with cURL
$ch = curl_init('https://www.alphamsg.in/AlphaMsgOrg/rest/msgapi/sendMsg?' . $data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
// Process your response here
echo $response;
?>