Forum Discussion

Akenefick's avatar
Akenefick
Genius
3 years ago

Delete Label API Stopped Working

Hi. A while back I wrote a script to replace labels on messages. I used this to replace thousands of labels, but now the delete has stopped working. The script pulls a list of messages with a given label, adds a new label then deletes the old label. The first two steps are still working but the delete step gives me an error.

Here is my code to delete labels:

function del(id){
	var delLabelReq = new XMLHttpRequest();
	var call = domain + "/api/2.0/messages/" + id + "/labels/" + encodedOldLabel;

	delLabelReq.open("DELETE", call, false);

	delLabelReq.onload = function(){
		resp = delLabelReq.response;
		console.log(resp);
	}
	delLabelReq.send();
	}

 

I also tested in postman you can see the error here:

I double checked the documentation here Delete message label (khoros.com) and think I am doing everything right (and this worked in the past).

Anyone else noticed anything like this? Has something changed or am I missing something?

Thanks for your help.

 

  • Hello Akenefick

     

    I have passed on your query to support, they will reach out to you and help you with this.