REST v1 Delete Tag is not working

I’m trying to delete a set of 3 tags from a specific contact, if it has them. I’m going through the InfusedWooPRO plugin’s oauth_helper file to send the request to Keap. The line calling the OAuth function looks like this:

iw_keap_restV1Request(“contacts/{$matching_contact_id}/tags”, ‘DELETE’, json_encode([‘tagIds’ => [ {tag list} ]]));

where { tag list } is a comma-delimited list of tag numbers.

Looking at logs, I can see that other requests sent using this function work; however, the delete requests are consistently failing with a Bad Request 400 error. Is there a syntax or format error of some kind in this function call – perhaps the method (‘DELETE’) is wrong? If so, what should it be?

-- Jon W.

We’ve found and fixed this on our end: the call to the REST API needed to send the tags to remove as a simple array, not json-encoded. It’s working now.

Glad you found a fix! It’s also worth mentioning that we recommend migrating to v2, as it’s our newest API and is where all new development and improvements are focused.