Sending SMS, Viber, Flash SMS, WAP-Push

Sending SMS, Viber, Flash SMS, WAP-Push

POST http://lk.mysmpp.ru/json

Headers

Name
Type
Description

Content-type*

String

text/json; charset=utf-8;

Request Body

Name
Type
Description

login*

String

Your login in the system

password*

String

Your password in the system

token*

String

You can use a secret key instead of login and password. To obtain it, please contact your manager.

message.type_send_1*

String

Type of message to be sent viber or sms

message.sender*

String

SMS sender. 
 This is the value that will be displayed on the subscriber's phone in the SMS from whom field

message.phones.phone*

Int

Number of the subscriber to whom the SMS is addressed

message.phones.client_id_sms

Int

Number assigned by the client

Allows to avoid repeated sending. If an SMS with the same number has already been sent from this account, it will not be sent again, but the number of the previously sent SMS will be returned.

message.text*

String

Regular SMS text or WAP link description

message.phones.validity_period

Date

The date and time after which no attempts will be made to deliver SMS in the format:

YYYY-MM-DD HH:MM:SS

where, YYYY - year, MM - month, DD - day, HH - hours,

MM - minutes

SS - seconds

If not set, the SMS has a maximum lifetime.

{
    "information":
        [
            {
                "state": "Status", 
                "id_sms": "SMS ID in the system to check the status",
                "error": "Error message."
            },
            {
                "state": "Status", 
                "id_sms": "SMS ID in the system to check the status",
                "error": "Error message."
            }
        ]
}

Deciphering parameters in query responses

Parameter
Data type
Description

state

String

Message status ("send"), if SMS has been sent

id_sms

Int

SMS message number. It is used to check the status of SMS.

If an error occurred while sending SMS, id_sms is not transmitted

error

String

Error text for response status 200:

  • Incorrect JSON document format

  • Your account is locked Incorrect login or password

  • POST data is missing

Error text at response status 400:

  • We have run out of SMS. Contact your manager to resolve the problem

  • Out of SMS

  • Account blocked

  • Specify phone number

  • Phone number is on the stop list

  • This destination is closed for you

  • This destination is closed

  • SMS text rejected by moderator

  • No sender

  • The sender must not exceed 15 characters for numeric numbers and 11 characters for alphanumeric numbers

  • Phone number must be less than 15 characters

  • No message text

  • No link

  • Provide the name of the contact and at least one parameter for a business card

  • There is no such sender

  • The sender has not been moderated

Example of a sending request

{
    "login": "login",
    "password": "password",
    "token": "token",
    "message": [
        {
            "type_send_1":"sms",
            "sender":"sender 1",
            "text":"message text 1",
            "phones":[
                {
                    "phone":"79612242243",
                    "client_id_sms":"101",
                    "validity_period":"2001-12-31 15:34:54"
                },
                {
                    "phone":"79612242244",
                    "client_id_sms":"102",
                    "validity_period":"2001-12-31 15:34:54"
                }
            ]
        },
        {
            "type_send_1":"sms",
            "sender":" sender 2",
            "text":"message text 2",
            "phones":[
                {
                "phone":"79612242245",
                    "client_id_sms":"103",
                    "validity_period":"2001-12-31 15:34:54"
                }
            ]
        }
    ]
}

Last updated