# GET contact API giving wrong response when ListId not available

**URL:** <https://community.hubspot.com/t/get-contact-api-giving-wrong-response-when-listid-not-available/97011>\
**Category:** APIs & Integrations\
**Tags:** developer\
**Created:** [January 3, 2024, 12:56pm UTC](https://community.hubspot.com/t/get-contact-api-giving-wrong-response-when-listid-not-available/97011 "2024-01-03T12:56:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![devphoenix](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/devphoenix/32/55778_2.png) [@devphoenix](https://community.hubspot.com/u/devphoenix)\
**Post date:** [January 3, 2024, 12:56pm UTC](https://community.hubspot.com/t/get-contact-api-giving-wrong-response-when-listid-not-available/97011/1 "2024-01-03T12:56:34Z")

</div>

Hi team,

I have encountered an issue where the GET contacts API is giving wrong response message.

API: [https://api.hubapi.com/contacts/v1/lists/1/contacts/all](https://api.hubapi.com/contacts/v1/lists/1/contacts/all)

Correct response when listId available but when listId is not present it still gives 200 response with empty contact.Ideally it should be 404 with response of `List Id not deleted` something like that.  
Reference recording : [Private claap](https://app.claap.io/brevo-1/hub-spot-issue-c-3YfMIiN6mG-u7j7sFTEMef0)  
Can you please fix this issue in your API.  
Thanks

---

<div class="post-metadata">

**Author:** ![MiaSrebrnjak](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/miasrebrnjak/32/10_2.png) [@MiaSrebrnjak](https://community.hubspot.com/u/MiaSrebrnjak)\
**Post date:** [January 4, 2024, 6:12pm UTC](https://community.hubspot.com/t/get-contact-api-giving-wrong-response-when-listid-not-available/97011/2 "2024-01-04T18:12:21Z")

</div>

Hi @devphoenix,

Thank you for reaching out to the Community!

I’ve asked our technical team for advice and it seems that you are using a [legacy](https://legacydocs.hubspot.com/docs/methods/lists/get_list_contacts) endpoint (v1).

Could you try using a more recent endpoint (v3) and see if the problem persists? [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api/crm/lists)

Thank you,

Mia, Community team

---

<div class="post-metadata">

**Author:** ![devphoenix](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/devphoenix/32/55778_2.png) [@devphoenix](https://community.hubspot.com/u/devphoenix)\
**Post date:** [January 8, 2024, 7:34am UTC](https://community.hubspot.com/t/get-contact-api-giving-wrong-response-when-listid-not-available/97011/3 "2024-01-08T07:34:33Z")

</div>

Hi @MiaSrebrnjak

Thanks for the response, may you please share the latest API postman curl.  
Also, please share the correct API which I can use to achieve the same goal to fetch all the contacts from a specific list.

Thanks

---

<div class="post-metadata">

**Author:** ![devphoenix](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/devphoenix/32/55778_2.png) [@devphoenix](https://community.hubspot.com/u/devphoenix)\
**Post date:** [March 4, 2024, 10:52am UTC](https://community.hubspot.com/t/get-contact-api-giving-wrong-response-when-listid-not-available/97011/4 "2024-03-04T10:52:49Z")

</div>

any update?

---

<div class="post-metadata">

**Author:** ![devphoenix](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/devphoenix/32/55778_2.png) [@devphoenix](https://community.hubspot.com/u/devphoenix)\
**Post date:** [January 11, 2024, 11:55am UTC](https://community.hubspot.com/t/get-contact-api-giving-wrong-response-when-listid-not-available/97011/5 "2024-01-11T11:55:48Z")

</div>

Any update???
