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

Managing message templates

To manage message templates, call the appropriate address with the required command and parameters using the GET or POST method.

To create a template: https://smscentre.com/sys/templates.php?add=1&login=<login>&psw=<password>&name=<name>&msg=<msg>
To change the template: https://smscentre.com/sys/templates.php?chg=1&login=<login>&psw=<password>&id=<id>
To delete a template: https://smscentre.com/sys/templates.php?del=1&login=<login>&psw=<password>&id=<id>
To get a list of templates: https://smscentre.com/sys/templates.php?get=1&login=<login>&psw=<password>
The following parameters are passed to the server:

OptionThe value
loginCustomer Login.
pswClient Password (you can add or change it on this page).
nameTemplate name.
msgThe text of the message.
formatMessage format:
empty string Ц not specified.
sms Ц SMS.
flash Ц Flash-SMS.
bin Ц Binary SMS.
push Ц Wap-push.
mms Ц MMS.
call Ц Call.
mail Ц E-mail.
viber Ц Viber.
senderSender ID.
fl[1]Use for auto-signing.

If an error occurs, the Server returns the following string:
  • when fmt = 0:
    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).
3Record not found.
4The IP address is temporarily blocked.
5Save or delete error.
9Attempt to send more than three identical template action requests.
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 template:
  • when fmt = 0: ID - <id>

  • when fmt = 1: <id>

  • when fmt = 2:
    <template>
    <id>id</id>
    </template>

  • when fmt = 3:
    {
    "id": <id>
    }

When changing or deleting a template:
  • when fmt = 0, 1: OK

  • when fmt = 2:
    <result>OK</result>

  • when fmt = 3:
    {
    "result": "OK"
    }


When requesting a list of message templates:
  • when fmt = 0:
    id = <id>, name = <name>, format = <format>, sender = <sender>, flag = <flag>, message = <message>
    ...

  • when fmt = 1:
    <id>,<name>,<format>,<sender>,<flag>,<message>
    ...

  • when fmt = 2:
    <list>
    <template>
    <id>id</id>
    <name>name</name>
    <format>format</format>
    <sender>sender</sender>
    <flag>flag</flag>
    <message>message</message>
    </template>
    ...
    </list>

  • when fmt = 3:
    [{
    "id": <id>,
    "name": "<name>",
    "format": "<format>",
    "sender": "<sender>",
    "flag": <flag>,
    "message": "<message>"
    },
    ...]

Where:
<id> Ц template ID assigned by the system automatically.
<name> Ц template name.
<format> Ц message format.
<sender> Ц sender ID.
<flag> Ц flag for the template. Setting the first bit of the flag (fl[1]=1) assigns the use of the template for auto-signing.
<message> Ц the text of the message.

The server does not accept more than three identical requests for actions with templates within a minute 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