- PUT Campaign
This method allows you to insert a new SMS sending campaign to the contacts of your address books.
|id_sender||int||no*||The id of the sender (see "GET sender") to be used for sending.|
|sender_name||string||no*||The sender's name must be one string with less than 11 characters, can be an existing sender or not. If it does not exist it will be added.|
|name||string||yes||Name of the campaign.|
|state||Enum (draft|sent)||no||The status of the campaign, if not sent, is saved in the drafts.|
|message||string||yes||The text of the SMS.|
|send_date||date(Y-m-d H:i:s) or array||yes||The date sent or an array of dates of sending.|
|address_books||string or array||yes||The address book or the array of address books to which send the campaign.|
If successful, the response header HTTP status code will be 200 OK and the request will be answered.
If you try to get a request without authorization, you will receive an error 401 Unauthorized.
Additionally you should also handle the 400 Bad request status. For more info on HTTP status handling see dedicated section in Integration best practices page.
|data||DataRespondeDetails||Present only if the API call goes to good end, it will contain the answer data.|
|success||boolean||True or false.|
|code||int||If the API call is successful, it will be 200, otherwise 4xx.|
|error_code||string||Present only if the API call fails, it contains an error code in string format.|
|message||string||Present only if the API call does not go to its end, it contains a message that can be shown by the user.|
Data Response Details
|code||string||Unique code of the campaign.|