# Removing contact from list returns error 500 - internal error

**URL:** <https://community.hubspot.com/t/removing-contact-from-list-returns-error-500-internal-error/70431>\
**Category:** APIs & Integrations\
**Created:** [December 2, 2022, 12:04pm UTC](https://community.hubspot.com/t/removing-contact-from-list-returns-error-500-internal-error/70431 "2022-12-02T12:04:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![buusing](https://avatars.discourse-cdn.com/v4/letter/b/34f0e0/32.png) [@buusing](https://community.hubspot.com/u/buusing)\
**Post date:** [December 2, 2022, 12:04pm UTC](https://community.hubspot.com/t/removing-contact-from-list-returns-error-500-internal-error/70431/1 "2022-12-02T12:04:20Z")

</div>

When trying to remove a contact from a list via the api described here:  
[https://legacydocs.hubspot.com/docs/methods/lists/remove\_contact\_from\_list](https://legacydocs.hubspot.com/docs/methods/lists/remove_contact_from_list)

- the endpoint return an error 500 - internal error.

I have tried using both the old and new PHP libraries:

> **[GitHub - HubSpot/hubspot-api-php: HubSpot API PHP Client Libraries for V3 version of...](https://github.com/HubSpot/hubspot-api-php)**
>
> HubSpot API PHP Client Libraries for V3 version of the API

> **[GitHub - HubSpot/hubspot-php: HubSpot PHP API Client](https://github.com/HubSpot/hubspot-php)**
>
> HubSpot PHP API Client

as well as raw curl request:

```lia-code-sample
curl --location --request POST 'https://api.hubapi.com/contacts/v1/lists/14/remove' \
--header 'Authorization: Bearer xxxxxxxxxxxxx' \
--header 'Content-Type: application/json' \
--data-raw '{
 "vids": [10427501]
}'

```

Am i missing something, or is the endpoint broken ?

---

<div class="post-metadata">

**Author:** ![coldrickjack](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/coldrickjack/32/6684_2.png) [@coldrickjack](https://community.hubspot.com/u/coldrickjack)\
**Post date:** [December 2, 2022, 12:09pm UTC](https://community.hubspot.com/t/removing-contact-from-list-returns-error-500-internal-error/70431/2 "2022-12-02T12:09:51Z")

</div>

Hey ,

Is the list an dynamic or static list? You cannot programmatically remove contacts from dynamic lists only static lists. See below from documentation:

Please note that you cannot manually remove contacts to dynamic lists - they can only be updated by the contacts system based on the properties of the list itself. To determine whether a list is dynamic or static, when you [get a list, you will see a flag called `dynamic that equates to true or false.`](https://legacydocs.hubspot.com/docs/methods/lists/get_list?hsLang=en)

---

<div class="post-metadata">

**Author:** ![buusing](https://avatars.discourse-cdn.com/v4/letter/b/34f0e0/32.png) [@buusing](https://community.hubspot.com/u/buusing)\
**Post date:** [December 2, 2022, 12:23pm UTC](https://community.hubspot.com/t/removing-contact-from-list-returns-error-500-internal-error/70431/3 "2022-12-02T12:23:54Z")

</div>

Ahh that makes sense - forgot to check that.

Thanks for the quick answer.
