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

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.



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