Pricing plans  Services  API  Partners  About the service  Contacts 
8 (800) 700 7672
Free in Russia
 

Integration with the service (API)

The API allows you to send messages through your projects and services over the HTTP/HTTPS, SMTP, and SMPP protocols. Ready-made libraries in different programming languages connect to your project and help you send messages from anywhere with a single command.


HTTP/HTTPS SMTP SMPP SOAP OMS SMS Commands Libraries and code examples

SENDING MESSAGES

MANAGING MAILING LISTS

MESSAGE STATUSES

CHECKING THE BALANCE STATUS

CONTACT MANAGEMENT

CLIENT MANAGEMENT

MANAGING SENDER NAMES (SENDER ID)

GETTING DATA

VARIOUS

HTTP/HTTPS protocol

Backup server address: www2.smscentre.com.

Sending messages

Sending an SMS message

To send an SMS, you need to call the GET or POST address method: https://smscentre.com/sys/send.php?login=<login>&psw=<password>&phones=<phones>&mes=<message>
To get the SMS cost, you need to call the GET or POST address method: https://smscentre.com/sys/send.php?login=<login>&psw=<password>&phones=<phones>&mes=<message>&cost=1
Description of the parameters passed to the Server :

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
phonesThe number or comma-separated or semicolon-separated list of mobile phone numbers in international format to which the message is sent. Numbers can be passed without the "+ " sign. If the number is passed without the " + " sign, it can be corrected by automatic formatting and converted to the correct international format. Thus, some errors when entering phone numbers can be corrected automatically. To disable auto-correction, pass the number with the "+ " sign.".
You can also send a message to a group of numbersby specifying a special code " G<номер группы>". The message will be sent to all numbers belonging to this group. For an e-mail message, a list of recipients' e-mail addresses is transmitted .
mesThe text of the message being sent. The maximum size is 1000 characters. If necessary, the message will be divided into several SMS messages sent to the subscriber and paid separately. Size of one SMS Ц 160 characters in Latin or 70 characters in Cyrillic. When splitting a message into multiple SMS messages, a header is added to each part to combine the parts into a single message on the recipient's phone, and the maximum length becomes 67 for Cyrillic and 153 for Latin letters. You can add comments to the message text that are intended for the sender to view the history in the personal account.
Additional options
idThe message ID. Assigned by the Client. Serves for further identification of the message. If not specified, it will be assigned automatically. Not necessarily unique. The identifier is a 32-bit number in the range from 1 to 2147483647, or a string up to 40 characters long consisting of Latin letters, numbers, and symbols ."-_".
senderThe sender's name displayed on the recipient's phone. English letters, numbers, spaces, and some characters are allowed. Length Ц 11 characters or 15 digits. All names are registered in your personal account on this page.
translitA sign that the message you want to translate in translit.
0 (default) Ц do not translate into transliteration.
1 Ц translate to translit as " translate".
2 Ц translate into transliteration as " mpaHc/Ium".
tinyurlAutomatically shorten links in messages. Allows you to replace links in the message text with short ones to reduce the length, as well as to track the number of clicks on this page.
0 (default) Ц leave links in the message text without changes.
1 Ц shorten links.
timeThe time of sending the SMS message to the subscriber.
Formats:
  1. DDMMYYhhmm or DD.MM.YY hh: mm.
  2. h1-h2. Sets the time range in hours. If the current time is less than h1, the SMS message will be sent to the subscriber when the time h1 occurs, if the current time falls in the interval from h1 to h2, that message will be sent immediately, otherwise the message will be sent the next day when the h1 time is reached. This function, for example, is useful in order to prevent subscribers from receiving SMS messages at night.
  3. 0ts, where ts is timestamp, the time in seconds since January 1, 1970.
  4. +m. Sets the relative time offset from the current time in minutes. The + character must be encoded as %2B in the http request.
If time = 0 or the time already elapsed is specified, the message will be sent immediately.
tzThe time zone in which the time parameter is set. It is indicated relative to Moscow time. The tz parameter can be either positive or negative. If tz is equal to 0, the Moscow time zone will be used , if the tz parameter is not set, the time zone will be taken from the Client settings.
periodThe period of time during which you need to send the newsletter. Represents a number in the range from 0.1 to 720 hours. Used in conjunction with the freq parameter. This parameter allows you to stretch the mailing list in time for the gradual receipt of SMS messages by subscribers.
freqThe interval or frequency at which to send an SMS message to the next group of numbers. The number of numbers in the group is calculated automatically based on the period and freq parameters. Set in the interval from 1 to 1440 minutes. Without the period parameter, the freq parameter is ignored.
flashIndicates whether a Flash message is displayed immediately on the phone screen.
0 (default) Ц normal message.
1 Ц Flash message.
binBinary message flag.
0 (default) Ц normal message.
1 Ц binary message. In an http request, it must be encoded using the urlencode function.
2 Ц binary message, represented as a hexadecimal string (hex).

The binary message is passed along with the UDH header at the beginning in the mes parameter, in which the first byte specifies the length of the header. To send a binary message without a UDH header, specify a null byte at the beginning of the message (00 in hex).
To be able to pass the pid and dcs parameters, you need to add a special combination "\n~~~\n" (line feed, 3 tilde characters, and again line feed) to the end of the binary message, and then the text "pid: value1, dcs: value2" with the exact preservation of spaces.
pushA sign of a wap-push message, with which you can send an Internet link to your phone.
0 (default) Ц normal message.
1 Ц wap-push message. In the mes parameter, you must pass the link and title through a line feed.
hlrA sign of the HLR-request for information about the number from the operator's database without sending real SMS.
0 (default) Ц normal message.
1 Ц HLR request. An HLR request will be executed for each phone number in the list. The mes parameter is not used.
pingIndicates a special SMS that is not displayed in the phone to check the numbers for availability in real time by the delivery status.
0 (default) Ц normal message.
1 Ц ping-sms. A Ping SMS will be sent to each phone number in the list. The mes parameter is not used.
mmsA feature of an MMS message that can be used to transmit text (txt), images in various formats (jpg, gif, png), music (wav, amr, mp3, mid), and video (mp4, 3gp). The files are passed in the body of the http request.
0 (default) Ц normal message.
1 Ц An MMS message. An MMS will be sent to each phone number in the list.
mailThe flag of the e-mail message. The files attached to the message are passed by the POST method in the body of the http request..
0 (default) Ц normal message.
1 Ц e-mail message.
socA sign of a soc message sent to users of the social networks "Odnoklassniki", "VKontakte" or to users of " Mail.Ru Agent".
0 (default) Ц normal message.
1 Ц soc message.
viberFlag of the viber message sent to users of the Viber messenger.
0 (default) Ц normal message.
1 Ц viber message.
whatsappA sign of a whatsapp message sent to WhatsApp messenger users.
0 (default) Ц normal message.
1 Ц whatsapp message.
fileurlThe full http address of the file to upload and transmit in the message. The minimum file size is 101 bytes.
callIndicates a voice message. When forming a voice message, you can send both text and attach files. Files added to the message must be passed by the POST method in the body of the http request..
0 (default) Ц normal message.
1 Ц voice message.
voiceThe voice used for voicing the text (only for voice messages).
m Ц male voice.
m2 Ц male voice 2.
m3 Ц male voice 3.
m4 (default) Ц male voice 4.
w Ц female voice.
w2 Ц female voice 2.
w3 Ц female voice 3.
w4 Ц female voice 4.
paramComma-separated list of parameters for a voice message in the format " param=w, i,n".
Here:
  • w Ц the waiting time for the caller to pick up the phone after the call starts, in seconds. If the subscriber does not pick up the phone within the specified time, the call will be repeated with the error "the subscriber is busy". The operating range of the parameter values is from 10 to 35, but you can specify an interval from 0 to 99 (if the value is less than 10, it will be reduced to 10, similarly for the upper bound).
  • i Ц repeat interval, that is, the time interval after which the call will be repeated (in seconds). The operating range of the parameter is from 10 to 3600 (if the value is less than 10, it will be reduced to 10).
  • n Ц the total number of dial-up attempts. Operating range of values from 1 to 9 (0 will be reduced to 1).
If you specify a value for any parameter other than the possible values, the default values of all parameters will be used (n = 8, w = 25, i from 3 to 14 seconds incrementally).
subjThe subject of the MMS or e-mail message. When sending an e-mail, you must specify the subject, text, and address of the sender. For MMS , it is mandatory to specify the subject or text. If you do not specify the subject of the MMS, then the sender's name, passed in the request or used by default, will be used as it.
charsetThe encoding of the transmitted message, if used other than the default windows encoding-1251. Options: utf-8 and koi8-r.
costIndicates whether you need to receive the cost of the mailing list.
0 (default) Ц normal sending.
1 Ц get the cost of mailing without real sending.
2 Ц normal sending, but add the cost of the completed mailing to the response.
3 Ц normal sending, but add the cost and the new Customer balance to the response.
fmtFormat of the server response about successful sending.
0 Ц (by default) as a string (OK - 1 SMS, ID - 1234).
1 Ц return the response in the form of numbers: ID and number of SMS separated by commas (1234,1), with cost = 2, another comma-separated cost (1234,1,1.40), with cost = 3, another new Customer balance (1234,1,1.40,100.50), with cost = 1, the cost and quantity Comma separated SMS (1.40,1).
2 Ц response in xml format.
3 Ц response in json format.
listA list of phone numbers and their corresponding messages, separated by a colon or semicolon, and presented as:
phones1:mes1
phones2:mes2
...
Lines are separated by a newline character (%0A). As phones, you can specify multiple phone numbers separated by commas. If you want to pass a newline character in the mes message, specify it with \n. If it is not possible to correct the text of a multi-line message, it is possible to enable a special mode for transmitting this type of message. To do this, you must additionally pass the nl parameterequal to 1 in the request.
If it is necessary to transmit different names of senders (and, possibly, different time zones of subscribers), the following transmission format can be used for different messages:
sender1,tz1|phones1:mes1
sender2,tz2|phones2:mes2
...
In this case, the tz parameter is optional.
The list parameter allows you to send multiple messages with different messages to multiple phones. an http request. The messages in the request are assigned a single identifier. The entire parameter must be encoded using the urlencode function.
validThe "life" period of the SMS message. Specifies the time during which the operator will attempt to deliver the message to the subscriber. Range from 1 to 24 hours. It is also possible to transmit the time in the hh:mm format in the range from 00:01 to 24:00.
maxsmsThe maximum number of SMS messages that a long message can be split into. Messages that are too long will be truncated so as not to overwhelm the number of SMS messages required to transmit them. With this parameter, you can limit the maximum cost of messages, since a separate fee is charged for each SMS.
imgcodeThe value of the alphanumeric code entered with "captcha" when using anti-spam verification. This parameter must be used in conjunction with the userip parameter.
useripThe value of the IP address to which to apply the limit on the maximum number of messages per IP address per day established in settings personal account in the "Limits and restrictions".
errIndicates whether to add a list of invalid numbers to the server response.
0 (default) Ц do not add a list (normal server response).
1 Ц a list of erroneous phone numbers with the corresponding statuses is added to the response.
opIndicates whether to add information for each number to the server response.
0 (default) Ц do not add a list (normal server response).
1 Ц the response adds a list of all phone numbers with their respective statuses, mcc and mnc values, cost, and, in the case of erroneous numbers, error codes..
ppBinds the Client as a referral to a specific partner ID for the current request.
ѕри передаче данного параметра in the form of "pp=<ID партнера>"  лиент с логином login временно становитс€ рефералом партнера с ID <ID партнера>. Deductions for the partner program will be made for the current request, there is no permanent binding. This option allows you to temporarily install a Client as a referral from your services and programs, where it is not possible to register a Client using a referral link.


Required parameters are login, psw, phones, and mes, or login, psw and list.

After approval and processing, the Server returns confirmation to the Client indicating the result of processing.

All parameters that contain special characters (plus, space, etc.) must be encoded using the urlencode function to be passed in an HTTP request..

Server response and error codes

The server sends the response as a string:

If an error occurred, the response will be one of the following:

When fmt = 0:
  • ERROR = N (description) Ц for 1,2,4,5,9 errors;

  • ERROR = N (description), ID - <id сообщени€> Ц for 3 errors,6,7,8.
When fmt = 1:
  • 0,-N Ц for errors 1,2,4,5,9;
  • <id сообщени€>,-N Ц for 3 errors,6,7,8.
When fmt = 2:
  • For 1 errors,2,4,5,9:

    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • For 3 errors,6,7,8:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    <id>id сообщени€</id>
    </result>
