Expose the deleted attribute of the contact API resource

I need to routinely find and delete inactive contacts via the API.


Finding inactive contacts is easy, but it's impossible to tell which contacts aren't deleted yet. The list of inactive contacts you get back from the API includes every deleted inactive contact on the system.


Not exposing the deleted attribute seems like a major oversight to me. If I can't purge them, I should be able to filter out deleted objects. If I could add "deleted:false" to the API request query parameters, that would work nicely.


Right now every list of inactive contacts I get from the API contains both current and legacy data, and there doesn't seem to be a way for me to filter it?

1 Comment

I've ended up fetching every inactive contact, then inspecting each one for the 'deleted' attribute. This works fine if you're OK with having to send an extra request for every contact, but it's not ideal. Combining inactive and deleted in one filter would be preferable for sure.


The deleted attribute is a boolean field but doesn't exist at all unless the contact is deleted, which seems odd. It results in slightly more code on the client-side to handle key errors/default values. 

Login or Signup to post a comment