Edit Group

This request is used to edit the information of an existing group.

HTTP Request

URLMethodDescription
https://app.tellody.com/CampaignCloud/Group/<groupId>/<path_variable> PUT Edit Group Details

Path Variables

The API uses a different path variable for each type of group information to be edited. For example, to edit the title, the URL has to be written using the keyword "title" at the end.

All calls should include as a path variable the actual value of the group id to be edited.

NameDescription
"title" This keyword is used as a path variable to edit the title of the group
"description"

This keyword is used as a path variable to edit the description of the group

POST Parameters

Except for the path variables that need to be substituted in the request URL, the PUT request has to pass data for any of the above edited group information.

A string value is required to set the value of each group related information.

NameDescription
"title" This key is set to the new title value as a string.
"description" This key is set to a string with the description of the group.

Sample Request

PythonOther

# create data input files
# get new value for MSISDN from a file
text_file = open("textfile1.txt", "w")
text_file.write("\"Music Group\"")
text_file.close()
# get new value for profession from a file
text_file = open("textfile2.txt", "w")
text_file.write("\"People with good taste of music\"")
text_file.close()
filepath_title = 'textfile1.txt'
with open(filepath_title) as fh:
	mydata=fh.read()
	
filepath_desc = 'textfile2.txt'
with open(filepath_desc) as fh:
	mydata=fh.read()
	
#Retrieving the XSRF Token needed for Session
pingResponse = my_session.get("https://app.tellody.com/CampaignCloud/RememberMeController/ping")

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

#HTTP request header
headers = {"Content-Type" : "application/json", "X-XSRF-TOKEN" : xsrfToken}
#update contact info with subscriptionId=5
groupId="4"
base_url="https://app.tellody.com/CampaignCloud/Group/" + subscriptionId 
	
#Edit Title
response = my_session.put(base_url + "/title", data=mydata,headers=headers,params={'file':filepath_title}).json()
	
#Edit profession
response2 = my_session.put(base_url + "/description", data=mydata,headers=headers,params={'file':filepath_desc}).json()

Sample Response

The key “outcome” returns the string “OK” when then the request is performed with success and the selected group is updated with the selected value.

{
   "data":null,
   "outcome":"OK",
   "id":null
}
Back to Top