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

Contacts and groups. 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 (creating 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 (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> – the number of the mailing group.
<cnt> – the 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–2024 SMS Center LLC
support@smscentre.com
Contacts
Design — Artemy Lebedev Studio
Site Information
SMS Center for Android Yandex. Metrica