When fmt = 3:
  • For 1 errors,2,4,5,9:
    {
    "error": "description",
    "error_code": N
    }

  • For 3 errors,6,7,8:
    {
    "error": "description",
    "error_code": N,
    "id": <id сообщени€>
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
3Insufficient funds on the Client's account.
4IP address is temporarily blocked due to frequent errors in the queries. read More
5Invalid date format.
6The message is forbidden (by text or by the sender's name). This error also occurs when you try to send mass and / or advertising messages without a signed contract.
7Invalid phone number format.
8The message to the specified number can not be delivered.
9Sending more than one identical SMS message request or more than five identical requests to receive the cost of a message within a minute.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is processed successfully, a string of the following format is returned:
  • when cost = 0 and fmt = 0: OK - <n> SMS, ID - <id>

  • when cost = 1 and fmt = 0: <cost> (<n> SMS)

  • when cost = 2 and fmt = 0: OK - <n> SMS, ID - <id>, COST - <cost>

  • when cost = 3 and fmt = 0: OK - <n> SMS, ID - <id>, COST - <cost>, BALANCE - <balance>

  • when cost = 0 and fmt = 1: <id>,<n>

  • when cost = 1 and fmt = 1: <cost>,<n>

  • when cost = 2 and fmt = 1: <id>,<n>,<cost>

  • when cost = 3 and fmt = 1: <id>,<n>,<cost>,<balance>

  • when cost = 0 and fmt = 2:
    <result>
    <id>id</id>
    <cnt>n</cnt>
    </result>

  • when cost = 1 and fmt = 2:
    <result>
    <cost>cost</cost>
    <cnt>n</cnt>
    </result>

  • when cost = 2 and fmt = 2:
    <result>
    <id>id</id>
    <cnt>n</cnt>
    <cost>cost</cost>
    </result>

  • when cost = 3 and fmt = 2:
    <result>
    <id>id</id>
    <cnt>n</cnt>
    <cost>cost</cost>
    <balance>balance</balance>
    </result>

  • when cost = 0 and fmt = 3:
    {
    "id": <id>,
    "cnt": <n>
    }

  • when cost = 1 and fmt = 3:
    {
    "cost": "<cost>",
    "cnt": <n>
    }

  • when cost = 2 and fmt = 3:
    {
    "id": <id>,
    "cnt": <n>,
    "cost": "<cost>"
    }

  • when cost = 3 and fmt = 3:
    {
    "id": <id>,
    "cnt": <n>,
    "cost": "<cost>",
    "balance": "<balance>"
    }

  • when op = 1 and fmt = 0 or 1, the information is added to the end of the normal output from a new line:
    <phone>,<mccmnc>,<cost>,<status>,<error>

  • when op = 1 and fmt = 2, an array is added to the response:
    <phones>
    <phone mccmnc="mccmnc" cost="cost" status="status" error="error">phone</phone>
    ...
    </phones>

  • when op = 1 and fmt = 3, an array is added to the response:
    "phones": [{
    "phone": "<phone>",
    "mccmnc": "<mccmnc>",
    "cost": "<cost>",
    "status": "<status>",
    "error": "<error>"
    },
    ...
    ]

Where:
<n><n> is the number of SMS sent, calculated as the number of SMS messages in the message multiplied by the number of recipients.
<id> Ц the message ID sent by the Client or assigned automatically by the Server.
<cnt> Ц the number of parts (when sending an SMS message) or the number of seconds (when sending a voice message (call)).
<balance> Ц new Customer Balance.
<phone> Ц phone number.
<mccmnc> Ц the numeric code of the subscriber's country plus the numeric code of the subscriber's operator.
<cost> Ц the cost of SMS-messages.
<status> Ц sMS Message status code.
<error> Ц error code in the status.

The server does not accept more than one identical request for sending SMS messages within a minute to protect against errors and loops in the Client-side program in order to reduce the load and not spend the Client's funds, as well as to prevent multiple messages from being sent to the same subscriber.

The server also blocks sending more than 50 messages to one subscriber, which were sent with a break between messages of less than 60 seconds, to protect against flooding and unnecessary debiting of funds from the Client's account, since many operators do not pass a large number of messages to one subscriber in a short period of time.

Examples of sending messages

Examples:

Normal message:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello! https://smscentre.com/sys/send.php?login=alex&psw=123
&list=79999999999:Hello!%0A79999999999:Hello\nworld!

Flash message encoded in "utf-8" from the sender "ivan", translated into transliteration, which must be delivered to the subscriber 01.01.2012 in 00:00:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello%20world!
&translit=1&time=0101120000&flash=1&sender=ivan
&charset=utf-8

Binary EMS message with the text " Hello, World!", in which the word "World" is italicized and underlined:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999
&mes=050A0307056048656C6C6F2C20576F726C6421&bin=2

Binary WAP-push message that sends a link to the site " http://wap.ru/":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999
&mes=0605040B8423F0DC0601AE02056A0045C60C037761702E72752F0001037761702E7275000101&bin=2

WAP-push message in text form, transmitting a link to the site "http://wap.ru" with the title " WAP.RU":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999
&mes=http://wap.ru%0AWAP.RU&push=1

Comments in SMS messages

When sending SMS messages, you can add any comment to the end of the text that clarifies or supplements the SMS message for the sender. This text will not be sent to subscribers and will not affect the cost of SMS and is available for viewing and filtering in the list of sent messages in your personal account.

To add a comment, you must specify a special combination "\n~~~\n " at the end of the text of the SMS message intended for sending (line feed, 3 of the tilde character, and again line feed), and after that, any text that will be considered a comment will not be sent to the subscriber, but will be displayed in the history.

Examples:

Sending a single message:

Hello!
~~~
Comment
https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999%2C78888888888&mes=Hello!%0A~~~%0AComment
Sending multiple messages via the list parameter:

Hello1!
~~~
Comment1
Hello2!
~~~
Comment2
https://smscentre.com/sys/send.php?login=alex&psw=123&list=79999999999:Hello1!\n~~~\nComment1%0A78888888888:Hello2!\n~~~\nComment2

Sending to a group of numbers

¬ личном кабинете  лиента при создании or редактировании группы можно указать group number for mailing lists сообщений. “огда при отправке сообщени€ вместо списка телефонов можно будет указывать короткий код in the form of "G<номер группы>" or "g<номер группы>", and the message will be sent to all phone numbers belonging to this group.

Examples:

Sending a message to all phone numbers belonging to groups with assigned numbers 777 and 888:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=G777%2Cg888&mes=Hello!

Sending HLR-query

You can check phone numbers for availability by sending a special HLR request. As a result of the request, data will be received about the country and the subscriber's operator, about the roaming operator when the subscriber is in a foreign network, as well as about the status of the subscriber (available or not). Subscribers who are the owners of the verified numbers will not receive any notifications about the performed checks of their number.

Execution of an HLR request over the HTTP protocol is performed in the same way as sending an SMS message, and the request must pass an additional parameter hlr=1.

To send an HLR request, use the GET or POST method to call the address: https://smscentre.com/sys/send.php?login=<login>&psw=<password>&phones=<phones>&hlr=1
Other parameters that are used for sending regular SMS messages and described on this page are also available.

The result of the HLR request can be sent to the URL for receiving incoming messages and statuses specified in the settings in your personal account, or it can be read by requesting the status of the sent SMS message.

Example:
https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&hlr=1

Sending an MMS message

To send an MMS message, you need to call the GET or POST address method: https://smscentre.com/sys/send.php?login=<login>&psw=<password>&phones=<phones>&mes=<message>&mms=1
If you plan to send any files (text, music, audio, video), then you need to send them using the POST method in the body http (s)-request to the server. It is also possible to send an external file in the request via the fileurlparameter, which contains the full http (s) address of the file, or to add an https link to the message text of a previously downloaded file, which you can find out in your personal account on the sending page by clicking "attach file" - " Downloaded files".

The maximum number of attachments passed in a request is twenty, and the total size of all attachments must not exceed 300 KB. If the specified limits are exceeded, the remaining attachments will be transmitted as links. For an MMS message, specify the subject or text it is mandatory.

Examples:

Sending an MMS message with the subject "Privet" and the text " Hello":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello&subj=Privet&mms=1
Sending MMS with the subject "Holiday" and two photos via library based on cURL:

<?php
include "smsc_api.php";
send_sms("79999999999", "", 0, 0, 0, 7, false, "subj=Holiday", array("/home/alex/1.jpg", "/home/alex/2.jpg"));
?>

Sending an e-mail message

To send an e-mail, you need to call the GET or POST address method: https://smscentre.com/sys/send.php?login=<login>&psw=<password>&phones=<phones>&mes=<message>&sender=<sender>&subj=<subj>&mail=1
If you plan to transfer any files when sending them, then they must be transmitted by the POST method in the body of an http(s) request to the server. The positions in the text in which you plan to insert files must be designated in a special way in the form of "<file n><file n>", where n is the file number in the generated list starting from one. If you do not specify the positions, then the corresponding files will be added to the end of the message.

ѕри создании сообщени€ можно вставл€ть в текст http(s)-ссылки ранее загруженных файлов, узнать которые можно в личном кабинете на странице отправки, нажав последовательно ссылки "прикрепить файл" Ц "«агруженные файлы". “акже можно указывать локальные ссылки на загруженные файлы на нашем сервере in the form of "<file /upload/files/sms/каталог_загрузки/название_файла>". ƒл€ вложений-картинок можно устанавливать атрибуты, for example,, "<file /upload/files/sms/каталог_загрузки/название_файла width=200 height=400>". To download a file from an external source, you can pass an additional fileurl parameter in the request containing the full http(s) address of the file.

The maximum number of attachments transmitted in a request is 20, and the size of each attachment should not exceed 10 MB. If the specified limits are exceeded, an error with the code 1 (incorrect parameters) will be returned. When sending each email, the maximum total size of attached attachments is 15 MB, attachments that do not fit into this size will be transmitted by a link to our website.

By default, a special unsubscribe link is added to the end of the message text. To disable this link, you need to add a special macro {no_unsub} to any place in the text of the letter.

For e-mail messages, specifying the subject, text and sender's address is mandatory.

Examples of sending e-mail messages

Examples:

Sending an e-mail to the address " alex@mysite.com "with the subject "Privet" and the text "Hello" from the sender " alex2@mysite2.com":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=alex%40mysite.com&mes=Hello&subj=Privet&sender=alex2%40mysite2.com&mail=1
Send e-mail with the subject "Holiday" and two photos via library based on cURL:

<?php
include "smsc_api.php";
send_sms("alex@mysite.com", "Hello", 0, 0, 0, 8, "alex2@mysite2.com", "subj=Holiday", array("/home/alex/1.jpg", "/home/alex/2.jpg"));
?>

Send e-mail with the subject "Hello" and a photo that you previously downloaded to the server:

<?php
include "smsc_api.php";
send_sms("alex@mysite.com", "Hello, this is my photo &lt;file /upload/files/sms/123abc/photo.jpg width=200 height=400>", 0, 0, 0, 8, "alex2@mysite2.com", "subj=Hello");
?>

Sending a voice message (call)

To send a voice message, you need to call the address using the GET or POST method: https://smscentre.com/sys/send.php?login=<login>&psw=<password>&phones=<phones>&mes=<message>&call=1
When forming a message, you can specify both text and add wav and mp3 media files.

If you plan to transfer files, then they must be transmitted by the POST method in the body of an http(s) request to the server. The positions in the text in which you plan to insert files must be designated in a special way in the form of "<file n><file n>", where n is the file number in the generated list starting from one. If you do not specify the positions, then the corresponding files will be added to the end of the message.

ѕри создании сообщени€ можно вставл€ть в текст http(s)-ссылки ранее загруженных файлов, узнать которые можно в личном кабинете на странице отправки, нажав последовательно ссылки "прикрепить файл" Ц "«агруженные файлы". “акже можно указывать локальные ссылки на загруженные файлы на нашем сервере in the form of "<file /upload/files/sms/каталог_загрузки/название_файла>". To download a file from an external source, you can pass an additional fileurl parameter in the request containing the full http(s) address of the file. In this case, passing the mes parameter in the request is optional.

Since telephone lines cannot perfectly play complex media files, when forming a sent message, the transmitted files are converted to a simple format.

When sending a voice message, the initial time and cost are calculated approximately. After sending and listening to messages the subscriber, the duration and the call cost or adjusted downwards (for example, if the subscriber has not heard the message through), or if the duration of the message exceeds the calculated, the difference in seconds is indicated in comments to the message in the form of extra time, overtime, including those which displayed in detail in a separate entry. Also, overtime may occur when using the voice menu (IVR).

The maximum number of attachments transmitted in a request is four, and the size of each attachment should not exceed 5 MB. If the specified limits are exceeded, processed attachments will be excluded.

To send your phone number as the sender's name, you must specify it in the sender parameter. The specified number must first be added and activated in the personal account on this page.

When forming a request, you can pass a special parameter param, which specifies some characteristics of the call (more details can be found in the description). Additionally, you can also pass the voice parameter in the request, which determines the voice used for voicing the text. This parameter can take the following values:
  • voice = m Ц male voice.
  • voice = m2 Ц male voice 2.
  • voice = m3 Ц male voice 3.
  • voice = m4 Ц male voice 4.
  • voice = w Ц female voice.
  • voice = w2 Ц female voice 2.
  • voice = w3 Ц female voice 3.
  • voice = w4 Ц female voice 4.

Using the voice menu (IVR)

To use the voice menu, you must send a text or voice file with the initial instructions for the subscriber at the beginning of the message text and then specify a macro containing the service menu commands {menu: <...>}, where <...> description of the voice menu options.

Schematically, the message using the voice menu looks like this:
—“ј–“ќ¬џ… “≈ —“

{menu: [“≈ —“ ћ≈Ќё]
1: “≈ —“ или  ќћјЌƒј
2
: “≈ —“2 или  ќћјЌƒј2
...
}

 ќЌ≈„Ќџ… “≈ —“

After picking up the phone, the subscriber is given the "START TEXT", then the "MENU TEXT" is played with a description of the menu items and acceptable actions. After pressing the key on the numeric keypad of the phone corresponding to the desired item, the subscriber can be voiced the text "TEXT" or perform one or more consecutive "COMMANDS". After exiting the menu, the "END TEXT" is voiced".

Description of the parameters used in the {menu} macro: <...>}:

OptionThe value
*: backReturn to the previous menu.
#: startReturn to the beginning of the menu and repeat the " MENU TEXT".
0: repeatRepeat the selected item.
n: msgThe menu item that the subscriber enters when pressing the nkey, where n is the number of the menu item, which can take values from 1 to 9, msg is a message or command. Menu items can be duplicated one by one to perform multiple actions when a single key is pressed.
nm: msgSub-item m of the menu item n, which the subscriber enters when pressing the mkey . It can take values from 1 to 9. msg-message or command. Menu items can be duplicated one by one to perform multiple actions when you press a single key. The nesting of sub-items is limited only by the size of the entire message (1000 characters).

In paragraphs and sub-paragraphs, you can use the following commands:

TeamThe value
urlThe http (s) address of the Client handler, to which information about the current item and the time when the subscriber is in the menu will be transmitted.
call:phone wait=n ok:end err:n recordRedirects the caller's call to the specified phone number, where the required parameter is phone-phone number or a comma-separated list of phone numbers. You can specify up to 9 numbers. The numbers to which the subscriber's call will be redirected must be registered on this page.
Optional parameters are:
Ц wait=n Ц the waiting time for the caller to pick up the phone, where n is the waiting time in seconds. The range of possible parameter values is from 0 to 120. By default, the waiting time for the subscriber to pick up the phone is 120 seconds.
Ц ok:end Ц after successfully connecting to the specified number and ending the dialog, end the voice menu.
Ц err:n Ц if you can't reach the specified number, then go to the step or label ndescribed in the menu body. The label can take the value of any set of Latin letters and numbers.
Ц record Ц after a successful connection with the specified number, record the conversation. The recording time for one call is limited to a maximum of 30 minutes. Also, the connection and recording is interrupted after 30 seconds of silence on the part of the subscribers. This parameter is specified last. The link to the recording is displayed in the message history under the text of the voice menu.
sms:phone,sender,msgSending an SMS message to the specified phone number, where phone is the phone number, sender is the sender's name, and msg is the message text. As a phone number, as well as in the message text, a special variable $phone can be specified, which, when sent, will be replaced with the phone number of the subscriber who received this voice menu..
record: nRecording of a fragment of the subscriber's voice response, which will be performed from the moment of activation until the end of the command, where n is the time for recording in seconds. By default (without explicitly specifying the time), recording is limited to 30 seconds. Also, the recording is interrupted after 10 seconds of silence on the part of the subscriber.
endIndicates whether to exit the voice menu. After exiting, the "END TEXT" will be read".
Examples:

<?php
$url
= 'https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999,79999999998&call=1&charset=utf-8&mes=';

$msg = '«дравствуйте!

{menu: Ќажмите 1 дл€ первого пункта, 2 дл€ второго пункта, 3 дл€ отправки за€вки на обратный звонок, 5 дл€ св€зи с оператором, решетка дл€ перехода в начало, 0 дл€ повтора, дл€ возврата в предыдущее меню нажмите звЄздочку.
*: back
#: start
0: repeat
1: пункт 1, нажмите 1 дл€ подпункта 1, 2 дл€ подпункта 2, 3 дл€ подпункта 3
11: подпункт 1.1
12: подпункт 1.2
13: подпункт 1.3
2: пункт 2, нажмите 1 дл€ подпункта 2.1
21: подпункт 2.1
3: sms:79999999999,Sender,текст
3: end
4: sms:$phone,Sender,¬аш номер: $phone
4: end
5: url
5: call:79999999999,79999999998 wait=10 ok:end err:6
6: call:79999999997 wait=60 ok:end err:callerr record
7: —ейчас начнетс€ запись до 10 секунд
7: record: 10
7:  онец записи
err: неверный номер, нажмите 0 дл€ повтора
callerr: »звините, не удалось дозвонитьс€ до оператора, выберите другой пункт или повторите попытку позже}

¬сего вам доброго!'
;

echo
file_get_contents($url.urlencode($msg));
?>

Examples of sending voice messages

Examples:

Sending a voice message with the text " Hello":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello&call=1
Sending a voice message with the text "Hello" from phone number "79991234567":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello&call=1&sender=79991234567
Sending a voice message with the text "Hello world", voiced by a male voice, with a waiting time for picking up the phone 20 seconds, a repeat interval 10 seconds and the number of attempts to dial equal to 3:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello%20world&call=1&voice=m&param=20%2C10%2C3
Sending a voice message with the text "Hello world", voiced by a female alternative voice:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello%20world&call=1&voice=w2
Sending a voice message with a voice file attached via the fileurl parameter:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&call=1&fileurl=http://mysite.com/voice.wav
Sending a voice message with text and two audio files via a cURL-based library:

<?php
include "smsc_api.php";
send_sms("79999999999", "first file <file 1> and second file <file 2>", 0, 0, 0, 9, false, "", array("/home/alex/1.mp3", "/home/alex/2.wav"));
?>

Sending a viber message

To send a viber message, you must call the GET or POST address method: https://smscentre.com/sys/send.php?login=<login>&psw=<password>&phones=<phones>&mes=<message>&viber=1

Sending images

≈сли на каждый номер планируетс€ отправл€ть отдельную картинку в сообщении, то в этом случае необходимо or передавать полный http(s)-адрес внешнего файла in the form of <file http(s)://...>, or send an additional fileurl parameter in the request that contains the full http(s) address of the image. When using fileurl, passing the mes parameter in the request is optional.

If, when creating a mailing list, one text is supposed to be sent to several numbers, then you need to insert the full http(s) link of the previously uploaded image file into the message text, which you can find out in your personal account on the sending page by clicking "attach file"-"Uploaded files". The attached file must not exceed 512 Kb in size and must meet one of the following formats: JPG, GIF, PNG.

Adding a button

To insert a button in the message, when you click on it, you will open the browser and go to the specified address, you need to add a special macro {button,url,text} to the message text, where:
<button> Ц macro name.
<url> Ц full http address of the link that will be clicked when the button is clicked.
<text> Ц the text of the button. The length of the text can not exceed 30 characters.

To insert a button into the message, when you click on it, the subscriber will be called to the specified phone number, you need to add a special macro to the message text {button, tel:79999999999, text}.

Message types

The system supports the following types of viber messages:
  • Text only-the subscriber receives a text message.
  • Picture only-the subscriber receives the picture.
  • The text+button Ц subscriber receives a text message, which is located under the button. When you press the button, the transition occurs on a given link.
  • The text+button+picture Ц caller receives a text message, which is located under the picture and button. When you press the button, the transition occurs on a given link.
To configure the software and test sending viber messages, you can use our common sender name "SMSC" and predefined templates:
  • Hello! This is test message
  • Hello! This is a test message
  • Test
  • Test
  • Test {button,https://smscentre.com,site}
  • Test {button, https://smscentre.com, site}
  • Picture <file http://smscentre.com/im/smsc_logo_tiny.gif>
  • Image <file http://smscentre.com/im/smsc_logo_tiny.gif>
As in the templates for operators, the general rules for creating messages for the specified templates apply here (at the bottom of the page, the drop-down tab "Template registration rules").

Examples of sending viber messages

Examples:

Sending a viber message with the text " Hello":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=Hello&viber=1
Sending a viber message using one of the predefined templates for testing with the text "Test", the button "{button, http://smscentre.com, Site} "and the image previously uploaded in your personal account and having the address" http://smscentre.com/upload/files/sms/1856f97d/6_1.jpg":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&viber=1&mes=Test+%7Bbutton%2Chttp%3A%2F%2Fsmscentre.com%2CSite%7D+http%3A%2F%2Fsmscentre.com%2Fupload%2Ffiles%2Fsms%2F1856f97d%2F6_1.jpg
Sending a viber message using one of the predefined templates for testing with the text "test", the button "{button, http://smscentre.com, Site} "and the image located on the external resource" https://mysite.com/sms/picture.jpg":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&viber=1&mes=test+%7Bbutton%2Chttp%3A%2F%2Fsmscentre.com%2CSite%7D+%3Cfile+https%3A%2F%2Fmysite.com%2Fsms%2Fpicture.jpg%3E
Sending a viber message using one of the predefined test templates with the text "test", the button "{button, http://smscentre.com, Site} "and the picture" https://mysite.com/sms/picture.jpg " passed via the fileurl parameter:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&viber=1&mes=test+%7Bbutton%2Chttp%3A%2F%2Fsmscentre.com%2CSite%7D&fileurl=https%3A%2F%2Fmysite.com%2Fsms%2Fpicture.jpg

Using prefixes when sending messages

To send various types of messages you can use the special prefix at the start or instead of text messages.

Supported prefixes:

NameDescription
__CALL__: messageSending a voice message (call). When sending a voice message, at the end of the text, you can specify a special combination "\n~~~\n" (line feed, 3 of the tilde character, and again line feed), after which you can pass the param parameter that determines some characteristics of the call (for more information, see the description). When forming a message, you can specify both text and add wav and mp3 media files, as well as insert previously downloaded files. More information on the process of creating a voice message can be found on this page.
__VIBER__: messageSending a message to users of the Viber messenger.
__SOC__: message Sending a message to users of the social networks "Odnoklassniki", "VKontakte" or users of " Mail.Ru Agent".
__PING__Sending a special SMS that is not displayed in the phone to check the numbers for availability in real time by the delivery status.
__HLR__Indicates an HLR request to get information about the number from the operator's database without sending a real SMS. More information on HLR queries can be found here.


Examples:

Sending a voice message with the text "Privet":

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=__CALL__%3A%20Privet
Sending Ping-SMS:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=__PING__
Sending HLR-query:

https://smscentre.com/sys/send.php?login=alex&psw=123&phones=79999999999&mes=__HLR__

Managing message templates

To manage message templates, call the appropriate address with the required command and parameters using the GET or POST method.

To create a template: https://smscentre.com/sys/templates.php?add=1&login=<login>&psw=<password>&name=<name>&msg=<msg>
To change the template: https://smscentre.com/sys/templates.php?chg=1&login=<login>&psw=<password>&id=<id>
To delete a template: https://smscentre.com/sys/templates.php?del=1&login=<login>&psw=<password>&id=<id>
To get a list of templates: https://smscentre.com/sys/templates.php?get=1&login=<login>&psw=<password>
The following parameters are passed to the server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
nameTemplate name.
msgThe text of the message.
formatMessage format:
empty string Ц not specified.
sms Ц SMS.
flash Ц Flash-SMS.
bin Ц Binary SMS.
push Ц Wap-push.
mms Ц MMS.
call Ц Call.
mail Ц E-mail.
viber Ц Viber.
senderSender ID.
fl[1]Use for auto-signing.

If an error occurs, the Server returns the following string:
  • when fmt = 0:
    ERROR = N (description)

  • when fmt = 1:
    0,-N

  • when fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • when fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
3Record not found.
4The IP address is temporarily blocked.
5Save or delete error.
9Attempt to send more than three identical template action requests.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is successful, the Server returns a response in the form of a string:

When creating a template:
  • when fmt = 0: ID - <id>

  • when fmt = 1: <id>

  • when fmt = 2:
    <template>
    <id>id</id>
    </template>

  • when fmt = 3:
    {
    "id": <id>
    }

When changing or deleting a template:
  • when fmt = 0, 1: OK

  • when fmt = 2:
    <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }


When requesting a list of message templates:
  • when fmt = 0:
    id = <id>, name = <name>, format = <format>, sender = <sender>, flag = <flag>, message = <message>
    ...

  • when fmt = 1:
    <id>,<name>,<format>,<sender>,<flag>,<message>
    ...

  • when fmt = 2:
    <list>
    <template>
    <id>id</id>
    <name>name</name>
    <format>format</format>
    <sender>sender</sender>
    <flag>flag</flag>
    <message>message</message>
    </template>
    ...
    </list>

  • when fmt = 3:
    [{
    "id": <id>,
    "name": "<name>",
    "format": "<format>",
    "sender": "<sender>",
    "flag": <flag>,
    "message": "<message>"
    },
    ...]

Where:
<id> Ц template ID assigned by the system automatically.
<name> Ц template name.
<format> Ц message format.
<sender> Ц sender ID.
<flag> Ц flag for the template. Setting the first bit of the flag (fl[1]=1) assigns the use of the template for auto-signing.
<message> Ц the text of the message.

The server does not accept more than three identical requests for actions with templates within a minute to reduce the load and protect against errors and loops in the Client-side program.

Managing operator templates

To manage service and transactional message templates, call the appropriate address with the required command and parameters using the GET or POST method.

To create a template (for all operators): https://smscentre.com/sys/op_templates.php?add=1&login=<login>&psw=<password>&sender=<sender>&msg=<msg>&mts_srv=1&mts_trn=1&mega_srv=1&mega_trn=1&bee_srv=1&bee_trn=1&tele2_srv=1&tele2_trn=1&soc=1
To get information about the template (for all operators): https://smscentre.com/sys/op_templates.php?get=1&login=<login>&psw=<password>&sender=<sender>&msg=<msg>
The following parameters are passed to the server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
senderThe name of the sender for which the template is being created.
msgTemplate text.
charsetThe encoding of the template text, if used other than the default windows encoding-1251. Options: utf-8 and koi8-r.
mts_srvCreate a template for the MTS operator (service messages).
mts_trnCreate a template for the MTS operator (transactional messages).
mega_srvCreate a template for the Megafon operator (service (information) messages).
mega_authCreate a template for the Megafon operator (authorization messages).
mega_trnCreate a template for the Megafon operator (transactional messages).
bee_srvCreate a template for the Beeline operator (service messages).
bee_trnCreate a template for the Beeline operator (transactional messages).
tele2_srvCreate a template for the Tele2 operator (service messages).
tele2_trnCreate a template for the Tele2 operator (transactional messages).
socCreate a template for a soc message sent to users of the Odnoklassniki, VKontakte, or Mail.Ru Agent social networks".

If an error occurs, the Server returns the following string:
  • when fmt = 0:
    ERROR = N (description)

  • when fmt = 1:
    0,-N

  • when fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • when fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
4The IP address is temporarily blocked.
9Attempt to send more than ten identical template action requests.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is successful, the Server returns a response in the form of a string:

When creating a template:
  • when fmt = 0:
    name = <status>, id = <id>
    ...

  • when fmt = 1:
    <name>,<status>,<id>
    ...

  • when fmt = 2:
    <result>
    <template>
    <name>name</name>
    <status>status</status>
    <id>id</id>
    </template>
    ...
    </result>

  • when fmt = 3:
    [{
    "name": <status>,
    "id": <id>
    },
    ...]

When requesting a list of templates:
  • when fmt = 0:
    name = <status>, id = <id>
    ...

  • when fmt = 1:
    <name>,<status>,<id>
    ...

  • when fmt = 2:
    <result>
    <template>
    <name>name</name>
    <status>status</status>
    <id>id</id>
    </template>
    ...
    </result>

  • when fmt = 3:
    [{
    "name": <status>,
    "id": <id>
    },
    ...]

Where:
<name> Ц operator name and message type.
<id> Ц template ID assigned by the system automatically.
<status> Ц the status of the template, can take the following values:

for the add command:
-2 Ц the specified template cannot be saved;
-1 Ц the sender name for this template was not found or was not accepted by the operator;
1 Ц template added successfully;

for the get command:
-1 Ц the template for the specified operator was not found;
0 Ц awaiting registration;
1 Ц sent for registration;
2 Ц accepted by the operator;
3 Ц not accepted by the operator;
4 Ц temporarily disabled.

The server does not accept more than ten identical requests for actions with templates within a minute to reduce the load and protect against errors and loops in the Client-side program.

Virtual sending (test mode)

This mode of operation allows you to test sending messages without actually transmitting them to operators. It can be useful for initial setup and testing of various software and hardware. To enable this mode, you need to go to your personal account under "Settings" in the drop-down block "API Settings", check the box "Test mode (virtual sending without payment)".

During virtual sending, all messages will have the final status "Delivered", but during the sending process, the messages will go through all the stages of processing along the chain "Waiting to be sent" Ц "Sent to the operator" Ц "Delivered". You can get message statuses either on request or on your own http handler. You can send both single messages and mass mailings. You can test different types of messages (SMS, binary messages, HLR, MMS, call), except for e-mail..

Event Notifications

When certain events occur, you may need to send notification messages containing the information necessary to process these events. To solve such problems, you can use the extension of our monitoring system, which allows you to send various notifications through our service from external systems. To do this, in your personal account on the page "Creating a task group" you need to create an appropriate group, where you can specify notification templates, types of messages sent when an event occurs, and contacts for notifications (phone numbers, e-mail addresses, jabber accounts).

To send a notification, you need to call the GET or POST address method: https://smscentre.com/sys/ping.php?login=<login>&psw=<password>&id=<id>
The following parameters are passed to the server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
idID of the task group (the "ID" column").
nameThe name of the rule or server in the task. Replaces the {NAME} macro in the notification text.
hostThe address or IP of the server being checked. Replaces the {HOST} macro}.
infoAdditional information about the event. Replaces the macro {INFO}.
okWhen generating a notification, use the following template:
0 Ц (by default) a task group template is used, which is sent when a failure occurs.
1 Ц the task group template that is sent during recovery is used.

If an error occurs, the Server returns the following string:
  • ERROR = N (description)

  • When fmt = 1:
    0,-N

  • When fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • When fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
3Task group not found.
4The IP address is temporarily blocked.
9Attempt to send more than five identical notification requests within a minute.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is successful, the Server returns a response in the form of a string.

  • when fmt = 0 and fmt = 1: OK

  • when fmt = 2:
    <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }

The server does not accept more than five identical requests to send a notification within a minute to reduce the load and protect against errors and loops in the Client-side program.

Actions with mailing lists

To create a mailing list, you need to call the GET or POST address method:
https://smscentre.com/sys/jobs.php?add=1&login=<login>&psw=<password>&name=<name>&phones=<phones>&mes=<message>
To delete a mailing list, call the GET or POST address method:
https://smscentre.com/sys/jobs.php?del=1&login=<login>&psw=<password>&id=<id>
To disable a mailing list that is waiting to be sent, you must call the GET or POST address method:
https://smscentre.com/sys/jobs.php?cancel=1&login=<login>&psw=<password>&id=<id>
To get information about a particular mailing list, you need to call the GET or POST address method:
https://smscentre.com/sys/jobs.php?get=1&login=<login>&psw=<password>&id=<id>
To receive mailing list, you need to call method GET or POST address:
https://smscentre.com/sys/jobs.php?get_all=1&login=<login>&psw=<password>
Description of the parameters passed to the Server when creating a mailing list (any of the additional parameters is applied to each message in the mailing list; to work with e-mail newsletters, you must pass the additional parameter mail=1 in the request):

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
nameMailing list name.
phonesThe number or comma-separated or semicolon-separated list of mobile phone numbers in international format to which the message is sent. Numbers can be passed without the "+ " sign. If the number is passed without the " + " sign, it can be corrected by automatic formatting and converted to the correct international format. Thus, some errors when entering phone numbers can be corrected automatically. To disable auto-correction, pass the number with the "+ " sign.".
You can also send a message to a group of numbersby specifying a special code " G<номер группы>". The message will be sent to all numbers belonging to this group. For an e-mail message, a list of recipients' e-mail addresses is transmitted .
mesThe text of the message being sent. The maximum size is 1000 characters. If necessary, the message will be divided into several SMS messages sent to the subscriber and paid separately. Size of one SMS Ц 160 characters in Latin or 70 characters in Cyrillic. When splitting a message into multiple SMS messages, a header is added to each part to combine the parts into a single message on the recipient's phone, and the maximum length becomes 67 for Cyrillic and 153 for Latin letters. You can add comments to the message text that are intended for the sender to view the history in the personal account.
Additional options
senderThe sender's name displayed on the recipient's phone. English letters, numbers, spaces, and some characters are allowed. Length Ц 11 characters or 15 digits. All names are registered in your personal account on this page.
sender2This parameter is used as the sender's name when auto-replaying via SMS in case of non-delivery of messages via the original sending option..
translitA sign that the message you want to translate in translit.
0 (default) Ц do not translate into transliteration.
1 Ц translate to translit as " translate".
2 Ц translate into transliteration as " mpaHc/Ium".
tinyurlAutomatically shorten links in messages. Allows you to replace links in the message text with short ones to reduce the length, as well as to track the number of clicks on this page.
0 (default) Ц leave links in the message text without changes.
1 Ц shorten links.
timeThe time of sending the SMS message to the subscriber.
Formats:
  1. DDMMYYhhmm or DD.MM.YY hh: mm.
  2. h1-h2. Sets the time range in hours. If the current time is less than h1, the SMS message will be sent to the subscriber when the time h1 occurs, if the current time falls in the interval from h1 to h2, that message will be sent immediately, otherwise the message will be sent the next day when the h1 time is reached. This function, for example, is useful in order to prevent subscribers from receiving SMS messages at night.
  3. 0ts, where ts is timestamp, the time in seconds since January 1, 1970.
  4. +m. Sets the relative time offset from the current time in minutes. The + character must be encoded as %2B in the http request.
If time = 0 or the time already elapsed is specified, the message will be sent immediately.
rptDetermines the frequency of sending the newly created mailing list.
0 (default) Ц manually.
1 Ц every hour.
2 Ц every day.
3 Ц every working day.
4 Ц every weekend.
5 Ц every week.
6 Ц every month.
7 Ц every year.
rptnSets the maximum number of repetitions for a deferred periodic distribution.
tzThe time zone in which the time parameter is set. It is indicated relative to Moscow time. The tz parameter can be either positive or negative. If tz is equal to 0, the Moscow time zone will be used , if the tz parameter is not set, the time zone will be taken from the Client settings.
periodThe period of time during which you need to send the newsletter. Represents a number in the range from 0.1 to 720 hours. Used in conjunction with the freq parameter. This parameter allows you to stretch the mailing list in time for the gradual receipt of SMS messages by subscribers.
freqThe interval or frequency at which to send an SMS message to the next group of numbers. The number of numbers in the group is calculated automatically based on the period and freq parameters. Set in the interval from 1 to 1440 minutes. Without the period parameter, the freq parameter is ignored.
flashIndicates whether a Flash message is displayed immediately on the phone screen.
0 (default) Ц normal message.
1 Ц Flash message.
binBinary message flag.
0 (default) Ц normal message.
1 Ц binary message. In an http request, it must be encoded using the urlencode function.
2 Ц binary message, represented as a hexadecimal string (hex).

The binary message is passed along with the UDH header at the beginning in the mes parameter, in which the first byte specifies the length of the header. To send a binary message without a UDH header, specify a null byte at the beginning of the message (00 in hex).
To be able to pass the pid and dcs parameters, you need to add a special combination "\n~~~\n" (line feed, 3 tilde characters, and again line feed) to the end of the binary message, and then the text "pid: value1, dcs: value2" with the exact preservation of spaces.
pushA sign of a wap-push message, with which you can send an Internet link to your phone.
0 (default) Ц normal message.
1 Ц wap-push message. In the mes parameter, you must pass the link and title through a line feed.
hlrA sign of the HLR-request for information about the number from the operator's database without sending real SMS.
0 (default) Ц normal message.
1 Ц HLR request. An HLR request will be executed for each phone number in the list. The mes parameter is not used.
pingIndicates a special SMS that is not displayed in the phone to check the numbers for availability in real time by the delivery status.
0 (default) Ц normal message.
1 Ц ping-sms. A Ping SMS will be sent to each phone number in the list. The mes parameter is not used.
mmsA feature of an MMS message that can be used to transmit text (txt), images in various formats (jpg, gif, png), music (wav, amr, mp3, mid), and video (mp4, 3gp). The files are passed in the body of the http request.
0 (default) Ц normal message.
1 Ц An MMS message. An MMS will be sent to each phone number in the list.
mailThe flag of the e-mail message. The files attached to the message are passed by the POST method in the body of the http request..
0 (default) Ц normal message.
1 Ц e-mail message.
socA sign of a soc message sent to users of the social networks "Odnoklassniki", "VKontakte" or to users of " Mail.Ru Agent".
0 (default) Ц normal message.
1 Ц soc message.
viberFlag of the viber message sent to users of the Viber messenger.
0 (default) Ц normal message.
1 Ц viber message.
whatsappA sign of a whatsapp message sent to WhatsApp messenger users.
0 (default) Ц normal message.
1 Ц whatsapp message.
fileurlThe full http address of the file to upload and transmit in the message. The minimum file size is 101 bytes.
mes2This parameter sets the message option to be sent via SMS in the automatic repeat mode in case of non-delivery to alternative routes, for example, sending to messengers. To enable automatic replay, you must additionally pass the fl[5] flagequal to 1 in the request.
callIndicates a voice message. When forming a voice message, you can send both text and attach files. Files added to the message must be passed by the POST method in the body of the http request..
0 (default) Ц normal message.
1 Ц voice message.
voiceThe voice used for voicing the text (only for voice messages).
m Ц male voice.
m2 Ц male voice 2.
m3 Ц male voice 3.
m4 (default) Ц male voice 4.
w Ц female voice.
w2 Ц female voice 2.
w3 Ц female voice 3.
w4 Ц female voice 4.
paramComma-separated list of parameters for a voice message in the format " param=w, i,n".
Here:
  • w Ц the waiting time for the caller to pick up the phone after the call starts, in seconds. If the subscriber does not pick up the phone within the specified time, the call will be repeated with the error "the subscriber is busy". The operating range of the parameter values is from 10 to 35, but you can specify an interval from 0 to 99 (if the value is less than 10, it will be reduced to 10, similarly for the upper bound).
  • i Ц repeat interval, that is, the time interval after which the call will be repeated (in seconds). The operating range of the parameter is from 10 to 3600 (if the value is less than 10, it will be reduced to 10).
  • n Ц the total number of dial-up attempts. Operating range of values from 1 to 9 (0 will be reduced to 1).
If you specify a value for any parameter other than the possible values, the default values of all parameters will be used (n = 8, w = 25, i from 3 to 14 seconds incrementally).
subjThe subject of the MMS or e-mail message. When sending an e-mail, you must specify the subject, text, and address of the sender. For MMS , it is mandatory to specify the subject or text. If you do not specify the subject of the MMS, then the sender's name, passed in the request or used by default, will be used as it.
charsetThe encoding of the transmitted message, if used other than the default windows encoding-1251. Options: utf-8 and koi8-r.
costIndicates whether you need to receive the cost of the mailing list.
0 (default) Ц normal sending.
1 Ц add the cost of mailing to the response.
fmtFormat of the server response about successful sending.
0 Ц (by default) as a string (OK - 1 SMS, ID - 1234).
1 Ц return the response in the form of numbers: ID and number of SMS separated by commas (1234,1), with cost = 2, another comma-separated cost (1234,1,1.40), with cost = 3, another new Customer balance (1234,1,1.40,100.50), with cost = 1, the cost and quantity Comma separated SMS (1.40,1).
2 Ц response in xml format.
3 Ц response in json format.
listA list of phone numbers and their corresponding messages, separated by a colon or semicolon, and presented as:
phones1:mes1
phones2:mes2
...
Lines are separated by a newline character (%0A). As phones, you can specify multiple phone numbers separated by commas. If you want to pass a newline character in the mes message, specify it with \n. If it is not possible to correct the text of a multi-line message, it is possible to enable a special mode for transmitting this type of message. To do this, you must additionally pass the nl parameterequal to 1 in the request.
If it is necessary to transmit different names of senders (and, possibly, different time zones of subscribers), the following transmission format can be used for different messages:
sender1,tz1|phones1:mes1
sender2,tz2|phones2:mes2
...
In this case, the tz parameter is optional.
The list parameter allows you to send multiple messages with different messages to multiple phones. an http request. The messages in the request are assigned a single identifier. The entire parameter must be encoded using the urlencode function.
tplID of the template to be used as the message text. To use the template , the mes parameter must be empty.
validThe "life" period of the SMS message. Specifies the time during which the operator will attempt to deliver the message to the subscriber. Range from 1 to 24 hours. It is also possible to transmit the time in the hh:mm format in the range from 00:01 to 24:00.

The required parameters are login, psw, name, phones and mes or login, psw, name and list.

Description of the parameters passed to the Server when deleting, disabling, or receiving the mailing list:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
idID of the mailing list. Returned by the Server after creation and used for further identification of the mailing list.
Additional options
startThe date from which you want to receive the mailing list. If this parameter is not specified, it returns the list of mailing lists for the last 2 months, but not more than 10. It is used together with the get_all parameter. Format: 'dd. mm. yyyy'.
endThe date by which you want to receive the mailing list. If this parameter is not specified, the mailing list is returned up to the current date, but no more than 10. It is used together with the get_all parameter. Format: 'dd. mm. yyyy'.

Required parameters are login, psw, and id.

After approval and processing, the Server returns confirmation to the Client indicating the result of processing.

All parameters that contain special characters (plus, space, etc.) must be encoded using the urlencode function to be passed in an HTTP request..

Server response and error codes

The server sends the response as a string:

If an error occurred, the response will be one of the following:

When fmt = 0:
  • ERROR = N (description) Ц for 1,2,3,4,5,9 errors.
When fmt = 1:
  • 0,-N Ц for errors 1,2,3,4,5,9.
When fmt = 2:
  • For 1 errors,2,3,4,5,9:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>
When fmt = 3:
  • For 1 errors,2,3,4,5,9:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
3Error saving a record.
4IP address is temporarily blocked due to frequent errors in the queries. read More
5Invalid date format.
9Sending more than one identical request for actions with mailing lists within a minute.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is processed successfully, a string of the following format is returned:

When creating a mailing list:
  • when cost = 0 and fmt = 0: OK, ID - <id>

  • when cost = 1 and fmt = 0: OK, ID - <id>, COST - <cost>

  • when cost = 0 and fmt = 1: <id>

  • when cost = 1 and fmt = 1: <id>,<cost>

  • when cost = 0 and fmt = 2:
    <result>
    <id>id</id>
    </result>

  • when cost = 1 and fmt = 2:
    <result>
    <id>id</id>
    <cost>cost</cost>
    </result>

  • when cost = 0 and fmt = 3:
    {
    "id": <id>
    }

  • when cost = 1 and fmt = 3:
    {
    "id": <id>,
    "cost": "<cost>"
    }

When you disable or delete a mailing list:

  • when fmt = 0,1: OK

  • when fmt = 2:
    <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }

