API giving false response

HI Team,

one of your GET contact API is giving wrong response.

Use case:

- Create a list 20, assign one contact(abc@gmail.com) to it.

- Deleted the list

- Hit the fetch API, it still gives the response with that contact one contact(abc@gmail.com).

Recording one contact(abc@gmail.com) Private claap

Thanks

Hi @devphoenix :waving_hand:

I’ve been able to replicate the issue you’ve described. What seems to be happening is:

  • You “delete” a List from HubSpot (either via web UI or API)
    • Note that “deleting” a HubSpot List actually just archives it for 90 days (during this period it’s restorable). After 90 days have passed, it is deleted permentantly.
  • The V1 Get Contacts in a List endpoint returns Contacts that belong to an archived Static List*.* This API response does not include any information about whether or not the given list is active or archived. This also seems to be the case with this endpoint’s V3 equivalent.
    • Side note - I couldn’t replicate the issue for Dynamic Lists. They didn’t seem to be returned by the API if they were archived.

While not a great solution, I’d suggest you first try using V1 Get List by ID. If you receive a 404, you can assume the List is either archived or deleted.

I hope this proves useful. Please let me know if you have any follow-up questions.