Remove Group Member

This request is used to remove a contact member from a group.

HTTP Request

URLMethodDescription
https://app.tellody.com/CampaignCloud/Subscription/<subscriptionId>/Groups/<groupId>/remove DELETE Remove Group Member

Path Variables

All calls include two path variables; one for the group id and the other for the id of the contact to be removed from the group.

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}
#delete contact with id:27 from group with id:5
print("\nDeleting group member....")
subscriptionId="27"
groupId="5"
url="https://app.tellody.com/CampaignCloud/Subscription/"+subscriptionId+"/Groups/"+groupId+"/remove"
response = my_session.delete(url, headers=header).json()
print(json.dumps(response,ensure_ascii=False))

Sample Response

The key “outcome” returns the string “OK” when the request is performed with success and the selected member is removed from the 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 contact member does not exist, the response is the following:

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