HTTPS API v2 / Sending personalized SMS messages

Calling address

For using remote control to send personalized SMS message, call a specific URL POST method. In the messages personalized there are no parameters like "phone" or "text". Instead, there is an additional parameter "messages", which contains a set of numbers assigned to them and the individual message. The value of "messages" consists of a two-dimensional array, which contains the keys "phone" and "text". Limit a single call to this question is 10 000 numbers and corresponding content available messages (recommended are much smaller chunks of data, approx. 50-200 numbers in a single query). Examples of calling dispatch may look like this:

messages/send_personalized

POST:
{
   messages:[{
      "phone": "+48500600700",
      "text": "message1"
   },
   {
      "phone": "+48500600500",
      "text": "message2"
   }]
}

Calling the above action with the given parameters (in the case of correct data to log) would send an SMS with the text "message1" to the number 500 600 700 and the second SMS message "message2" to the number 500 600 500.

Available parameters

Parametr Type An example value or format Description
username String login Username used to dispatch the message
password String password Password to the account
messages Array [array('phone' => numer, 'text' => message),
array('phone' => numer, 'text' => message)]

 
Phone numbers assigned to them the content of the SMS.
details Boolean true, false or none

The parameter displays in response to feedback details sent messages.

flash Boolean true, false or none An optional parameter.
test Boolean true, false or none The optional parameter,  allowing to check the query sending an SMS message. In response document is generated JSON / XML identical to the standard question, but the message will not be sent. Useful for testing applications (debug).
sender String

The number in the format +48500600700 or proper name (max 11 characters, uppercase and lowercase letters and numbers, and a space character).


An optional parameter allows you to change the sender field of SMS messages to any number or name. You can only use the name approved by administrators or pre-defined names
utf Boolean true, false or none An optional parameter allows you to send SMS messages FULL containing, among others, Polish diacritics.
voice Boolean true, false or none An optional parameter allows you to send SMS messages VOICE. Parameter sender must remain empty.
date DateTime ISO
eg.: „2010-11-09 15:23”
An optional parameter allows you to specify the date of dispatch of SMS messages.
unique_id String|Array eg. 6asTD3fif98gj

An optional parameter allows you to define your own ID message you send. The identifier can be a minimum of 3 characters and a maximum of 50 alphanumeric characters (a-z, A-Z, 0-9). For group mailings, another unique_id must be unique, given in the form of a table and the number of unique_id must be consistent with the amount of personalized messages.

The parameters in bold are obligatory. Others are optional.

Return generated after the message is the same as the regular sending of SMS messages.

{
   "success":true,
   "queued":2,
   "unsent":2,
   "items":[{
      "id":"98c93cc5f2",
      "phone":"+48500600700",
      "status":"queued",
      "queued":"2014-10-20 13:26:50",
      "parts":1,
      "text":"message1"
   },
   {
      "id":"a20ff834c8",
      "phone":"+48500600500",
      "status":"queued",
      "queued":"2014-10-20 13:26:50",
      "parts":1,"text":"message2"
   },
   {
      "id":"b25462142e",
      "phone":"45648",
      "status":"unsent",
      "queued":"2014-10-20 13:26:50",
      "error_code":3103,
      "error_message":"Incorrect number",
      "text":"message3"
   },
   {
      "id":"d862cc6575",
      "phone":"11999885544",
      "status":"unsent",
      "queued":"2014-10-20 13:26:50",
      "error_code":3103,
      "error_message":"Incorrect number",
      "text":"message4"
   }]
}

Recommended settings

In the case of medium and large amounts of messages sent several thousand or more, it is recommended to transfer messages in "packages" after approximately 50-200 numbers in a single query. This will speed up considerably the process of transferring the data to SerwerSMS.pl and reduce the amount necessary to send queries.

Define the parameter "messages" overwrites parameter values ​​"phone" and "text".

The recommended timeout value for a single query is 60 seconds.