Configure SMS

This request is used to configure SMS messages with the appropriate settings on content, scheduling and targetted contacts.

HTTP Request

URLHTTP MethodDescription POST Submit Configuration


title SMS title to appear for SMS configuration in UI messages list. A string value is used.
startDate Sets the date and time to send bulk messages to all selected contacts. It is set as an integer value which represents the date in milliseconds. To start sending at the time of request, the value should be “null” or alternatively this parameter can be omitted.
contactIds This should include all the contact Ids that should receive the SMS. It is set as an array of comma separated integers; each of them representing a contact Id (e.g. “contactIds”:[5,18,29,30]). Leave array blank [] when no individual contacts should be selected.
includedGroups This will include the selected groups based on their ids in the form of a string “Group<id>“. It is set as an array of comma separated strings; each of them representing a group Id. e.g. “includedGroups”:[“Group2”, “Group3”]. Leave array blank [] when no groups should be selected.
excludedGroups This will include explicitly or groups that should not receive the message. The supported value format is exactly the same as for included groups. However, the value should always include the Blocked group (Group1) amongst any other groups to be excluded . e.g. "excludedGroups":["Group1”,”Group5”]
message This is parameter sets the message content as a string value. The value of this parameter should be no longer than 160 characters for single SMS. In case more characters are included then additional SMS will be sent to each contact. In general the number of SMS that is sent follows the rule: abs(Total Characters/160) = N+1 SMS, where N is the integer part of the result.
contentForUniqueCode This parameter includes a selected file to be sent with the message. Its value is set to a string of the form “file/filename>(campaign_id)” e.g. "contentForUniqueCode":"file/cream-cheese - Copy.jpgcampaign_60"
urlForUniqueCode This parameter includes a url that appears embedded in the body of the message. Its value is a URL string e.g. "urlForUniqueCode":""
voucherForUniqueCode This is an integer value that is generated automatically by the system upon executing/activating a configured voucher.
campaignTemplateType This declares the type of configuration. For bulk SMS, it is set to the string "BULK"
campaignChannel This declares the type of service. For send SMS request it should be set to the string value “SMS”
userId This is set to integer zero by default
sender This is the username of the Tellody user to create and send the SMS.

Sample Request


#Retrieving the XSRF Token needed for Session
pingResponse = my_session.get("")

#Import the X-XSRF-Token returned from RememberMeController/ping into the request header
xsrfToken = pingResponse.headers.get("X-XSRF-TOKEN")

#HTTP request header
header = {"Content-Type" : "application/json", "X-XSRF-TOKEN" : xsrfToken}
#get current date 
startDate = time.mktime(t.timetuple())*1000
print("double date is: {}".format(startDate)) 
startDate = int(startDate)
print('\ncurrent date is: {}'.format(startDate))
#Create a json file with the config of the sms message and send it 
data = {
   "title":"Greetings to ALL",
   "message":"Dear friends 111",

response =, header, data).json()
print('\nresponse id is: {} \n'.format(response_id))

Sample Response

The result of the request returns an alphanumeric string value which serves as the configuration identifier which can be used later on to select and send this message.

   "message":"Dear friends 111",
   "title":"Greetings to Everyone",


If the result of the configuration does not return such a value, then the request has failed. More information on the issue can be derived by the HTTP response. (e.g. HTTP 400, 414 etc.)

Back to Top