When receiving information about a specific mailing list (when mail=1, the "phones" parameter is replaced with " emails"):

  • when fmt = 0: <id>|<name>|<subject>|<repeat_send>|<repeat_cnt>|<created>|<changed>|<need_date>|<last_sent>|<phones>|<message>|<format>|<validity>|<period>|<frequency>|<status>|<sender_id>

  • when fmt = 1: <id>;<name>;<subject>;<repeat_send>;<repeat_cnt>;<created>;<changed>;<need_date>;<last_sent>;<phones>;<message>;<format>;<validity>;<period>;<frequency>;<status>;<sender_id>

  • when fmt = 2:
    <job>
    <id>id</id>
    <name>name</name>
    <subject>subject</subject>
    <repeat_send>repeat_send</repeat_send>
    <repeat_cnt>repeat_cnt</repeat_cnt>
    <created>created</created>
    <changed>changed</changed>
    <need_date>need_date</need_date>
    <last_sent>last_sent</last_sent>
    <phones>phones</phones>
    <message>message</message>
    <format>format</format>
    <validity>validity</validity>
    <period>period</period>
    <frequency>frequency</frequency>
    <status>status</status>
    <sender_id>sender_id</sender_id>
    </job>

  • when fmt = 3:
    [
    {
    "id": <id>,
    "name": "<name>",
    "subject": "<subject>",
    "repeat_send": <repeat_send>,
    "repeat_cnt": <repeat_cnt>,
    "created": "<created>",
    "changed": "<changed>",
    "need_date": "<need_date>",
    "last_sent": "<last_sent>",
    "phones": "<phones>",
    "message": "<message>",
    "format": <format>,
    "validity": <validity>,
    "period": "<period>",
    "frequency": <frequency>,
    "status": <status>,
    "cost": "<cost>",
    "sms_sent": <sms_sent>,
    "sms_ok": <sms_ok>,
    "sender_id": "<sender_id>"
    }
    ]


