Generic selectors
Exact matches only
Search in title
Search in content
Search in posts
Search in pages

createSmsMessage method

Вы здесь:

It is a method to create SMS messages without sending them. The message is sent using another method createCampaign.

Principle of use

Syntax and URL to call the method
createSmsMessage (string sender, string body, int list_id, string tag,
date series_day, time series_time, string categories) &body=BODY &list_id=X&tag=
TAG&series_day=DAY &series_time=TIME&categories=CATEGORIES
api_key * API access key.
sender * Sender’s name consisting of 3 to 11 Latin letters and numbers. The name must be registered in the support service.
body * Text of the message with the possibility to add substitution fields.
list_id * Code of the list on which SMS messages will be sent. Codes of all lists can be obtained by calling getLists. The message may be sent only on a single list. You need to create a new message to send on another list.
tag Tag. If it is set, the message will not be sent on the entire list, but only to those recipients to whom the tag is assigned.
series_day Sending day for an automatically sent message included into a series.If it is missing, the letter is not considered as automatic.

If it is set, this should be a positive integer specifying the day of sending the letter in respect to the subscription data.

Day number 1 has a special meaning, if this day is specified, the letter will be sent at the time of subscription, and the value of series_time will be ignored (because the time of subscription is not known in advance). Warning: automatic sending starts immediately after the successful creation of the letter, and if it needs to be sent automatically in a minute, the system will send it.

series_time Sending time for an automatically sent letter in the «HH:MM» format. If it’s missing, the time will be selected arbitrarily from 6:00 to 14:00. Time is ignored if the «series_day» argument is not specified. The time zone set in the settings of the personal account is applied.
categories Message categories listed in the text form separated by commas.
Return value
JSON object with the single message_id field, which contains a unique message code – a positive 31-bit integer. It is used to send a message using the createCampaign method.Example of the return value:

{"error":"invalid sender","code":"invalid_arg","result":""}
{"error":"invalid list_id","code":"invalid_arg","result":""}

Examples of forming the URL request
&list_id=778899&categories=letter list, test, with attachment, unisender

— prepare a new SMS-message Test SMS-message to all numbers on the list 778899 with indication of the return number in UniSender.