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

”ѕ–ј¬Ћ≈Ќ»≈  ќЌ“ј “јћ»

CLIENT MANAGEMENT

MANAGING SENDER NAMES (SENDER ID)

GETTING DATA

VARIOUS

”правление контактами

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>
ƒл€ создани€ новой группы: 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_phoneЌовый список номеров телефонов через любой разделитель (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.
bdƒата рождени€ в формате дд.мм.гггг.
myidID контакта, назначенный  лиентом.
cmtCommentary.
tagsTags (метки).
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 Ц группа дл€ e-mail адресов.
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> Ц дата рождени€ в формате дд.мм.гггг.
<id> Ц contact Id assigned by the Client.
<comments> Ц commentary.
<tags> Ц tags (метки).
<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> Ц номер группы дл€ рассылок.
<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.




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