Skip to main content

Multi channel

This API enables multi-channel message delivery with customizable channel selection and priority setting. Users specify their desired communication channels and the sequence in the pipeline parameter, including options like voice calls, Telegram, Viber, and SMS. Telegram can be used only for one-time password (OTP) delivery, while voice calls are recommended only for OTP. SMS and Viber are suitable for both OTP and transactional messages. Each channel’s parameters, such as message content, voice settings, or signature, can be customized to tailor the message for its purpose and recipients.

URI: https://alphasms.net/api/json.php

All requests to API are sent in JSON format using the POST method.

Header parameters​

Requests must contain header Content-Type: application/json, otherwise, the request will be considered invalid even if it has valid JSON.

Request parameters​

authstringrequired
Your API key, which can be obtained in your personal cabinet
datalist[object]required
List of objects with request parameters
typestringrequired
Request type
pipelinelist[string]required
Sequence of use of communication channels
idnumberrequired
Unique message identifier in the client system
phonenumberrequired
Phone number of the recipient of the messages
voiceobjectrequired
Voice message options
messagestringrequired
The text of the message to be voiced
voiceobjectrequired
Voice parameters
genderstringrequired
Voice type (male or female)
languagestringrequired
Voice language
namestringrequired
Language model name
dtmfbooleanrequired
Tone set (DTMF) usage flag
telegramobjectrequired
Telegram message parameters
messagestringrequired
Message text to be sent via Telegram
viberobjectrequired
Viber message parameters
typestringrequired
Viber message type
signaturestringrequired
Signature in the message
messagestringrequired
Message text to be sent via Viber
whatsappobjectrequired
WhatsApp message parameters
⚠️ The stage sends free-form text: it reaches the subscriber only within 24 hours after their last message. Templates, files and codes go with
type: whatsapp
signaturestringrequired
Signature in the message
messagestringrequired
Message text to be sent via WhatsApp
smsobjectrequired
SMS message parameters
signaturestringrequired
Signature in the message
messagestringrequired
Message text to be sent via SMS
hookstring
URL address of the script where the message delivery status will be sent

Request example​

{
"auth": "bb56a4369eb19***cfec6d1776bd25",
"data": [
{
"type": "pipeline",
"pipeline": [
"voice",
"telegram",
"viber",
"rcs",
"sms"
],
"id": 100500,
"phone": 447700900123,
"voice": {
"message": "Your code is 100500",
"voice": {
"gender": "female",
"language": "en-GB",
"name": "en-GB-Standard-A"
},
"dtmf": false
},
"telegram": {
"message": "100500"
},
"viber": {
"type": "text",
"signature": "SenderID",
"message": "Your code is 100500"
},
"whatsapp": {
"signature": "SenderID",
"message": "Your code is 1234"
},
"rcs": {
"signature": "SenderID",
"message": "Your code is 1234"
},
"sms": {
"signature": "SenderID",
"message": "Your code is 100500"
},
"hook": "https://example.org/webhook/url.php"
}
]
}

Response examples​

HTTP Status Code: 200
Content Type: JSON application/json

{
"success": true,
"data": [
{
"success": true,
"data": {
"id": 100500,
"msg_id": 123456789,
"data": 1,
"parts": 1
}
}
]
}