Links

Sending SMS, Viber, Flash SMS, WAP-Push

post
http://lk.mysmpp.ru
/json
Sending SMS, Viber, Flash SMS, WAP-Push
Parameters
Header
Content-type*
String
text/json; charset=utf-8;
Body
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.text*
String
Regular SMS text or WAP link description
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.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.
Responses
200: OK
In case the correct JSON document is received
400: Bad Request
If an error occurs in the sent JSON document

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

1
{
2
"login": "login",
3
"password": "password",
4
"token": "token",
5
"message": [
6
{
7
"type_send_1":"sms",
8
"sender":"sender 1",
9
"text":"message text 1",
10
"phones":[
11
{
12
"phone":"79612242243",
13
"client_id_sms":"101",
14
"validity_period":"2001-12-31 15:34:54"
15
},
16
{
17
"phone":"79612242244",
18
"client_id_sms":"102",
19
"validity_period":"2001-12-31 15:34:54"
20
}
21
]
22
},
23
{
24
"type_send_1":"sms",
25
"sender":" sender 2",
26
"text":"message text 2",
27
"phones":[
28
{
29
"phone":"79612242245",
30
"client_id_sms":"103",
31
"validity_period":"2001-12-31 15:34:54"
32
}
33
]
34
}
35
]
36
}
Last modified 5mo ago