When receiving a mailing list (when mail=1, the "phones" parameter is replaced with " emails"):

  • when fmt = 0: <id>|<name>|<changed>|<need_date>|<last_sent>|<phones>|<message>|<phones_cnt>|<cost>|<status>|<sender_id>|<format>

  • when fmt = 1: <id>;<name>;<changed>;<need_date>;<last_sent>;<phones>;<message>;<phones_cnt>;<cost>;<status>;<sender_id>;<format>

  • when fmt = 2:
    <sms_jobs>
    <job>
    <id>id</id>
    <name>name</name>
    <changed>changed</changed>
    <need_date>need_date</need_date>
    <last_sent>last_sent</last_sent>
    <phones>phones</phones>
    <message>message</message>
    <phones_cnt>phones_cnt</phones_cnt>
    <cost>cost</cost>
    <status>status</status>
    <sender_id>sender_id</sender_id>
    <format>format</format>
    </job>
    ...
    </sms_jobs>

  • when fmt = 3:
    [
    {
    "id": <id>,
    "name": "<name>",
    "changed": "<changed>",
    "need_date": "<need_date>",
    "last_sent": "<last_sent>",
    "phones": "<phones>",
    "message": "<message>",
    "phones_cnt": <phones_cnt>,
    "cost": "<cost>",
    "status": <status>,
    "sender_id": "<sender_id>",
    "format": <format>,
    "sms_sent": <sms_sent>,
    "sms_ok": <sms_ok>
    },
    ...
    ]

Where:
<id> Ц the distribution ID sent by the Client or assigned by the Server automatically.
<name> Ц mailing list name.
<subject> Ц subject (for e-mail newsletters).
<repeat_send> Ц repeat period.
<repeat_cnt> Ц the number of repetitions of the mailing list.
<created> Ц mailing list creation date.
<changed> Ц date of mailing list change.
<need_date> Ц scheduled date of dispatch.
<last_sent> Ц last sent date.
<phones> (<emails>) Ц list of phone numbers (e-mail addresses) of message recipients.
<message> Ц the text of the message.
<format> Ц message format.
<validity> Ц "lifetime" of the message.
<period> Ц message sending interval.
<frequency> Ц frequency of sending messages.
<status> Ц mailing list status.
<sender_id> Ц sender ID.
<phones_cnt> Ц number of recipients.
<cost> Ц cost of sending.
<sms_sent> Ц number of messages sent.
<sms_ok> Ц number of messages delivered.

Examples of sending operations

Examples:

Creating an SMS mailing list:

https://smscentre.com/sys/jobs.php?add=1&login=alex&psw=123&phones=79999999999&name=Privet&mes=Hello!
Creating a mailing list with a voice message:

https://smscentre.com/sys/jobs.php?add=1&login=alex&psw=1234567890&phones=79999999999&call=1&voice=w2&name=Privet&mes=Hello!
Create a mailing list with an e-mail message to the address "alex@mysite.com" with the subject "Hi" and text "Hello!" from the sender "alex2@mysite2.com" and the title of the mailing "Privet":

https://smscentre.com/sys/jobs.php?add=1&login=alex&psw=123&phones=alex%40mysite.com&mail=1&name=Privet&mes=Hello!&subj=Hi&sender=alex2%40mysite2.com
Creating a Viber mailing list with macros and auto-repeat via SMS (the text of the SMS is different from the text of the Viber message) to several numbers (the message texts must be encoded using the urlencode function):

https://smscentre.com/sys/jobs.php?add=1&login=alex&psw=123&phones=79999999999,78888888888&name=rassilka1&mes={Name}, this is a Viber message&mes2=This is an SMS for {Name}&sender=MyViber&fl[5]=1&viber=1
Deleting a created mailing list with an id equal to 701:

https://smscentre.com/sys/jobs.php?del=1&login=alex&psw=123&id=701
Disable deferred mailing with id equal to 701:

https://smscentre.com/sys/jobs.php?cancel=1&login=alex&psw=123&id=701

Checking the status

To check the delivery status of SMS or e-mail, you need to call the GET or POST address method: https://smscentre.com/sys/status.php?login=<login>&psw=<password>&phone=<phone>&id=<sms_id>
The following parameters are passed to the server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
phoneA phone number or a comma-separated list of numbers when requesting the statuses of multiple SMS messages. For multiple requests, the numbers in the list must be be listed in the order corresponding to the message IDs. To preserve the format of a multiple request, when requesting the status of a single message , enter a comma after the phone number. This description is also suitable for e-mail messages.
idMessage ID or a comma-separated list of IDs when requesting the statuses of multiple messages. To preserve the format of a multiple request when requesting the status of a single message, specify a comma after the message ID.
fmtServer response format:
0 Ц (default) as a string (Status = 1, check_time = 10.10.2010 10:10:10).
1 Ц in the form of a status number and a time stamp separated by commas (1,1286524541).
2 Ц in xml format.
3 Ц in json format.
all0 Ц (by default) get the status of the message in the usual format.
1 Ц get full information about the sent message.
2 Ц add data about the subscriber's country, operator, and region to the message information.
charsetThe encoding of the query result, if used other than the default windows encoding-1251. Options: utf-8 and koi8-r.
del1 Ц delete a previously sent message. Used in conjunction with the phone and id parameters. This parameter is described in more detail here.

Server response and error codes

If an error occurs, the Server returns the following string:
  • When fmt = 0:
    ERROR = N (description)

  • When fmt = 1:
    0,-N

  • When fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • When fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
4The IP address is temporarily blocked.
5Error deleting a message.
9Attempt to send more than five requests to get the status of the same message or more than one mass request within a minute.
This error also occurs when you try to send five or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is successful, the Server returns a response in the form of a string:

Responses for SMS messages:
  • when fmt = 0 and all = 0: Status = <status>, check_time = <last_date>, err = <err>

  • when fmt = 1 and all = 0: <status>,<last_timestamp>,<err>

  • when fmt = 2 and all = 0:
    <sms>
    <status>status</status>
    <last_date>last_date</last_date>
    <last_timestamp>last_timestamp</last_timestamp>
    <flag>flag</flag>
    <err>err</err>
    </sms>

  • when fmt = 3 and all = 0:
    {
    "status": <status>,
    "last_date": "<last_date>",
    "last_timestamp": <last_timestamp>,
    "flag": <flag>,
    "err": <err>
    }

  • when fmt = 0 and all = 1:
    Status = <status>, check_time = <last_date>, err = <err>, send_date = <send_date>, phone = <phone>, cost = <cost>, sender_id = <sender>, status_name = <status_name>, message = <message>, comment = <comment>, type = <type>

  • when fmt = 1 and all = 1:
    <status>,<last_timestamp>,<err>,<send_timestamp>,<phone>,<cost>,<sender>,<status_name>,<message>, <comment>, <type>

  • when fmt = 2 and all = 1:
    <sms>
    <status>status</status>
    <last_date>last_date</last_date>
    <last_timestamp>last_timestamp</last_timestamp>
    <flag>flag</flag>
    <err>err</err>
    <send_date>send_date</send_date>
    <send_timestamp>send_timestamp</send_timestamp>
    <phone>phone</phone>
    <cost>cost</cost>
    <sender_id>sender</sender_id>
    <status_name>status_name</status_name>
    <message>message</message>
    <comment>comment</comment>
    <type>type</type>
    <sms_cnt>sms_cnt</sms_cnt>
    </sms>

  • when fmt = 3 and all = 1:
    {
    "status": <status>,
    "last_date": "<last_date>",
    "last_timestamp": <last_timestamp>,
    "flag": <flag>,
    "err": <err>,
    "send_date": "<send_date>",
    "send_timestamp": <send_timestamp>,
    "phone": "<phone>",
    "cost": "<cost>",
    "sender_id": "<sender>",
    "status_name": "<status_name>",
    "message": "<message>",
    "comment": "<comment>",
    "type": <type>,
    "sms_cnt": <sms_cnt>
    }

  • when fmt = 0 and all = 2:
    Status = <status>, check_time = <last_date>, err = <err>, send_date = <send_date>, phone = <phone>, mccmnc = <mccmnc>, country = <country>, operator = <operator>, operator_orig= <operator_orig>, region = <region>, cost = <cost>, sender_id = <sender>, status_name = <status_name>, message = <message>, comment = <comment>, type = <type>

  • when fmt = 1 and all = 2:
    <status>,<last_timestamp>,<err>,<send_timestamp>,<phone>,<country>,<operator>,<region>,<cost>,<sender>,<status_name>,<message>, <comment>, <type>

  • when fmt = 2 and all = 2:
    <sms>
    <status>status</status>
    <last_date>last_date</last_date>
    <last_timestamp>last_timestamp</last_timestamp>
    <flag>flag</flag>
    <err>err</err>
    <send_date>send_date</send_date>
    <send_timestamp>send_timestamp</send_timestamp>
    <phone>phone</phone>
    <cost>cost</cost>
    <sender_id>sender</sender_id>
    <status_name>status_name</status_name>
    <message>message</message>
    <comment>comment</comment>
    <mccmnc>mccmnc</mccmnc>
    <country>country</country>
    <operator>operator</operator>
    <operator_orig>operator_orig</operator_orig>
    <region>region</region>
    <type>type</type>
    <sms_cnt>sms_cnt</sms_cnt>
    </sms>

  • when fmt = 3 and all = 2:
    {
    "status": <status>,
    "last_date": "<last_date>",
    "last_timestamp": <last_timestamp>,
    "flag": <flag>,
    "err": <err>,
    "send_date": "<send_date>",
    "send_timestamp": <send_timestamp>,
    "phone": "<phone>",
    "cost": "<cost>",
    "sender_id": "<sender>",
    "status_name": "<status_name>",
    "message": "<message>",
    "comment": "<comment>",
    "mccmnc": "<mccmnc>",
    "country": "<country>",
    "operator": "<operator>",
    "operator_orig": "<operator_orig>",
    "region": "<region>",
    "type": <type>,
    "sms_cnt": <sms_cnt>
    }
Where:
<status> Ц status Code (list)
<last_date> Ц the date of the last status change. Format DD.MM.YYYY hh: mm: ss.
<last_timestamp> Ц time stamp of the last status change.
<flag> is a flag in the form of a 2 byte number containing various information about the message. Combinations of bit values of different characteristics are possible. Bits 0-3 (message type): 0 Ц SMS, 1 Ц Flash-SMS, 2 Ц Binary SMS, 3 Ц Wap-push, 4 Ц HLR-request, 5 Ц Ping-SMS, 6 Ц MMS, 7 Ц Call, 8 Ц E-mail, 10 Ц Viber, 12 Ц Social Networks.
Bit 5 Ц payment of the message from the second balance. Bit 8 is a sign of a template message.
<err> Ц error code if the message was not delivered.
<send_date> Ц date the message was sent (format DD.MM.YYYY hh: mm: ss).
<send_timestamp> Ц time stamp for sending the message.
<phone> Ц subscriber's phone number or e-mail address.
<country> Ц name of the country of registration of the subscriber number.
<operator> Ц current mobile operator of the subscriber.
<operator_orig> Ц the subscriber's operator by mobile code before porting the number.
<region> Ц region of registration of the subscriber number.
<cost> Ц message cost.
<sender> Ц sender ID.
<status_name> Ц status name.
<message> Ц the text of the message.
<comment> Ц message comment.
<mccmnc> Ц the numeric code of the subscriber's country plus the numeric code of the subscriber's operator.
<type><type> - message type (0 - SMS, 1 - Flash-SMS, 2 - Binary SMS, 3 - Wap-push, 4 - HLR-request, 5 - Ping-SMS, 6 - MMS, 7 - Call, 8 - E-mail, 10 - Viber, 12 - Social Networks).
<sms_cnt> Ц number of parts in an SMS message (or seconds in a voice message).

Responses for HLR queries:
  • when fmt = 0 and all = 0:
    Status = <status>, check_time = <check_time>, err = <err>, imsi = <imsi>, msc = <msc>, mcc = <mcc>, mnc = <mnc>, cn = <cn>, net = <net>, rcn = <rcn>, rnet = <rnet>

  • when fmt = 1 and all = 0: <status>,<last_timestamp>,<err>,<imsi>,<msc>,<mcc>,<mnc>,<cn>,<net>,<rcn>,<rnet>

  • when fmt = 2 and all = 0:
    <sms>
    <status>status</status>
    <last_date>last_date</last_date>
    <last_timestamp>last_timestamp</last_timestamp>
    <flag>flag</flag>
    <err>err</err>
    <imsi>imsi</imsi>
    <msc>msc</msc>
    <mcc>mcc</mcc>
    <mnc>mnc</mnc>
    <cn>cn</cn>
    <net>net</net>
    <rcn>rcn</rcn>
    <rnet>rnet</rnet>
    </sms>

  • when fmt = 3 and all = 0:
    {
    "status": <status>,
    "last_date": "<last_date>",
    "last_timestamp": <last_timestamp>,
    "flag": <flag>,
    "err": <err>,
    "imsi": "<imsi>",
    "msc": "<msc>",
    "mcc": "<mcc>",
    "mnc": "<mnc>",
    "cn": "<cn>",
    "net": "<net>",
    "rcn": "<rcn>",
    "rnet": "<rnet>"
    }

  • when fmt = 0 and all = 1:
    Status = <status>, check_time = <check_time>, err = <err>, imsi = <imsi>, msc = <msc>, mcc = <mcc>, mnc = <mnc>, cn = <cn>, net = <net>, rcn = <rcn>, rnet = <rnet>, send_date = <send_date>, phone = <phone>, cost = <cost>, sender_id = <sender_id>, status_name = <status_name>, message = <message>, type = <type>

  • when fmt = 1 and all = 1:
    <status>,<last_timestamp>,<err>,<imsi>,<msc>,<mcc>,<mnc>,<cn>,<net>,<rcn>,<rnet>, <send_timestamp>,<phone>,<cost>,<sender_id>,<status_name>,<message>,<type>

  • when fmt = 2 and all = 1:
    <sms>
    <status>status</status>
    <last_date>last_date</last_date>
    <last_timestamp>last_timestamp</last_timestamp>
    <flag>flag</flag>
    <err>err</err>
    <imsi>imsi</imsi>
    <msc>msc</msc>
    <mcc>mcc</mcc>
    <mnc>mnc</mnc>
    <cn>cn</cn>
    <net>net</net>
    <rcn>rcn</rcn>
    <rnet>rnet</rnet>
    <send_date>send_date</send_date>
    <send_timestamp>send_timestamp</send_timestamp>
    <phone>phone</phone>
    <cost>cost</cost>
    <sender_id>sender_id</sender_id>
    <status_name>status_name</status_name>
    <message>message</message>
    <type>type</type>
    </sms>

  • when fmt = 3 and all = 1:
    {
    "status": <status>,
    "last_date": "<last_date>",
    "last_timestamp": <last_timestamp>,
    "flag": <flag>,
    "err": <err>,
    "imsi": "<imsi>",
    "msc": "<msc>",
    "mcc": "<mcc>",
    "mnc": "<mnc>",
    "cn": "<cn>",
    "net": "<net>",
    "rcn": "<rcn>",
    "rnet": "<rnet>",
    "send_date": "<send_date>",
    "send_timestamp": <send_timestamp>,
    "phone": "<phone>",
    "cost": "<cost>",
    "sender_id": "<sender>",
    "status_name": "<status_name>",
    "message": "<message>",
    "type": <type>
    }

  • when fmt = 0 and all = 2:
    Status = <status>, check_time = <check_time>, err = <err>, imsi = <imsi>, msc = <msc>, mcc = <mcc>, mnc = <mnc>, cn = <cn>, net = <net>, rcn = <rcn>, rnet = <rnet>, send_date = <send_date>, phone = <phone>, country = <country>, operator = <operator>, region = <region>, cost = <cost>, sender_id = <sender_id>, status_name = <status_name>, message = <message>, type = <type>

  • when fmt = 1 and all = 2:
    <status>,<last_timestamp>,<err>,<imsi>,<msc>,<mcc>,<mnc>,<cn>,<net>,<rcn>,<rnet>, <send_timestamp>,<phone>,<country>,<operator>,<region>,<cost>,<sender_id>,<status_name>,<message>,<type>

  • when fmt = 2 and all = 2:
    <sms>
    <status>status</status>
    <last_date>last_date</last_date>
    <last_timestamp>last_timestamp</last_timestamp>
    <flag>flag</flag>
    <err>err</err>
    <imsi>imsi</imsi>
    <msc>msc</msc>
    <mcc>mcc</mcc>
    <mnc>mnc</mnc>
    <cn>cn</cn>
    <net>net</net>
    <rcn>rcn</rcn>
    <rnet>rnet</rnet>
    <send_date>send_date</send_date>
    <send_timestamp>send_timestamp</send_timestamp>
    <phone>phone</phone>
    <cost>cost</cost>
    <sender_id>sender_id</sender_id>
    <status_name>status_name</status_name>
    <message>message</message>
    <country>country</country>
    <operator>operator</operator>
    <region>region</region>
    <type>type</type>
    </sms>

  • when fmt = 3 and all = 2:
    {
    "status": <status>,
    "last_date": "<last_date>",
    "last_timestamp": <last_timestamp>,
    "flag": <flag>,
    "err": <err>,
    "imsi": "<imsi>",
    "msc": "<msc>",
    "mcc": "<mcc>",
    "mnc": "<mnc>",
    "cn": "<cn>",
    "net": "<net>",
    "rcn": "<rcn>",
    "rnet": "<rnet>",
    "send_date": "<send_date>",
    "send_timestamp": <send_timestamp>,
    "phone": "<phone>",
    "cost": "<cost>",
    "sender_id": "<sender>",
    "status_name": "<status_name>",
    "message": "<message>",
    "country": "<country>",
    "operator": "<operator>",
    "region": "<region>",
    "type": <type>
    }

