Delete Contact

This request is used to delete an existing contact.

HTTP Request

URLMethodDescription
https://app.tellody.com/CampaignCloud/Subscription/<subscriptionId> DELETE Delete Contact

Path Variables

The URL uses a path variable with the actual value of the contact's id to be deleted.

NameDescription
"subscriptionId" The value of this path variable is used as a string representing the numeric value of the contact's id

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
subscriptionId="23"
contact_url="https://app.tellody.com/CampaignCloud/Subscription/"+subscriptionId
response = my_session.delete(contact_url, headers=header).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 deleted.

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

Errors

In case of error, the “outcome” returns the string “Error”and the attribute ‘id’ contains a string with the description of the error.

If the contact does not exist the “outcome” will return <strong>null</strong>

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