Add Group Member

This request is used to add a contact member in an existing group.

HTTP Request

URLMethodDescription
https://app.tellody.com/CampaignCloud/Group/<groupId>/items/<subscriptionId> PUT Add Group Member

Path Variables

All calls include two path variables; one for the group id and the other for the contact id to be added as a group member.

Sample Request

PythonOther

#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
header = {"Content-Type" : "application/json", "X-XSRF-TOKEN" : xsrfToken}
#add group member with subscriptionId=27 to groupId=5
groupId="5"
subscriptionId="27"
base_url="https://app.tellody.com/CampaignCloud/Group/"
url_put = base_url + groupId +"/items/"+subscriptionId
#add member
response = my_session.put(url_put,headers=header,params={}).json()
print(json.dumps(response,ensure_ascii=False))

Sample Response

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

{
   "data":null,
   "outcome":"OK",
   "id":null
}

Errors

In case of error, the "outcome" is either "null" or "Error" and the "id" returns a string with the error description.

For example, if the selected group does not exist, the response is the following:

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