Where:
<status> Ц status Code (list)
<last_date> Ц the date of the last status change. Format DD.MM.YYYY hh: mm: ss.
<last_timestamp> Ц time stamp of the last status change.
<flag> is a flag in the form of a 2 byte number containing various information about the message. Combinations of bit values of different characteristics are possible. Bits 0-3 (message type): 0 Ц SMS, 1 Ц Flash-SMS, 2 Ц Binary SMS, 3 Ц Wap-push, 4 Ц HLR-request, 5 Ц Ping-SMS, 6 Ц MMS, 7 Ц Call, 8 Ц E-mail, 10 Ц Viber, 12 Ц Social Networks.
Bit 5 Ц payment of the message from the second balance. Bit 8 is a sign of a template message.
<err> Ц hLR error code or subscriber status code (list).
<imsi> Ц unique IMSI code of the subscriber's SIM card.
<msc> Ц the number of the service center of the operator in whose network the subscriber is located.
<mcc> Ц numeric code of the subscriber's country.
<mnc> Ц numeric code of the subscriber's operator.
<cn> Ц name of the country of registration of the subscriber.
<net> Ц name of the subscriber registration operator.
<rcn> Ц the name of the roaming country of the subscriber when he is in a foreign network.
<rnet> Ц the name of the roaming operator of the subscriber when he is in someone else's network.
<send_date> Ц date the message was sent (format DD.MM.YYYY hh: mm: ss).
<send_timestamp> Ц time stamp for sending the message.
<phone> Ц subscriber's phone number.
<country> Ц name of the country of registration of the subscriber number.
<operator> Ц the name of the operator of the subscriber.
<region> Ц region of registration of the subscriber number.
<cost> Ц message cost.
<sender> Ц sender ID.
<status_name> Ц status name.
<message> Ц the text of the message.
<type><type> - message type (for HLR, it is equal to 4).

If the message is not found or is in the archive database (the status value is -3), the status code in the appropriate format is returned for fmt = 0,2,3 . For fmt = 1, the response is returned in the normal message status format.

When multiple statuses are requested:
  • for fmt = 0 and fmt = 1, the result returns a list of rows, each of which contains information about the status of the corresponding message.
  • for fmt = 2, the format of the returned statuses is similar to the format for single messages, with the entire list of statuses contained in the tag "<list><list>".
  • for fmt = 3, the format is also similar to the format for single messages, the statuses are separated by commas, and the entire list is framed by square brackets.
In the case of multiple status requests, if the parameter value is all = 1 or all = 2, the message ID is additionally returned for each status . When all = 0, the message ID and phone number are additionally returned..

Status codes

Possible variants of message status codes or HLR requests (values of <status>):

CodeNameDescription
-3Message not foundOccurs if no message was found for the specified phone number and ID.
-2StoppedOccurs in messages from the mailing list that did not have time to leave the operator until the moment of temporary suspension of this mailing on the pageMailing lists and tasks.
-1Waiting sendIf the time of receiving the message was set by the subscriber when sending the message, then the message will remain in this status until this time, in other cases, the message will remain in this status for a short time before being sent to the SMS center.
0Transferred to the operatorThe message was sent to the operator's SMS center for delivery.
1DeliveredThe message was successfully delivered to the subscriber.
2ReadThe message was read (opened) by the subscriber. This status is possible for e-mail messages that have the format of an html document.
3ExpiredOccurs if the message "life" time has expired, but it has not been delivered to the recipient, for example, if the subscriber was not available for a certain time or the message buffer in his phone was full.
4Click on linkThe message was delivered and the subscriber clicked the short link passed in the message. This status is possible when the options "Automatically shorten links in messages" and "track subscriber numbers" are enabled in the settings".
20Unable to deliverThe attempt to deliver the message failed, this can be caused by various reasons, for example,, subscriber is blocked, doesn't exist, it is roaming without SMS exchange support, or his phone doesn't support receiving SMS messages.
22Wrong numberIncorrect phone number format.
23BannedOccurs when restrictions are triggered on sending duplicates, on frequent messages to a single number (flood), on numbers from the blacklist, on texts prohibited by the spam filter or senders ' names (Sender ID).
24Insufficient fundsThe Client's account does not have enough money to send the message.
25Unavailable numberThe phone number does not accept SMS messages, or there is no working route to this operator.

The request for message statuses must be made within one day from the date of sending. After this time, the messages are placed in the archive database. Messages with the final status sent before 18:00 of the previous day are transferred to 03:00 Moscow time. To get the real status of such messages, please contact the support service.

Also, the server does not accept more than five identical requests for the status of the same message or more than one mass request within a minute to reduce the load and protect against errors and loops in the Client-side program.

Error codes in the status

Possible error codes in the status of messages or HLR requests (values of <err>):

CodeNameDescription
0No errorThe subscriber exists and is available.
1The subscriber does not existThe specified phone number does not exist.
6Subscriber is offlineThe subscriber's phone is disconnected or out of range of the network.
11The service is not connectedMeans that the subscriber cannot accept the SMS message. For example, the service is not connected, or the subscriber is roaming, where message reception is not activated, or the subscriber's operator does not exchange SMS messages with the current roaming operator. It can also be a landline number without receiving messages.
12Error in the subscriber's phoneThe message cannot be delivered to the subscriber due to an error in the phone or SIM card.
13Subscriber is blockedOccurs, for example, if the subscriber's account has a zero or negative balance, and it is roaming, or blocked by the operator for prolonged non-payment, or voluntarily by the subscriber himself. This error can also be returned if the SIM card is damaged or if the PIN and PUK codes of the SIM card are entered incorrectly.
21No support for the serviceThe subscriber's device does not support this service (service).
200Virtual sendingThis notification appears under the message status if the message is sent in test mode (if the "Test mode (virtual sending without payment)" checkbox is set in the settings )").
219Replacing the SIM cardError sending a message due to the subscriber replacing the SIM card. After the physical replacement of the SIM card, the subscriber is blocked from receiving messages from the letter names of the senders for 24 hours. The block can be lifted by adding 100 rubles to the balance..
220Queue overflowed from operatorThis error may occur when the subscriber is not available to receive SMS messages, but messages continue to arrive to the operator and the internal message queue for this subscriber is overflowing. In rare cases, an error may occur as a result of a failure in the network of the operator itself or an overflow of the general message queue. In all such situations, the system tries to resend the specified messages several times at certain intervals.
237The caller is not respondingOccurs if the caller did not pick up the phone during the dial attempt.
238No templateOccurs if sending a message is possible only according to a certain template, and the message being sent does not satisfy it.
239Forbidden ip addressOccurs when trying to send a message from an ip address that is not included in the list of ip addresses allowed by the Client to send. It can also occur when you try to send a message from an ip address that was not previously used for sending messages and logging in to your personal account.
240Subscriber is busyOccurs when sending a voice message to a subscriber if the line is busy or the subscriber has canceled the call.
241Conversion errorAn audio conversion error occurred when converting a text or audio file to the destination format for sending a voice message to the subscriber. This error may also occur during transmission SMS messages in separate parts, when not all parts are transmitted to the operator.
242Recorded answering machineMeans that an answering machine was fixed on the subscriber's side when the voice message was sent .
243No contractOccurs when you try to send mailings of an advertising or mass nature without a signed contract.
244Mailing list is prohibitedIt means that the sending of mass and advertising mailings is prohibited for this Client, or a prohibited link is found in the message text.
245Status is not receivedDuring the day, the delivery status was not received from the operator, in this case, it is impossible to say for sure whether the message was delivered or not.
246Time limitIf in myalpari in the "Settings" in the tab "Limits and restrictions" it is set to "sending" and check "prohibit send at another time" when trying to send SMS messages in the period time specified in the field "sending", sending messages will be prohibited from showing this error.
247Limit exceeded messagesExceeded the total daily message limit specified by the Client in the personal account in the "Settings" section".
248No routeThis means that sending messages to this number is not available in our service. For example, you entered a non-existent mobile code, or there is no working SMS gateway for the specified number and text.
249Invalid number formatOccurs when the mobile code of the specified number and the number length corresponding to this code are incorrect.
250Telephone number is forbidden settingsThe number fell under the restrictions set by the Client for mobile numbers in the personal account in the "Settings" section".
251Limit is exceeded on a single numberExceeded the daily message limit per number. The limit is set By the Client in the personal account in the "Settings"section. Also, this error is possible when sending more than 50 messages to one subscriber, which were sent with a break between messages of less than 30 seconds.
252Number not permittedOccurs, for example, when a Client tries to specify one of our federal numbers as the recipient of an SMS message.
253Prohibited spam filterIf the text of the message contains obscene expressions and insults, calls to send sms and some other prohibited texts, then sending the message will be blocked. It is also forbidden to specify as the sender short paid numbers, the number of the recipient of messages, the names of operators, other people's Internet resources, companies and government organizations.
254Unregistered sender idThis error occurs when you try to send a message from an unregistered sender name.
255Rejected by operatorThe operator rejected the message without specifying the exact error code.
This happens, for example, when the number does not belong to any mobile operator, i.e. with a non-existent code, or for some other reason, the operator cannot deliver the message.

Possible error codes in the status of e-mail messages (values of <err>):

CodeNameDescription
0No errorThe recipient exists and is available.
1Recipient does not existThe specified e-mail address does not exist.
2Crowded InboxThe recipient's mail server rejected the message with the specified error code.
3Recipient server was not foundThe domain specified as the mail server was not found.
4Mailbox is lockedAn error returned from the recipient's mail server stating that the message could not be delivered due to the mailbox being blocked.
239Forbidden ip addressOccurs when trying to send a message from an ip address that is not included in the list of ip addresses allowed by the Client to send. It can also occur when you try to send a message from an ip address that was not previously used for sending messages and logging in to your personal account.
245Status is not receivedDuring the day, the delivery status was not received from the recipient's mail server, in this case it is impossible to say for sure whether the message was delivered or not.
248No routeMeans that sending messages to this e-mail address is not available in our service. For example, there is no working e-mail gateway for the specified address and text.
249Invalid format'Occurs when the recipient's e-mail address is entered incorrectly in the format.
252E-mail address is prohibitedOccurs, for example, when the specified e-mail address is found in the blacklist.
253Prohibited spam filterIf the text of the message contains obscene expressions and insults, calls to send sms or e-mail and some other prohibited texts, then sending the message will be blocked. It is also prohibited to indicate as the sender the e-mail address of the recipient of the message, the addresses of other people's Internet resources, companies and government organizations.
254Unregistered senderThis error occurs when trying to send a message from an unregistered e-mail address of the sender.
255Rejected by the recipient serverThe recipient's mail server rejected the message without specifying the exact error code.
This happens, for example, when an internal server error occurs when it cannot process a message.

Deleting a message

To delete a message, use the GET or POST method to call the status request script, specifying the del command: https://smscentre.com/sys/status.php?del=1&login=<login>&psw=<password>&phone=<phone>&id=<sms_id>
The description of the parameters passed to the Server and the errors returned by it is similar to the one given for the status request function.

If the request is successful, the Server returns a response in the form of a string:
  • when fmt = 0,1: OK

  • when fmt = 2:
    <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }

Messages must be deleted before being transferred to the archive database.

Checking the balance status

Balance Request

To request a balance, use the address: https://smscentre.com/sys/balance.php?login=<login>&psw=<password>
The following parameters are passed to the server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
curFlag indicating whether the Client's currency name should be added to the server response.
fmtServer response format:
0 or 1 Ц (default) as a string (250.80).
2 Ц in xml format.
3 Ц in json format.

Server response and error codes

If an error occurs, the Server returns the following string:
  • When fmt = 0:
    ERROR = N (description)

  • When fmt = 1:
    0,-N

  • When fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • When fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
4The IP address is temporarily blocked.
9Attempt to send more than ten balance requests within a minute.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is successful, the Server returns a response in the form of a string:

When cur = 0:
  • when fmt = 0 or 1: <balance>

  • when fmt = 2: <balance>balance</balance>

  • when fmt = 3:
    {
    "balance": "<balance>"
    }

With cur = 1 and a non-zero credit:
  • when fmt = 0: <balance> <currency>

  • when fmt = 1: <balance>,<currency>

  • When fmt = 2:
    <result>
    <balance>balance</balance>
    <credit>credit</credit>
    <currency>currency</currency>
    </result>

  • when fmt = 3:
    {
    "balance": "<balance>",
    "credit": "<credit>",
    "currency": "<currency>"
    }
Where:
<balance> Ц current balance status.
<credit> Ц current status of the established credit.
<currency> Ц customer's Currency.

The server does not accept more than ten balance requests per minute to reduce the load and protect against errors and loops in the Client-side program.

Actions with contacts and groups

To manage contacts or groups, use the GET or POST method to call the appropriate address with the required command and parameters..

To create a contact: https://smscentre.com/sys/phones.php?add=1&login=<login>&psw=<password>&phone=<phone>&name=<name>
To create a new group: https://smscentre.com/sys/phones.php?add_group=1&login=<login>&psw=<password>&name=<name>
To change the phone number in a contact: https://smscentre.com/sys/phones.php?chg=1&login=<login>&psw=<password>&phone=<phone>&new_phone=<new_phone>
To change the group name: https://smscentre.com/sys/phones.php?chg_group=1&login=<login>&psw=<password>&grp=<group_id>&name=<name>
To transfer a contact to a new group: https://smscentre.com/sys/phones.php?move_group=1&login=<login>&psw=<password>&grp=<group_id>&phone=<phone>
To add a new group to a contact: https://smscentre.com/sys/phones.php?move_group=2&login=<login>&psw=<password>&grp=<group_id>&phone=<phone>
To remove a contact from a group: https://smscentre.com/sys/phones.php?move_group=3&login=<login>&psw=<password>&grp=<group_id>&phone=<phone>
To delete a contact: https://smscentre.com/sys/phones.php?del=1&login=<login>&psw=<password>&phone=<phone>
To delete a group: https://smscentre.com/sys/phones.php?del_group=1&login=<login>&psw=<password>&grp=<group_id>
To display a list of contacts: https://smscentre.com/sys/phones.php?get=1&login=<login>&psw=<password>
To display a list of groups: https://smscentre.com/sys/phones.php?get_group=1&login=<login>&psw=<password>
To add an entry to the blacklist: https://smscentre.com/sys/phones.php?add_black=1&login=<login>&psw=<password>&phone=<phone>
To remove an entry from the blacklist: https://smscentre.com/sys/phones.php?del_black=1&login=<login>&psw=<password>&phone=<phone>
To get the elements of the "black" list: https://smscentre.com/sys/phones.php?get_black=1&login=<login>&psw=<password>

Description of parameters

Description of the parameters passed to the Server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
nameContact or group name.
grpID of the group that the contact belongs to. You can link a contact to several groups at once by specifying their IDs separated by commas.
numThe number of the group for sending messages.
phoneList of phone numbers separated by any separator (add command), or phone number (the move_group , add_black commands). Used for operations with phone numbers in the phones.php script.
mailA list of e-mail addresses separated by any separator (the add command), or an e-mail address (the move_group , add_black commands). Used for operations with e-mail addresses in the mails.php script. The request format is similar to the format for phones.php.
new_phoneA new list of phone numbers through any separator (CHG Command).
new_mailNew list of e-mail addresses separated by any separator (CHG Command).
lnmSurname.
fnmID.
mnmMiddle name.
fioContact's FULL NAME. This parameter is used in the get command to get a list of contacts by any of the initials (last name, first name, and / or patronymic).
searchSelecting contacts for the get command by contact name and / or phone number.
after_idContact ID (int_id), starting from which to return the contact list (get command, fmt=3 format), except for the contact list itself. after_id.
bdDate of birth in the format DD.mm.yyyy.
myidID contact designated by Client.
cmtCommentary.
tagsTags (label).
phoOther phone numbers. According to these numbers, SMS messages are not sent out.
typeLock type (add_black commands):
0 Ц all messages.
1 Ц mass mailing lists.
2 Ц single messages.
Or group type (add_group and get_group commands):
0 Ц group for phone numbers.
1 Ц group for e-mail addresses.
prev_idThe global identifier of the blacklist item (the id parameter in the Server response), assigned by the Server automatically. Used in the get_black command to request blacklist items added earlier to this item.
cntThe number of records returned in the Server response. The maximum value is 1000.
fmtServer response format:
0 Ц (default) as a string (ID = 12345).
1 Ц as a string (12345).
2 Ц in xml format.
3 Ц in json format.

Server response and error codes

If an error occurs, the Server returns the following string:
  • ERROR = N (description)

  • When fmt = 1:
    0,-N

  • When fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • When fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
3No records found.
4The IP address is temporarily blocked.
5Operation execution error.
9Attempt to send more than three identical requests for operations with groups, contacts, or blacklist entries within a minute.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is successful, the Server returns a response in the form of a string.

When creating a contact, contact group, or blacklist entry:
  • when fmt = 0: ID = <id>

  • when fmt = 1: <id>

  • when fmt = 2 (creating a contact, blacklisting entry):
    <phone>
    <id>id</id>
    </phone>

  • when fmt = 2 (the creation of a group):
    <group>
    <id>id</id>
    </group>

  • when fmt = 3:
    {
    "id": <id>
    }

Where <id><id> is the ID of the contact, group, or blacklist entry assigned by the Server automatically.

When changing or deleting a contact (group), deleting a black list entry:
  • when fmt = 0,1: OK

  • when fmt = 2: <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }


When requesting a contact list:
  • when fmt = 0:
    phone = <phone>, name = <name>, group = <group>, first_name = <first_name>, last_name = <last_name>, middle_name = <middle_name>, birthday = <birthday>, id = <id>, comments = <comments>, tags = <tags>, phone_other = <phone_other>
    ...

  • when fmt = 1:
    <phone>,<name>,<group>,<first_name>,<last_name>,<middle_name>,<birthday>,<id>,<comments>,<tags>,<phone_other>
    ...

  • when fmt = 2:
    <list>
    <contact>
    <phone>phone</phone>
    <name>name</name>
    <group>group</group>
    <first_name>first_name</first_name>
    <last_name>last_name</last_name>
    <middle_name>middle_name</middle_name>
    <birthday>birthday</birthday>
    <id>id</id>
    <comments>comments</comments>
    <tags>tags</tags>
    <phone_other>phone_other</phone_other>
    </contact>
    ...
    </list>

  • when fmt = 3:
    [{
    "phone": "<phone>",
    "name": "<name>",
    "group": <group>,
    "first_name": "<first_name>",
    "last_name": "<last_name>",
    "middle_name": "<middle_name>",
    "birthday": "<birthday>",
    "id": "<id>",
    "comments": "<comments>",
    "tags": "<tags>",
    "phone_other": "<phone_other>"
    },
    ...]

Where:
<phone> Ц a list of phone numbers separated by any separator. For e-mail addresses, it is replaced with <mail>.
<name> Ц contact name.
<group> Ц iD of the group that the contact belongs to.
<first_name> Ц ID.
<last_name> Ц surname.
<middle_name> Ц middle name.
<birthday> Ц date of birth in the format DD.mm.yyyy.
<id> Ц contact Id assigned by the Client.
<comments> Ц commentary.
<tags> Ц tags (label).
<phone_other><phone_other> Ц other phone numbers. According to these numbers, messages are not sent out. For e-mail addresses are replaced with <mail_other>.

When requesting a list of groups:
  • when fmt = 0:
    id = <id>, name = <name>, number = <number>, cnt = <cnt>
    ...

  • when fmt = 1:
    <id>,<name>,<number>,<cnt>
    ...

  • when fmt = 2:
    <list>
    <group>
    <id>id</id>
    <name>name</name>
    <number>number</number>
    <cnt>number</cnt>
    </group>
    ...
    </list>

  • when fmt = 3:
    [{
    "id": <id>,
    "name": "<name>",
    "number": <number>,
    "cnt": "<cnt>"
    },
    ...]

