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 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. For simplified authorization, instead of a login and password pair, you can use a special API key.


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

Work with the subclient

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

Sub-clients. Description of the parameters

Description of the parameters passed to the Server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
apikeyA special API key used for simplified authorization instead of the "login+password" pair (you can create 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]A flag that sets the possibility of sending incoming SMS to e-mail.
email2Alternative email address for sending incoming SMS.
phoneMain phone number.
fl[8]A flag that sets the possibility of sending incoming SMS to the phone.
phone2Alternative phone number for sending incoming SMS.
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.
mycurA flag that allows you to display statistics in the currency of the main account.
fioInitials (last name, first name, patronymic) or company name.
propsThe "Other details" field of the sub-client.
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.
tzThe time zone. The Client's time zone is set by default. Possible values:
0 – GMT-12.
...
12 – GMT+00
...
24 – GMT+12.
senderDefault Sender name (Sender ID) .
sender2Sender's Backup name.
fl[29]A flag that determines whether the Client's list of senders can be used (main Account).
fl2[9]A flag that allows the use of more expensive routes for guaranteed message delivery.
fl2[24]A flag that allows you to send first via cheap routes, and repeat through expensive ones if not delivered (except for mass messaging).
fl2[12]The flag prohibits sending messages with automatic replacement of the sender's name.
fl2[13] The flag disables adding the sender's name to the message text without increasing the cost in 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.
fmtsA list 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 contact list of the main account.
fl2[8]The flag that sets the advanced mode of the personal account.
fl[16]Enable answering machine recognition when making 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.
phA comma-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
dlimThe total SMS limit per day. Defines the maximum number of messages sent per day.
plimThe limit for one number. Sets the maximum number of messages sent per day to one phone number.
tlimThe limit on the number and text. Sets the maximum number of messages sent per day with one text per phone number.
ilimThe limit per 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, then an SMS message will be sent to the subscriber when the time h1 arrives, if the current time falls within the range from h1 to h2, then the message will be sent immediately, in another case, the sending will be performed 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 (by e-mail, phone and handler).
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 through 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 which messages will be sent.
mfl[5]Enables the ability to specify a list of phone numbers in the body of the letter.
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.
mlenThe maximum 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 sub-clients

Examples:

Creating a sub-client with the login "mylogin", password "mypassword", phone number 79999999999 and permission to use sender names (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
Changing the sub-client's login from "mylogin" to "mylogin2", client type to "Tariff and balance of the main account" and setting allowed codes for sending 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
Getting statistics on a sub-client with the username "sub_alex":

https://smscentre.com/sys/users.php?get_stat=1&login=alex&psw=123&user=sub_alex
Getting statistics on independent sub-clients in the currency of the main account from "01.01.2014" to "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.




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