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

MESSAGES SENDING

MANAGING MAILING LISTS

MESSAGE STATUSES

CHECKING THE BALANCE STATUS

MANAGING CONTACTS

CLIENT MANAGEMENT

MANAGING SENDER NAMES (SENDER ID)

GETTING DATA

VARIOUS

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:
  • with fmt = 0 and all = 0: Status = <status>, check_time = <last_date>, err = <err>

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

  • with 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>

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

  • with 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>

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

  • with 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>

  • with 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>
    }

  • with 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>

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

  • with 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>

  • with 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:
  • with 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>

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

  • with 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>

  • with 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>"
    }

  • with 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>

  • with 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>

  • with 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>

  • with 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>
    }

  • with 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>

  • with 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>

  • with 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>

  • with 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), then the status code in the appropriate format is returned for fmt = 0,2,3 . For fmt = 1, a response is returned in the format of the status of a regular message.

When multiple statuses are requested:
  • for fmt = 0 and fmt = 1, the result returns a list of lines, 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 "<list>" tag.
  • for fmt = 3, the format is also similar to the format for single messages, statuses are separated by commas, and the entire list is framed by square brackets.
In the case of multiple status requests, when the parameter all = 1 or all = 2 is set, the message identifier is additionally returned for each status . If all = 0, the message ID and phone number are additionally returned.



© 2003–2024 SMS Center LLC
support@smscentre.com
Contacts
Design — Artemy Lebedev Studio
Site Information
SMS Center for Android Yandex. Metrica