Where:
<id> Ц group ID assigned by the Server when creating the group.
<name> Ц the name of the group.
<number> Ц group number for mailing lists.
<cnt> Ц number of contacts in the group.

When requesting elements of the "black" list:
  • when fmt = 0:
    id = <id>, phone = <phone>, type = <type>, comment = <comment>
    ...

  • when fmt = 1:
    <id>,<phone>,<type>,<comment>
    ...

  • when fmt = 2:
    <list>
    <record>
    <id>id</id>
    <phone>phone</phone>
    <type>type</type>
    <comment>comment</comment>
    </record>
    ...
    </list>

  • when fmt = 3:
    [{
    "id": <id>,
    "phone": "<phone>",
    "type": <type>,
    "comment": "<comment>"
    },
    ...]

Where:
<id> Ц iD of the element assigned by the Server when creating.
<phone> Ц phone number (or <email><email> when requesting an e-mail blacklist).
<type> Ц blocking type: 0 Ц all messages, 1 - mass mailings, 2 - single messages.
<comment> Ц commentary.

Examples of operations with contacts

Examples:

Creating a contact named "Contact" that belongs to a group with ID = 321:

https://smscentre.com/sys/phones.php?add=1&login=alex&psw=123&phone=79999999999&name=Contact&grp=321
Creating a group named " Group":

https://smscentre.com/sys/phones.php?add_group=1&login=alex&psw=123&name=Group
Changing the name of the contact with the phone number "79999999999" to the new name " Contact1":

https://smscentre.com/sys/phones.php?chg=1&login=alex&psw=123&phone=79999999999&name=Contact1
Changing the group name from ID = 321 to the new name " Group1":

https://smscentre.com/sys/phones.php?chg_group=1&login=alex&psw=123&grp=321&name=Group1
Deleting a contact with the phone number " 79999999999":

https://smscentre.com/sys/phones.php?del=1&login=alex&psw=123&phone=79999999999
Deleting a group with ID = 321:

https://smscentre.com/sys/phones.php?del_group=1&login=alex&psw=123&grp=321
Getting a list of contacts belonging to a group with ID = 321:

https://smscentre.com/sys/phones.php?get=1&login=alex&psw=123&grp=321
Getting contact data with the phone number " 79999999999":

https://smscentre.com/sys/phones.php?get=1&login=alex&psw=123&phone=79999999999
Getting a list of all groups:

https://smscentre.com/sys/phones.php?get_group=1&login=alex&psw=123
Adding the phone "79999999999" to the "black" list with blocking only mass mailings:

https://smscentre.com/sys/phones.php?add_black=1&login=alex&psw=123&phone=79999999999&type=1
Removing the phone "79999999999" from the "black" list:

https://smscentre.com/sys/phones.php?del_black=1&login=alex&psw=123&phone=79999999999

The server does not accept more than three identical requests per minute for operations with groups, contacts, or blacklisted entries to reduce the load and protect against errors and loops in the Client-side program.

The list of available operations

To create or modify a subclient, you need to call method GET or POST an address indicating the required command and parameters.

Create a subclient: https://smscentre.com/sys/users.php?add=1&login=<login>&psw=<password>&user=<user>&password=<password2>
Change the settings of the subclient: https://smscentre.com/sys/users.php?chg=1&login=<login>&psw=<password>&user=<user>&fio=<fio>
The change in the balance subclient: https://smscentre.com/sys/users.php?pay=1&login=<login>&psw=<password>&user=<user>&sum=<sum>
Obtaining statistics on sub-clients c independent balance: https://smscentre.com/sys/users.php?get_stat=1&login=<login>&psw=<password>&start=<date1>&end=<date2>&reseller=1
Obtaining statistics on one subclient: https://smscentre.com/sys/users.php?get_stat=1&login=<login>&psw=<password>&start=<date1>&end=<date2>&user=<sub_login>
or: https://smscentre.com/sys/users.php?get_stat=1&login=<login>&psw=<password>&start=<date1>&end=<date2>&user_id=<id>
Get detailed statistics on the subclient with independent balance: https://smscentre.com/sys/users.php?get_stat_all=1&login=<login>&psw=<password>&start=<date1>&end=<date2>&reseller=1

Description of parameters

Description of the parameters passed to the Server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
userLogin subclient.
pswcCurrent password subclient.
passwordThe new password of the sub-client. The length must be at least 8 characters, and 3 of the conditions must be met: letters, numbers, different case, symbols.
sumThe amount transferred to the client from the main account in the currency of the main account.
balance2Flag that sets the possibility of using the electronic balance for deposits, debits, and receiving statistics on messages.
site_idThe site ID that will own the created subclient.
new_loginNew login subclient when you change.
typeAccount Type.
0 (default) - independent tariff and balance.
1 Ц main account tariff, independent balance.
2 Ц tariff and balance of the main account.
3 Ц main account balance, independent pricing plan.
4 Ц additional login of the main account.
emailPrimary Email Address.
fl[9]Flag that sets the ability to forward incoming SMS messages to e-mail.
email2Alternative email address for forwarding incoming SMS messages.
phoneMain phone number.
fl[8]Flag that sets the ability to forward incoming SMS messages to the phone.
phone2Alternative phone number for forwarding incoming SMS messages.
startThe start date in the period for which statistics are requested. Format: 'dd. mm. yyyy'.
endThe end date in the period. If omitted, data from the start date is returned. Format: 'dd. mm. yyyy'.
user_idThe ID of the subclient that is assigned automatically by the server when creating.
resellerTypes of subclient.
0 or missing Ц sub-clients using the balance of the main account.
1 Ц the subclient with independent balance.
hide_deletedTo hide the statistics on the remote subclient.
0 or missing Ц output statistics for all sub-clients.
1 Ц to hide the statistics on the remote subclient.
mycurFlag that allows you to display statistics in the currency of the main account.
fioInitials (last name, first name, patronymic) or company name.
propsThe company details subclient.
cntrContract.
tariffThe current tariff plan. The subclient, you can set data plan is higher tariff plan of the Client. The parameter can take the following values:
0 (default) - 1 tariff (from 1 p.).
1 Ц 2 tariff (from 1000 to p.).
...
8 Ц 9 tariff (from 100000 to p.).
mintrfThe minimum fare. Determines the minimum value of the rate subclient regardless of the amount of the payment.
currThe currency of the sub-client's calculations. Used in the add and chg commands. It can take the following basic values:
1 Ц russian rouble;
2 Ц uS dollar (USD);
3 Ц euro;
4 Ц ukraine hryvnia;
5 Ц kazakhstan tenge.
tzTime zone. By default, the Client's time zone is set. Possible values:
0 Ц GMT-12.
...
12 Ц GMT+00
...
24 Ц GMT+12.
senderDefault Sender name (Sender ID) .
sender2Sender's Backup name.
fl[29]Flag indicating whether the Client's sender list can be used (main Account).
fl2[9]Flag that allows the use of more expensive routes for guaranteed message delivery.
fl2[24]Flag that allows you to send first through cheap routes, and repeat through expensive ones if not delivered (except for mass messaging).
fl2[12]This flag prohibits sending messages with automatic replacement of the sender's name.
fl2[13] This flag disables adding the sender's name to the message text without increasing the cost in the case of autocorrect.
nbBalance for notifications. Upon reaching the specified amount will be sent a notification e-mail subclient.
ktmThis parameter sets the number of days for storing sent messages, after which SMS messages will be automatically deleted from the history.
fmtsList of phone codes that you can send messages to.
notesComments the main account. Not available for the subclient.
fl2[23]Prohibition of mass and advertising mailings.
fl[26]Permission to use the main account's contact list.
fl2[8]Flag that sets the advanced mode of the personal account.
fl[16]Enable automatic answering machine recognition for calls.
fl2[31]Allow the use of master account templates.
Additional parameters for configuring access to the service
fl3[20]Flag that allows you to disable confirmation of access from new IP addresses when logging in.
phComma-separated list of phone numbers or group numbers for sending SMS messages.
fl[27]Prevent changes to the settings of the subclient.
fl[28]Prohibit subaccount payments.
fl[6]Prohibit mailing lists.
fl2[1]To hide messages for subclient.
fl2[10]Block a subaccount.
Additional parameters for limits and restrictions
dlimTotal SMS limit per day. Defines the maximum number of messages sent per day.
plimLimit on one number. Sets the maximum number of messages sent per day per phone number.
tlimLimit on the number and text. Sets the maximum number of messages sent per day with one text per phone number.
ilimLimit from one IP address. Sets the maximum number of messages sent per day from a single IP address.
tmlimThe time range in hours h1-h2 in which messages are allowed to be sent. If the current time is less than h1, the SMS message will be sent to the subscriber when the time h1 occurs, if the current time falls in the interval from h1 to h2, the message will be sent immediately, in the other case, the message will be sent the next day when the time h1 is reached. This function, for example, is useful in order to prevent subscribers from receiving SMS messages at night.
fl2[15]Prevent sending at a time other than the one specified in the tmlim parameter, instead of rescheduling to the next day.
fl2[16]When using the tmlim parameter, consider the subscribers ' time zone.
vldThe maximum delivery time of messages to temporarily unavailable subscribers (min.).
Additional parameters for autoresponders
answAuto-reply to incoming SMS messages.
answ_callAuto-reply to incoming calls.
fl2[4]Disable call forwarding (to e-mail, phone and processor).
Additional parameters for API settings
urlhttp address (URL) of the script to handle delivery status of SMS messages and (or) incoming SMS messages on the side of the subclient. The specified script will be invoked by the Server after each receiving a delivery status of a previously submitted a subclient SMS messages and (or) of receiving an incoming SMS message from the subscriber.
fl[10]Enabling forwarding of message statuses to the http address specified in the url parameter.
fl[11]Enabling forwarding of incoming SMS messages to the http address set in the url parameter.
fl[2]Enable SMPP access (you must first register an IP address via ONLINE support).
fl[1]Transfer incoming SMSes via SMPP connection.
fl[23]Track the status of certain SMS parts.
fl2[27]Test mode (virtual sending without payment).
fl[5]Enable control over the delivery of messages.
fl[30]Enabling the API log. Allows you to view the 20 of recent http requests. Stored 10 minutes after the last request.
Additional parameters for E-mail2sms
mfl[0]Flag that allows you to disable the e-mail2sms function.
mphComma-separated list of phone numbers to send messages to.
mfl[5]Enables the ability to specify a list of phone numbers in the message body.
mfl[6]Enables the ability to specify a list of phone numbers in the email address.
mfl[1]Forwarding an email without a subject.
mfl[2]Forwarding a message without text.
mfl[3]Forwarding a message without a return address (from whom).
mfl[4]Translating the text of the letter into transliteration.
mh1The initial value of the time range for sending incoming emails. Together with the mh2 parameter, it defines the range within which incoming messages can be forwarded as SMS messages..
mh2The final value of the time range for sending incoming emails.
mlenMaximum message length to which an incoming message is truncated when sent as an SMS message (a number greater than 12 specifies the maximum length of a message,a number less than 12 - the number of SMSes).

Server response and error codes

If an error occurs, the Server returns the following string:
  • ERROR = N (description)

  • When fmt = 1:
    0,-N

  • When fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • When fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
3No records found.
4The IP address is temporarily blocked.
5Operation execution error.
6The subclient with the specified login does not exist.
7A sublogin that shares a balance with the main account is specified, or the balance2=1 parameter is not specified in the request for an operation with an electronic balance.
8Error when saving a record.
9Attempt to send more than three requests to add a subclient or change something in that subclient within minutes.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).
10Insufficient funds for crediting.

If the request is successful, the Server returns a response in the form of a string.

When you create a subclient:
  • when fmt = 0: ID = <id>

  • when fmt = 1: <id>

  • when fmt = 2:
    <user
    <id>id</id>
    </user>

  • when fmt = 3:
    {
    "id": <id>
    }

Where <id><id> is the sub-client ID assigned by the Server automatically.

When changing the sublogin:
  • when fmt = 0,1: OK

  • when fmt = 2:
    <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }


When requesting statistics:
  • with fmt = 0 and get_stat = 1:
    login = <login>, sms = <cnt>, credit = <credit>, debit = <debit>, currency = <currency>
    ...

  • with fmt = 0 and get_stat_all = 1:
    login = <login>, description = <description>, operator = <operator>, mccmnc = <mccmnc>, sms = <cnt>, credit = <credit>, debit = <debit>, currency = <currency>
    ...

  • with fmt = 1 and get_stat = 1:
    <login>,<cnt>,<credit>,<debit>,<currency>
    ...

  • with fmt = 1 and get_stat_all = 1:
    <login>,<description>,<operator>,<mccmnc>,<cnt>,<credit>,<debit>,<currency>
    ...

  • with fmt = 2 and get_stat = 1:
    <list>
    <stat>
    <login>login</login>
    <sms>cnt</sms>
    <credit>credit</credit>
    <debit>debit</debit>
    <currency>currency</currency>
    </stat>
    ...
    </list>

  • with fmt = 2 and get_stat_all = 1:
    <list>
    <user login="login">
    <item>
    <description>description</description>
    <operator>operator</operator>
    <mccmnc>mccmnc</mccmnc>
    <sms>cnt</sms>
    <credit>credit</credit>
    <debit>debit</debit>
    <currency>currency</currency>
    </item>
    ...
    </user>
    ...
    </list>

  • with fmt = 3 and get_stat = 1:
    [{
    "login": "<login>",
    "sms": "<cnt>",
    "credit": "<credit>",
    "debit": "<debit>",
    "currency": "<currency>"
    },
    ...]

  • with fmt = 3 and get_stat_all = 1:
    [{
    "login": "<login>",
    "items": [{
    "description": "<description>",
    "operator": "<operator>",
    "mccmnc": "<mccmnc>",
    "sms": "<cnt>",
    "credit": "<credit>",
    "debit": "<debit>",
    "currency": "<currency>"
    },
    ...]
    },
    ...]

Where:
<login> - login subclient.
<description> - operation name.
<operator> - operator name.
<mccmnc><mccmnc> - numeric code of the subscriber's country plus numeric code of the subscriber's operator
<cnt><cnt> - number of messages.
<credit> - debit.
<debit> - credit.
<currency> - the three-character currency code subclient.

Examples of actions with the subclient

Examples:

Create a subclient with login "mylogin", password "mypassword", phone number 79999999999 and permission to use sender (Sender ID) of the main account:

https://smscentre.com/sys/users.php?add=1&login=alex&psw=123&user=mylogin&password=mypassword&phone=79999999999&fl[29]=1
Change subclient with login "mylogin" to "mylogin2" type of customer "Tariff and the balance of the main account" and install codes allowed to send SMS only in Russia:

https://smscentre.com/sys/users.php?chg=1&login=alex&psw=123&user=mylogin&password=mypassword&new_login=mylogin2&type=2&fmts=7,-77
Getting statistics on sub-clients who have a shared balance with the main account and SMS sent from the electronic balance:

https://smscentre.com/sys/users.php?get_stat=1&login=alex&psw=123&balance2=1
Obtaining statistics on the subclient with the username "sub_alex":

https://smscentre.com/sys/users.php?get_stat=1&login=alex&psw=123&user=sub_alex
Obtaining statistics on the independent subclient in the currency of the main account with "01.01.2014" "01.02.2014":

https://smscentre.com/sys/users.php?get_stat=1&login=alex&psw=123&mycur=1&start=01.01.2014&end=01.02.2014

The server does not accept more than three requests within a minute to add a subclient or change the same subclient to reduce the load and protect against bugs and loops in the program on the Client side.

Creating and uploading invoices and reports

To create a new account for a subclient, you need to call method GET or POST address: https://smscentre.com/sys/documents.php?add_account=1&login=<login>&psw=<password>&user=<user>&sum=<sum> or: https://smscentre.com/sys/documents.php?add_account=1&login=<login>&psw=<password>&user_id=<user_id>&sum=<sum>
To upload an existing account subclient, you need to call method GET or POST address: https://smscentre.com/sys/documents.php?get_account=1&login=<login>&psw=<password>&user=<user>&id=<id> or: https://smscentre.com/sys/documents.php?get_account=1&login=<login>&psw=<password>&user_id=<user_id>&id=<id>
To upload an existing sub-client report, call the GET or POST address method: https://smscentre.com/sys/documents.php?get_act=1&login=<login>&psw=<password>&user=<user>&id=<id> https://smscentre.com/sys/documents.php?get_act=1&login=<login>&psw=<password>&user_id=<user_id>&id=<id> or: https://smscentre.com/sys/documents.php?get_act=1&login=<login>&psw=<password>&user=<user>&num=<num> https://smscentre.com/sys/documents.php?get_act=1&login=<login>&psw=<password>&user_id=<user_id>&num=<num>
The following parameters are passed to the server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
userThe username of the sub-client to create or upload an invoice for. You can use the user_id parameter instead of this parameter.
user_idID of the sub-client to create or upload an invoice for. You can use the user parameter instead of this parameter.
sumThe amount to create an account for in the Client's currency.
serviceName of the service specified when creating the invoice.
idID of the requested invoice or act.
numNumber of the requested act.

If an error occurs, the Server returns the following string:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
4The IP address is temporarily blocked.
5Error creating an invoice.
6Sublogin not found.
7The specified document was not found.
9Attempt to send more than one request to create or receive an invoice or report within a minute.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

In case of a successful request to create an invoice, the Server returns a multipart structure that includes 2 parts with the corresponding headers. The first part contains the Server response in json format, containing the ID and amount of the created invoice, the second part includes a file with the invoice in pdf format.

If the invoice request is successful, the Server returns the invoice file in pdf format..

In case of a successful request to receive the act, the Server returns a file with the act in pdf format.

The server does not accept more than one request to create or change an invoice or act within a minute to reduce the load and protect against errors and loops in the Client-side program.

List of available operations with sender names

To manage the names of senders, you must call the appropriate address using the GET or POST method, specifying the required command and parameters.

To get a list of senders ' names registered in your personal account and approved by the moderator: https://smscentre.com/sys/senders.php?get=1&login=<login>&psw=<password>
To add a new sender name: https://smscentre.com/sys/senders.php?add=1&login=<login>&psw=<password>&sender=<sender>&cmt=<cmt>
To change the sender's name: https://smscentre.com/sys/senders.php?chg=1&login=<login>&psw=<password>&sender=<sender>&cmt=<cmt> or https://smscentre.com/sys/senders.php?chg=1&login=<login>&psw=<password>&id=<id>&cmt=<cmt>
Sending a confirmation code for the sender's digital name: https://smscentre.com/sys/senders.php?send_code=1&login=<login>&psw=<password>&sender=<sender>
Confirmation of the sender's digital name: https://smscentre.com/sys/senders.php?check_code=1&login=<login>&psw=<password>&sender=<sender>&code=<code>
To delete the sender's name: https://smscentre.com/sys/senders.php?del=1&login=<login>&psw=<password>&sender=<sender> or https://smscentre.com/sys/senders.php?del=1&login=<login>&psw=<password>&id=<id>
When you add or change the sender's name in the request body, you can send a document file for operators (trademark certificate, domain certificate) in jpg, tif, pdf, png, zip, rar format. The document comment can be specified in the additional doc_info parameter.

Description of parameters

