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

Getting data

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'.
phoneA number or a comma-separated list of phone numbers for which you need to get the history of sent SMS messages.
emailAn e-mail address or a comma-separated list of addresses for which you need to get a 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 in the form of 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> – 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 Client's phone number to which 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 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 receive 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 for 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 receive 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 per minute to receive operator data 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.

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


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.




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