Description of the parameters passed to the Server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
all0 (default) - get a list of activated sender names.
1 Ц get a complete list of sender names.
senderThe sender name that is being created or deleted.
mts_step1 Ц register a paid name with the MTS operator.
tele21 Ц register a name with the Tele2 operator at the tariff with free names.
mega_step1 Ц register a paid name with the Megafon operator.
bee_step1 Ц register a paid name with the Beeline operator.
motiv_step1 Ц register a paid name with the MOTIV operator.
tele2_step1 Ц register a paid name with a Tele2 operator.
mega_int1 Ц enable replacement with a common name for the Megafon operator.
motiv_int1 Ц enable replacement with a common name for the Motive operator.
mts_int1 Ц enable replacement with a common name for the MTS operator.
ua_reg1 Ц to register a name for Ukraine at a reduced rate of national traffic.
For this tariff, you must additionally pass the following parameters:
fio Ц legal name of the organization (LLC/SPD).
inn Ц EDRPOU/INN.
site Ц Site address (optional parameter).
email Ц E-mail for communication.
address Ц Actual address.
desc Ц Description of the services provided by the sender.
subj Ц Subject (purpose of informing).
ua_int1 Ц register a name for Ukraine at a higher rate for international traffic.
idID of the sender's name, assigned by the Server automatically when creating a new name.
cmtComment specified when creating the sender name.
mail1 Ц add the sender's e-mail address.
nameComment associated with the mail parameter (usually the name of the owner of the e-mail address).
codeCode for confirming the sender's digital name.
siteThe address of the site from which the codes will be sent to confirm the digital names of the senders. This parameter must have been previously added and activated as Sender ID. If omitted, messages will be sent as the sender by default.
site_nameThe site address specified in the text of the message with the confirmation code.
userThe user ID of the subclient to which you apply the specified command.
operators1 Ц add the status code of the sender's name from the operator to the response.
from_dateSelect the names of senders starting from the specified date, for which the name status of any of the operators has been changed. When this parameter is specified, the names are sorted in descending order of the date when the name statuses were changed. DD.MM.YYYY format.
prev_idA unique identifier of the sender's name that is assigned by the Server automatically when the name is created. Used to request a list of names created before the name with the specified ID.
cntThe number of sender names returned when requesting a list of names. The maximum value is 15000.
doc_infoIf a document file for operators is passed in the request body when creating or changing the sender's name, then you can specify a description for the passed file in this parameter.
charsetEncoding of transmitted parameters.

Server response and error codes

If an error occurs, the Server returns the following string:
  • ERROR = N (description)

  • When fmt = 1:
    0,-N

  • When fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • When fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
3Sender name not found.
4The IP address is temporarily blocked.
5Error saving or deleting the sender's name.
7Invalid number format.
8The confirmation code cannot be delivered to the specified number.
9Attempt to send more than three identical requests to get a list of available sender names or five requests to create a new sender name within a minute.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).
10The code has already been sent to the specified number. Retry is possible after 8 hours.
11Invalid confirmation code.

If the request is successful, the Server returns a response in the form of a string.

When requesting a list of sender names:
  • when fmt = 0 and all = 0:
    name = <sender>, id = <id>
    ...

  • when fmt = 1 and all = 0:
    <sender>,<id>
    ...

  • when fmt = 2 and all = 0:
    <list>
    <sender id="<id>">sender</sender>
    ...
    </list>

  • when fmt = 3 and all = 0:
    [{
    "sender": "<sender>",
    "id": <id>
    },
    ...]

  • when fmt = 0 and all = 1:
    name = <sender>, status = <status>, id = <id>
    ...

  • when fmt = 1 and all = 1:
    <sender>,<status>,<id>
    ...

  • when fmt = 2 and all = 1:
    <list>
    <sender status="<status>" id="<id>">sender</sender>
    ...
    </list>

  • when fmt = 3 and all = 1:
    [{
    "sender": "<sender>",
    "status": <status>,
    "id": <id>
    },
    ...]

  • with fmt = 0 and operators = 1:
    name = <sender>, mega_step = <mega_step_status>, bee_step = <bee_step_status>, motiv_step = <motiv_step_status>, mts_step = <mts_step_status>, tele2_step = <tele2_step_status>, tele2 = <tele2_status>, ua_reg = <ua_reg_status>, ua_int = <ua_int_status>, mega_int = <mega_int_status>, motiv_int = <motiv_int_status>, mts_int = <mts_int_status>, id = <id>
    ...

  • with fmt = 2 and operators = 1:
    <list>
    <sender mega_step="<mega_step_status>" mega_int="<mega_int_status>" bee_step="<bee_step_status>" motiv_step="<motiv_step_status>" motiv_int="<motiv_int_status>" mts_step="<mts_step_status>" mts_int="<mts_int_status>" tele2_step="<tele2_step_status>" tele2="<tele2_status>" ua_reg="<ua_reg_status>" ua_int="<ua_int_status>" id="<id>">sender</sender>
    ...
    </list>

  • with fmt = 3 and operators = 1:
    [{
    "sender": "<sender>",
    "mega_step": "<mega_step_status>",
    "mega_int": "<mega_int_status>",
    "bee_step": "<bee_step_status>",
    "motiv_step": "<motiv_step_status>",
    "motiv_int": "<motiv_int_status>",
    "mts_step": "<mts_step_status>",
    "mts_int": "<mts_int_status>",
    "tele2_step": "<tele2_step_status>",
    "tele2": "<tele2_status>",
    "ua_reg": "<ua_reg_status>",
    "ua_int": "<ua_int_status>",
    "id": "<id>"
    },
    ...]

Where:
<sender> Ц registered and approved sender name.
<mega_status>(up to 01.01.2022), <mts_status>(up to 01.12.2017), <mega_step_status>, <mega_int_status>, <bee_step_status>, <motiv_step_status>, <motiv_int_status>, <mts_step_status>, <mts_int_status>, <tele2_step_status>, <tele2_status>, <ua_reg_status>, <ua_int_status> status code name of the sender have corresponding (0 - awaiting registration, 1 - sent for registration, 2 - tolerated by the operator, 3 - it is not accepted by the operator, 4 - temporarily disabled 5 - insufficient funds in the account, 6 - take another name (conflict), 8 - required documents).
<status> Ц sender Name status (0-waiting for moderation, 1-allowed to use, 2-disabled).
<id> Ц unique identifier of the sender's name (assigned by the Server automatically when creating a name).

If the sender's name has a replacement analog for any operator, then with operators = 1 and fmt = 0,2,3, this replacement will be additionally included in the server response.

When adding a new sender name:
  • when fmt = 0: ID = <id>

  • when fmt = 1: <id>

  • when fmt = 2:
    <sender>
    <id>id</id>
    </sender>

  • when fmt = 3:
    {
    "sender": <id>
    }

Where:
<id> Ц the sender name ID assigned by the Server automatically.

When changing the sender's name, sending the code, confirming and deleting the sender's name:
  • when fmt = 0, 1: OK

  • when fmt = 2:
    <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }


Examples of actions with sender names

Examples:

Getting a list of sender names:

https://smscentre.com/sys/senders.php?get=1&login=alex&psw=123
Adding a new sender name:

https://smscentre.com/sys/senders.php?add=1&login=alex&psw=123&sender=my_shop&cmt=test
Sending a confirmation code for the sender's digital name:

https://smscentre.com/sys/senders.php?send_code=1&login=alex&psw=123&sender=79999999999
Sending confirmation code to the digital sender name for subclient "subalex" on behalf of "mysite.ru":

https://smscentre.com/sys/senders.php?send_code=1&login=alex&psw=123&sender=79999999999&user=subalex&site=mysite.ru
Confirmation of the sender's digital name:

https://smscentre.com/sys/senders.php?check_code=1&login=alex&psw=123&sender=79999999999&code=338824
Deleting the sender's name:

https://smscentre.com/sys/senders.php?del=1&login=alex&psw=123&sender=my_shop

The server does not accept more than three identical requests within a minute to get a list of available sender names and five requests to create a new sender name to reduce the load and protect against errors and loops in the Client-side program.

Getting the history of sent messages

To get a list of sent SMS messages, you need to call the address using the GET or POST method: https://smscentre.com/sys/get.php?get_messages=1&login=<login>&psw=<password>
Description of the parameters passed to the Server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
startThe start date in the period for which the history is requested. Format: 'dd. mm. yyyy'. The maximum period for which it is possible to request the history of sent messages is six months.
endThe end date in the period. If omitted, data from the start date is returned. Format: 'dd. mm. yyyy'.
phoneThe number or comma-separated list of phone numbers for which you need to get the history of sent SMS messages.
emailE-mail address or a comma-separated list of addresses for which you need to get the history of sent e-mail messages.
formatFlag for requesting e-mail messages.
0 (default) - request SMS messages.
8 Ц request for e-mail messages.
cntThe number of messages returned in the response. The maximum value is 1000.
prev_idThe global message ID (the int_id parameter in the Server response) that is assigned by the Server automatically. Used to request a list of messages sent before the message with the specified ID.
fmtServer Response Format.
0 Ц (by default) as a string (more details can be found in the description below).
1 Ц return the response as parameters separated by commas.
2 Ц response in xml format.
3 Ц response in json format.

If an error occurs, the Server returns the following string:
  • ERROR = N (description)

  • When fmt = 1:
    0,-N

  • When fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • When fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
3Message not found.
4The IP address is temporarily blocked.
9Attempt to send more than three identical requests to get the history of outgoing messages within a minute or more than thirty requests within an hour.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is successful, the Server returns a response in the form of a string:
  • when fmt = 0:
    Status = <status>, check_time = <last_date>, err = <err>, send_date = <send_date>, phone = <phone>, mccmnc = <mccmnc>, country = <country>, operator = <operator>, region = <region>, cost = <cost>, sender_id = <sender>, status_name = <status_name>, message = <message>, type = <type>, ID = <id>, int_id = <int_id>, sms_cnt = <sms_cnt>, format = <format>, crc = <crc>
    ...

  • when fmt = 1:
    <status>,<last_timestamp>,<err>,<send_timestamp>,<phone>,<mccmnc>,<country>,<operator>,<region>,<cost>,<sender>,<status_name>, <message>,<type>,<id>,<int_id>,<sms_cnt>,<format>,<crc>
    ...

  • when fmt = 2:
    <list>
    <sms>
    <status>status</status>
    <last_date>last_date</last_date>
    <last_timestamp>last_timestamp</last_timestamp>
    <err>err</err>
    <send_date>send_date</send_date>
    <send_timestamp>send_timestamp</send_timestamp>
    <phone>phone</phone>
    <cost>cost</cost>
    <sender_id>sender</sender_id>
    <status_name>status_name</status_name>
    <message>message</message>
    <mccmnc>mccmnc</mccmnc>
    <country>country</country>
    <operator>operator</operator>
    <region>region</region>
    <type>type</type>
    <id>id</id>
    <int_id>int_id</int_id>
    <sms_cnt>sms_cnt</sms_cnt>
    <format>format</format>
    <crc>crc</crc>
    </sms>
    ...
    </list>

  • when fmt = 3:
    [{
    "status": <status>,
    "last_date": "<last_date>",
    "last_timestamp": <last_timestamp>,
    "err": <err>,
    "send_date": "<send_date>",
    "send_timestamp": <send_timestamp>,
    "phone": "<phone>",
    "cost": "<cost>",
    "sender_id": "<sender>",
    "status_name": "<status_name>",
    "message": "<message>",
    "mccmnc": "<mccmnc>",
    "country": "<country>",
    "operator": "<operator>",
    "region": "<region>",
    "type": <type>,
    "id": <id>,
    "int_id": "<int_id>",
    "sms_cnt": <sms_cnt>,
    "format": <format>,
    "crc": <crc>
    ...]

Where:
<status> Ц status Code (list)
<last_date> Ц the date of the last status change. Format DD.MM.YYYY hh: mm: ss.
<last_timestamp> Ц time stamp of the last status change.
<err> Ц error code if the message was not delivered.
<send_date> Ц date the message was sent (format DD.MM.YYYY hh: mm: ss).
<send_timestamp> Ц time stamp for sending the message.
<phone> Ц subscriber's phone number.
<country> Ц name of the country of registration of the subscriber number.
<operator> Ц the name of the operator of the subscriber.
<region> Ц region of registration of the subscriber number.
<type><type> - message type.
<cost> Ц message cost.
<sender> Ц sender ID.
<status_name> Ц status name.
<message> Ц the text of the message.
<mccmnc> Ц mobile country code and mobile operator code.
<id> Ц message ID.
<int_id> Ц global Message ID.
<sms_cnt> Ц number of parts per message.
<format> Ц message format.
<crc> Ц message checksum.

Examples:

Receiving the last ten outgoing SMS messages:

https://smscentre.com/sys/get.php?get_messages=1&login=alex&psw=123&cnt=10
Receiving the last outgoing SMS message sent to the number " 79999999999":

https://smscentre.com/sys/get.php?get_messages=1&login=alex&psw=123&phone=79999999999

The server does not accept more than three identical requests within a minute or thirty requests within an hour to get the history of outgoing messages to reduce the load and protect against errors and loops in the Client-side program.

Receiving incoming messages

To get a list of incoming messages, call the address using the GET or POST method: https://smscentre.com/sys/get.php?get_answers=1&login=<login>&psw=<password>
Description of the parameters passed to the Server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
cntThe number of messages returned in the response. The maximum value is 10000.
hourThe period in hours for which to request incoming messages. Maximum number of hours - 168 (7 days).
after_idID of the message from which to return incoming messages, with the exception of the message itself. after_id.
to_phoneThe phone number of the Client to which the incoming messages were received.

If an error occurs, the Server returns the following string:
  • ERROR = N (description)

  • When fmt = 1:
    0,-N

  • When fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • When fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
4The IP address is temporarily blocked.
9Attempt to send more than three identical requests to receive a list of incoming messages within a minute.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is successful, the Server returns a response in the form of a string:
  • when fmt = 0:
    id = <id>, received = <received>, phone = <phone>, message = <message>, to_phone = <to_phone>, sent = <sent>
    ...

  • when fmt = 1:
    <id>,<received>,<phone>,<to_phone>,<sent>,<message>
    ...

  • when fmt = 2:
    <sms_answers>
    <sms>
    <id>id</id>
    <received>received</received>
    <phone>phone</phone>
    <message>message</message>
    <to_phone>to_phone</to_phone>
    <sent>sent</sent>
    </sms>
    ...
    </sms_answers>

  • when fmt = 3:
    [{
    "id": <id>,
    "received": "<received>",
    "phone": "<phone>",
    "message": "<message>",
    "to_phone": "<to_phone>",
    "sent": "<sent>"
    },
    ...]

Where:
<id> Ц the ID of the incoming message that is assigned by the Server automatically.
<received> Ц the date when the message was received by the Server. Format DD.MM.YYYY hh: mm: ss.
<phone> Ц subscriber's phone number.
<message> Ц incoming message.
<to_phone> Ц recipient's phone number.
<sent> Ц the date the message was sent. Format DD.MM.YYYY hh: mm: ss.


Examples:

Getting a list of 10 first incoming messages for the current day:

https://smscentre.com/sys/get.php?get_answers=1&login=alex&psw=123&cnt=10
Getting a list of 15 first incoming messages in the last 48 hours:

https://smscentre.com/sys/get.php?get_answers=1&login=alex&psw=123&hour=48&cnt=15
Getting a list from 20 of the first incoming messages with IDs larger than id="1234567":

https://smscentre.com/sys/get.php?get_answers=1&login=alex&psw=123&after_id=1234567&cnt=20

The server does not accept more than three identical requests within a minute to receive a list of incoming messages to reduce the load and protect against errors and loops in the Client-side program.

Getting statistics

To get the statistics of sent messages, you need to call the address by the GET or POST method: https://smscentre.com/sys/get.php?get_stat=1&login=<login>&psw=<password>&start=<date1>&end=<date2>
Description of the parameters passed to the Server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
startThe start date in the period for which statistics are requested. Format: 'dd. mm. yyyy'.
endThe end date in the period. If omitted, data from the start date is returned. Format: 'dd. mm. yyyy'.
mycurFlag that allows you to display statistics in the current currency of the Client.
balance2Flag that allows you to get statistics on sent messages paid with an electronic balance.

If an error occurs, the Server returns the following string:
  • ERROR = N (description)

  • When fmt = 1:
    0,-N

  • When fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • When fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
4The IP address is temporarily blocked.
9Attempt to send more than three identical requests to receive a list of incoming messages within a minute.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is successful, the Server returns a response in the form of a string:
  • when fmt = 0:
    login = <login>, sms = <cnt>, credit = <credit>, debit = <debit>, currency = <currency>
    ...

  • when fmt = 1:
    <login>,<cnt>,<credit>,<debit>,<currency>
    ...

  • when fmt = 2:
    <list>
    <stat>
    <login>login</login>
    <sms>cnt</sms>
    <credit>credit</credit>
    <debit>debit</debit>
    <currency>currency</currency>
    </stat>
    ...
    </list>

  • when fmt = 3:
    [{
    "login": "<login>",
    "sms": "<cnt>",
    "credit": "<credit>",
    "debit": "<debit>",
    "currency": "<currency>"
    },
    ...]

Where:
<login> - customer Login.
<cnt> - number of messages.
<credit> - debit.
<debit> - credit.
<currency> - three-character currency code.

Examples:

Getting statistics in the Client's current currency from " 01.01.2014 " to "01.02.2014" on a non-cash balance:

https://smscentre.com/sys/get.php?get_stat=1&login=alex&psw=123&mycur=1&start=01.01.2014&end=01.02.2014

The server does not accept more than three requests per minute to get statistics to reduce the load and protect against errors and loops in the Client-side program.

Request for rates

To get the list of tariffs for the specified Client, call the GET or POST address method: https://smscentre.com/sys/get.php?get_price=1&login=<login>&psw=<password>
Description of the parameters passed to the Server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).

If an error occurs, the Server returns the following string:
  • ERROR = N (description)

  • When fmt = 1:
    0,-N

  • When fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • When fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
4The IP address is temporarily blocked.
9Attempt to send more than three identical requests for a list of fares within a minute.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is successful, the Server returns the response as a set of strings:
  • when fmt = 0:
    zone = <zone>, name = <name>, api = <api>, mass = <mass>, mms = <mms>, hlr = <hlr>, call = <call>
    ...

    if there are set individual tariffs for certain operators, a set of lines is added to the response:
    mccmnc = <mccmnc>, cost = <cost>
    ...

    mail = <mail>

  • when fmt = 1:
    <zone>,<name>,<api>,<mass>,<mms>,<hlr>,<call>
    ...

    <mccmnc>,<cost>
    ...

    <mail>

  • when fmt = 2:
    <price>
    <zones>
    <zone name="<name>" api="<api>" mass="<mass>" mms="<mms>" hlr="<hlr>" call="<call>">zone</zone>
    ...
    </zones>
    <codes>
    <mccmnc cost="<cost>">mccmnc</mccmnc>
    ...
    </codes>
    <mail>mail</mail>
    </price>

  • when fmt = 3:
    {
    "zones": [{
    "zone": "<zone>",
    "name": "<name>",
    "api": "<api>",
    "mass": "<mass>",
    "mms": "<mms>",
    "hlr": "<hlr>",
    "call": "<call>"
    },
    ...
    {
    ...
    }],
    "codes": [{
    "mccmnc": "<mccmnc>",
    "cost": "<cost>"
    },
    ...
    {
    ...
    }],
    "mail": "<mail>"
    }

Where:
<zone> - tariff zone.
<name> - name of the tariff zone (operator, country, etc..).
<api> - the cost of SMS when sending via the API.
<mass> - the cost of SMS when sending via your personal account.
<mms> - the cost of an MMS message.
<hlr> - the cost of an HLR request.
<call> - the cost of a voice message (call).
<mccmnc> - the country code and the mobile operator for which the individual tariff is set.
<cost> - the cost of the message for this individual tariff.
<mail> - cost of an e-mail message.

Examples:

Getting a list of fares:

https://smscentre.com/sys/get.php?get_price=1&login=alex&psw=123

The server does not accept more than three identical requests within a minute to get a list of tariffs to reduce the load and protect against errors and loops in the Client-side program.

Getting information about the operator

To get information about the subscriber's operator, use the GET or POST method to call the address: https://smscentre.com/sys/info.php?get_operator=1&login=<login>&psw=<password>&phone=<phone>
Description of the parameters passed to the Server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
phoneThe subscriber's phone number or a comma-separated list of numbers.

If an error occurs, the Server returns the following string:
  • ERROR = N (description)

  • When fmt = 1:
    0,-N

  • When fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • When fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
3Operator not found.
4The IP address is temporarily blocked.
9Attempt to send more than three identical requests or any 100 requests to get information about the subscriber's operator within a minute.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is successful, the Server returns a response in the form of a string or a list of strings for multiple requests. (in this case, the answer is The "phone" parameter is added to the server"):

  • when fmt = 0: country = <country>, operator = <operator>, region = <region>, mcc = <mcc>, mnc = <mnc>, tz = <tz>

  • when fmt = 1: <country>,<operator>,<region>,<mcc>,<mnc>,<tz>

  • when fmt = 2:
    <info>
    <country>country</country>
    <operator>operator</operator>
    <region>region</region>
    <mcc>mcc</mcc>
    <mnc>mnc</mnc>
    <tz>tz</tz>
    </info>

    For multiple requests, the <info><info> constructs are enclosed in the <list>tag.

  • when fmt = 3:
    {
    "country": "<country>",
    "operator": "<operator>",
    "region": "<region>",
    "mcc": "<mcc>",
    "mnc": "<mnc>",
    "tz": "<tz>"
    }

Where:
<phone> Ц subscriber's phone number.
<country> Ц name of the country of registration of the subscriber number.
<operator> Ц mobile operator of the subscriber.
<region> Ц region of registration of the subscriber number.
<mcc> Ц numeric code of the subscriber's country.
<mnc> Ц numeric code of the subscriber's operator.
<tz> Ц time zone of the subscriber number registration region.


Example:

Getting information about the subscriber's operator with the number " 79999999999":

https://smscentre.com/sys/info.php?get_operator=1&login=alex&psw=123&phone=79999999999

The server does not accept more than three identical requests within a minute to get information about the subscriber's operator to reduce the load and protect against errors and loops in the Client-side program.

The server also blocks sending more than 100 requests for a minute to get data about the operator to reduce the load on the database.

Getting data about a short link

To get information about a short link, call the GET or POST address method: https://smscentre.com/sys/tinyurls.php?get=1&login=<login>&psw=<password>&link=<link>
or https://smscentre.com/sys/tinyurls.php?get=1&login=<login>&psw=<password>&id=<id>
Description of the parameters passed to the Server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
linkOriginal full Link.
idID of the short link. Assigned automatically when created.

If an error occurs, the Server returns the following string:
  • ERROR = N (description)

  • When fmt = 1:
    0,-N

  • When fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • When fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
3Link not found.
4The IP address is temporarily blocked.
9Attempt to send more than three identical requests for short link information within a minute.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is successful, the Server returns a response in the form of a string:

  • when fmt = 0: id = <id>, cnt = <cnt>, cnt_mon = <cnt_mon>, cnt_day = <cnt_day>, cnt_yes = <cnt_yes>, cnt_pmon = <cnt_pmon>, link = <link>

  • when fmt = 1: <id>,<cnt>,<cnt_mon>,<cnt_day>,<cnt_yes>,<cnt_pmon>,<link>

  • when fmt = 2:
    <result>
    <id>id</id>
    <cnt>cnt</cnt>
    <cnt_mon>cnt_mon</cnt_mon>
    <cnt_day>cnt_day</cnt_day>
    <cnt_yes>cnt_yes</cnt_yes>
    <cnt_pmon>cnt_pmon</cnt_pmon>
    <link>link</link>
    </result>

  • when fmt = 3:
    {
    "id": "<id>",
    "cnt": "<cnt>",
    "cnt_mon": "<cnt_mon>",
    "cnt_day": "<cnt_day>",
    "cnt_yes": "<cnt_yes>",
    "cnt_pmon": "<cnt_pmon>",
    "link": "<link>"
    }

Where:
<id> Ц iD of the short link.
<cnt> Ц the number of all clicks on a short link.
<cnt_mon> Ц number of clicks on a short link per month.
<cnt_day> Ц number of clicks on a short link for today.
<cnt_yes> Ц the number of clicks on the short link for yesterday.
<cnt_pmon> Ц number of clicks on a short link in the previous month.
<link> Ц short link.


Example:

Getting information about a short link with id= " 145142":

https://smscentre.com/sys/tinyurls.php?get=1&login=alex&psw=123&id=145142
Getting information about the short link from the full source link " mywebsite.ru":

https://smscentre.com/sys/tinyurls.php?get=1&login=alex&psw=123&link=mywebsite.ru

The server does not accept more than three identical requests within a minute to get information about a short link to reduce the load and protect against errors and loops in the Client-side program.

Connecting dedicated numbers for receiving messages

You can use special API commands to get a list of available dedicated numbers for receiving SMS messages and connect any number to your username, paying the cost for the remaining days in the current month. When you connect a dedicated number, you automatically agree to the terms of use of such numbers.

To get a list of available allocated numbers, call the following address using the GET or POST method: https://smscentre.com/sys/receive_phones.php?get=1&login=<login>&psw=<password>
To connect a dedicated number, you need to call the address using the GET or POST method: https://smscentre.com/sys/receive_phones.php?buy=1&login=<login>&psw=<password>&phone=<phone>
To change the attribute of the extension of the allocated number for the next month, you must call the address by the GET or POST method: https://smscentre.com/sys/receive_phones.php?chg=1&login=<login>&psw=<password>&phone=<phone>&noprolong=<noprolong>
Description of the parameters passed to the Server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
phonePlug-in number.
noprolongIndicates whether the allocated number is extended for the next month. This parameter can also be specified when connecting the number in the buy command.
0 (default) - enable automatic number renewal.
1 Ц disable automatic number renewal.

If an error occurs, the Server returns the following string:
  • ERROR = N (description)

  • When fmt = 1:
    0,-N

  • When fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • When fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
3Insufficient funds in the account to rent a room.
4The IP address is temporarily blocked.
9Attempt to send more than two identical requests to get a list of available rooms for rent, or to connect a number, or to change the properties of a dedicated number within a minute.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is successful, the Server returns a response in the form of a string.

To get a list of available numbers:
  • when fmt = 0:
    phone = <phone>, type = <type>, cost = <cost>, current_cost = <current_cost>, info = <info>
    ...

  • when fmt = 1:
    <phone>,<type>,<cost>,<current_cost>,<info>
    ...

  • when fmt = 2:
    <list>
    <receive_phone>
    <phone>phone</phone>
    <type>type</type>
    <cost>cost</cost>
    <current_cost>current_cost</current_cost>
    <info>info</info>
    </receive_phone>
    ...
    </list>

  • when fmt = 3:
    [{
    "phone": "<phone>",
    "type": <type>,
    "cost": "<cost>",
    "current_cost": "<current_cost>"
    "info": "<info>"
    },
    ...]

Where:
<phone> Ц phone number.
<type> Ц number type: 1,4-dedicated virtual number, 2-number on the SIM hosting service.
<cost> Ц the cost of renting a room for a full month.
<current_cost> Ц the cost of renting a room for the remaining days until the end of the current month.
<info> Ц operator name and supported notification types.

To rent a room:
  • when fmt = 0: cost = <cost>

  • when fmt = 1: <cost>

  • when fmt = 2:
    <phone>
    <cost>cost</cost>
    </phone>

  • when fmt = 3:
    {
    "cost": "<cost>"
    }

Where:
<cost> Ц the amount debited from the Client's account for the rental of the room.

To change the extension attribute of the number:
  • when fmt = 0,1: OK

  • when fmt = 2:
    <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }



Examples:

Getting a list of available rooms for rent:

https://smscentre.com/sys/receive_phones.php?get=1&login=alex&psw=123
Connecting the number " 79999999999":

https://smscentre.com/sys/receive_phones.php?buy=1&login=alex&psw=123&phone=79999999999
Disabling the ability to extend the allocated number "79999999999" for the next month:

https://smscentre.com/sys/receive_phones.php?chg=1&login=alex&psw=123&phone=79999999999&noprolong=1

The server does not accept more than two identical requests within a minute to get a list of available numbers for rent or to connect a number, or to change the properties of the allocated number to reduce the load and protect against errors and loops in the Client-side program.

Transmitting statuses and messages to the Client handler

In the Client's personal account in "User settings" it is possible to specify the http (s) address (URL) of the script for processing the delivery statuses of messages, incoming SMS messages, as well as service messages (when using the service "Confirm the number with a call") on the Client side. The specified script will be called by the Server after each receipt of the delivery status of a message previously sent by the Client, after receiving an incoming SMS message from the subscriber or a call from the subscriber (when using the "Number Confirmation by Call" service").

In the address of the handler, you can specify the charset parameter to select the encoding of the transmitted parameters: ?charset=utf-8
?charset=koi8-r
?charset=windows-1251
The default encoding is windows-1251.

Also, in the address of the status handler and incoming messages, you can pass the fmt parameter to specify the format of the returned parameters. Possible values: fmt=2 (for xml format) and fmt=3 (for json format). When transmitting the fmt parameter, the koi8-r encoding is not used.

To protect the transmitted data from spoofing , you can additionally specify any of the md5, sha1, or crc32 parameters in the handler address that define the algorithm for calculating the control parameter with the string hash:
"id:phone:status:<секретна€ строка>" − for the delivery status
"phone:mes:to:<секретна€ строка>" − for an incoming message
"phone:ts:<секретна€ строка>" − to confirm the number with a call
in the form of:
?md5=<секретна€ строка>
?sha1=<секретна€ строка>
?crc32=<секретна€ строка>
You can use Latin letters, numbers, minus signs, and underscores as secret string characters. The corresponding parameter will be passed to the handler, in which the secret string will be replaced with the hash value of the transmitted data.

All parameters are passed by the POST method.

Transmitted parameters for the SMS message status:

OptionThe value
idMessage ID.
phonePhone number.
statusMessage status.
timeTime of status change (or delivery of an SMS message to the subscriber).
Format: DD.MM.YY hh: mm: ss (by the time zone specified in the settings).
tsTime to change the status in the form of a stamp in seconds.
errError code if the message cannot be delivered (list). Passed if not equal to zero.
syserrAdditional error from the operator, not always present.
cntThe number of parts (when sending an SMS message) or the number of seconds (when sending a voice message (call)).
typeMessage type (0-SMS, 1-Flash-SMS, 2-Binary SMS, 3-Wap-push, 4 Ц HLR-request, 5-Ping-SMS, 6-MMS, 7- Call, 10-Viber, 12-Social Networks).
costMessage cost.
flagA flag in the form of a 2-byte number containing various information about the message. Combinations of bit values of different characteristics are possible.

0-3 bits (message type):
0 (by default) Ц SMS.
1 Ц Flash-SMS.
2 Ц Binary SMS.
3 Ц Wap-push.
4 Ц HLR-query.
5 Ц Ping-SMS.
6 Ц MMS.
7 Ц Call.
8 Ц E-mail.
10 Ц Viber.
12 Ц Social network.

Bit 5 Ц payment of the message from the second balance.
Bit 8 - indicates a template message.
senderThe sender's name displayed on the recipient's phone.
dtmfThe sequence of characters typed by the subscriber on the numeric keypad while listening to a voice message (phone call).
md5MD5-хеш строки "id:phone:status:<секретна€ строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
sha1sha1-хеш строки "id:phone:status:<секретна€ строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
crc32 онтрольна€ сумма crc32 строки "id:phone:status:<секретна€ строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
Additional parameters for HLR requests
imsiUnique IMSI code of the subscriber's SIM card.
mscThe number of the service center of the operator in whose network the subscriber is located.
mccNumeric code of the subscriber's country.
mncNumeric code of the subscriber's operator.
cnName of the country of registration of the subscriber.
netName of the subscriber registration operator.
rcnThe name of the roaming country of the subscriber when he is in a foreign network.
rnetThe name of the roaming operator of the subscriber when he is in someone else's network.

Transmitted parameters for an incoming SMS message:

OptionThe value
idUnique ID of the incoming message, assigned by the Server automatically.
sms_idID of the message to which the response was received. This parameter is omitted if the message from the subscriber was sent to a dedicated incoming number or if the subscriber specifies the prefix " login, colon and space".
phoneSubscriber's phone number.
mesText of the SMS message.
toThe incoming phone number to which the message was sent by the subscriber.
smscSMS center of the operator from which the incoming message was received.
sentSending a message to the subscriber in the form of a stamp in seconds.
timeThe time when the message was received by the Server in the form of a stamp in seconds.
md5MD5-хеш строки "phone:mes:to:<секретна€ строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
sha1sha1-хеш строки "phone:mes:to:<секретна€ строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
crc32 онтрольна€ сумма crc32 строки "phone:mes:to:<секретна€ строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.

Transmitted parameters when using the service " Number confirmation with a call":

OptionThe value
waitcall1 Ц service message flag for the service " Number confirmation with a call".
phoneThe phone number of the subscriber from whom the call was received.
tsCall time.
md5MD5-хеш строки "phone:ts:<секретна€ строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
sha1sha1-хеш строки "phone:ts:<секретна€ строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.
crc32 онтрольна€ сумма crc32 строки "phone:ts:<секретна€ строка>". Passed if it was specified as an additional parameter in the http (s) address of the handler.

Additional parameters transmitted when using the voice menu function in calls:

OptionThe value
calltime The time of the call, after which the key was pressed on the numeric keypad of the subscriber's phone, or the total time of the call.
callmenuThe sequence of keys on the phone's numeric keypad that the caller pressed while navigating through the voice menu.
ringtimeWaiting time for the subscriber to pick up the phone.

In addition to the standard parameters described above, the Server will also send all the parameters specified in the http(s) address of the handler after the"? " sign using the POST method".

To distinguish between the status of a message, an incoming SMS message, or a service message (when using the "Confirm number by calling" service), you can check for the presence of the mes parameter (for an incoming message) and waitcall in the same handler (for the number confirmation service): if (isset($_POST["mes"])) {
   
// message
}
elseif (isset(
$_POST["waitcall"])) {
   
// confirmation
}
else {
   
// status
}

Statuses are forwarded to the Client handler only when sending messages over the HTTP/HTTPS, SMTP, or SMPP protocols. When sending messages from the personal account, the transfer of statuses to the Client's handler does not occur.

If the Client handler returns a response with an error code other than 200 or 404, the Server will repeat the request to the handler with a certain frequency (1 request every 4 minutes, total 50 attempts).

ѕодключение антиспам проверки (captcha) к сайту

Sometimes there is a need to send messages from your site at the request of users, and in such cases, to exclude automated spam mailings with the help of robots, you can easily implement anti-spam verification using our service.

To do this, it is enough to place a special code for displaying the image (captcha) and fields for entering the code on the form for sending messages:

 од с картинки <img src="https://smscentre.com/sys/imgcode.php?1.1" onclick="src+=1" width="50" height="18" border="1">
<
input type="text" size="9" name="code">
and pass it with other form data to the corresponding message sending script as the value of the imgcode parameter.

Also, with this parameter, you must pass the value of the IP address of the user to whom the image was displayed as the value of the userip parameter.

Examples:

Example of a script for sending messages using the code from the image (captcha) received from the form:

include_once "smsc_api.php";

if (
$_POST["sendsms"]) {
   
$r = send_sms($_POST["phone"], "¬аш код дл€ регистрации на сайте mysite.com 123321.", 0, 0, 0, 0, false, "imgcode=".$_POST["code"]."&userip=".$_SERVER["REMOTE_ADDR"]);

if (
$r[1] > 0)
    echo
"<script>alert('—ообщение отправлено на номер ".$_POST["phone"]."')</script>";
elseif (
$r[1] == -10)
    echo
"<script>alert('¬ы ввели неверный код с картинки!')</script>";
}

Confirm your phone number with a call

For various types of operations, such as password recovery, authorization in public Wi-Fi networks, confirmation of money transfers, logging in to your personal account, and so on, you need to send authentication data. Using our API, you can organize the procedure for confirming the phone number by calling the subscriber himself.

To create a request to receive a phone number, at which the subscriber will have to make a confirmation call, you need to call the address using the GET or POST method: https://smscentre.com/sys/wait_call.php?login=<login>&psw=<password>&phone=<phone>
The following parameters are passed to the server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
phoneThe phone number of the subscriber from which the confirmation call will be made.

If an error occurs, the Server returns the following string:
  • ERROR = N (description)

  • When fmt = 1:
    0,-N

  • When fmt = 2:
    <result>
    <error>description</error>
    <error_code>N</error_code>
    </result>

  • When fmt = 3:
    {
    "error": "description",
    "error_code": N
    }
N Ц error number, can take the following values:

The valueDescription
1Error in parameters.
2Invalid username or password. Also occurs when trying to send a message from an IP address that is not included in the list of allowed by the Client (if such a list was previously configured by the Client).
3Insufficient funds on the Client's account.
4The IP address is temporarily blocked.
5The specified phone number of the subscriber is in the black list of the Client.
9Attempt to send more than fifty identical requests to get a phone number for confirmation within a minute.
This error also occurs when you try to send fifteen or more requests simultaneously from different connections under the same username (too many concurrent requests).

If the request is successful, the Server returns a response in the form of a string.

  • when fmt = 0: phone = <phone>, all_phones = <all_phones>

  • when fmt = 1 (the first is the number to which the subscriber needs to call): <all_phones>

  • when fmt = 2:
    <result>
    <phone>phone</phone>
    <all_phones>
    <phone>phone</phone>
    ...
    <phone>phone</phone>
    </all_phones>
    </result>

  • when fmt = 3:
    {
    "phone": "<phone>",
    "all_phones": [
    <phone>",
    ...
    "<phone>"
    ]
    }

Where:
<phone> Ц the phone number to which the subscriber must make a call within 15 minutes to confirm their phone number.
<all_phones> Ц a list of all possible phone numbers, one of which was assigned by the system to call the subscriber (depending on the country).

After the subscriber's call, the Server records the fact of the call in the form of an incoming message with the text "[waitcall] " and sends all the necessary information about this call to the Client's handler.

The server does not accept more than fifty identical requests to get a phone number for confirmation within a minute to reduce the load and protect against errors and loops in the Client-side program.




© 2003Ц2023 SMS Center LLC
License no. 166255
support@smscentre.com
Contacts
Design Ч Artemy Lebedev Studio
Site Information
SMS Center for Android Yandex. Metrica