<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: removing contact from a list in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/removing-contact-from-a-list/m-p/979771#M73775</link>
    <description>&lt;P&gt;Hey, &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/731496"&gt;@Prakashreddy&lt;/a&gt;&lt;/SPAN&gt; &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; You are correct. Active (dynamic) lists use filters to include or exclude objects. You cannot delete contacts, for example, from an active list.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jaycee&lt;/P&gt;</description>
    <pubDate>Tue, 21 May 2024 14:35:31 GMT</pubDate>
    <dc:creator>Jaycee_Lewis</dc:creator>
    <dc:date>2024-05-21T14:35:31Z</dc:date>
    <item>
      <title>removing contact from a list</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/removing-contact-from-a-list/m-p/979571#M73760</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have a list with name "Verdict - Membership and Subscription Data" with list id 17945.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i am trying to delist a contact from thelist using api.. below is the code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$curl = curl_init();&lt;BR /&gt;curl_setopt_array($curl, array(&lt;BR /&gt;CURLOPT_URL =&amp;gt; "&lt;A href="https://api.hubapi.com/crm/v3/lists/" target="_blank" rel="noopener"&gt;https://api.hubapi.com/crm/v3/lists/&lt;/A&gt;".$list_id."/memberships/remove",&lt;BR /&gt;CURLOPT_RETURNTRANSFER =&amp;gt; true,&lt;BR /&gt;CURLOPT_ENCODING =&amp;gt; "",&lt;BR /&gt;CURLOPT_MAXREDIRS =&amp;gt; 10,&lt;BR /&gt;CURLOPT_TIMEOUT =&amp;gt; 30,&lt;BR /&gt;CURLOPT_HTTP_VERSION =&amp;gt; CURL_HTTP_VERSION_1_1,&lt;BR /&gt;CURLOPT_CUSTOMREQUEST =&amp;gt; "PUT",&lt;BR /&gt;CURLOPT_POSTFIELDS =&amp;gt;"[".$contact_id."]",&lt;BR /&gt;CURLOPT_HTTPHEADER =&amp;gt; array(&lt;BR /&gt;"Authorization: Bearer ".$hubspot_auth,&lt;BR /&gt;"accept: application/json",&lt;BR /&gt;"content-type: application/json"&lt;BR /&gt;),&lt;BR /&gt;));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i m reciving the below error. do we need any permissions to perform this action pls helpme&lt;/P&gt;&lt;PRE&gt;{"status":"error","message":"List does not exist with ID 17945.","correlationId":"fa79155b-974f-4c6b-9ae8-97af40ac9bb3","context":{"listId":["17945"]},"category":"OBJECT_NOT_FOUND","subCategory":"ListError.LIST_ID_DOES_NOT_EXIST"}&lt;BR /&gt;&lt;BR /&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 09:40:16 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/removing-contact-from-a-list/m-p/979571#M73760</guid>
      <dc:creator>Prakashreddy</dc:creator>
      <dc:date>2024-05-21T09:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: removing contact from a list</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/removing-contact-from-a-list/m-p/979733#M73771</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/731496"&gt;@Prakashreddy&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hiow's it going?&lt;/P&gt;&lt;P&gt;Here are a few steps to troubleshoot your current approach:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Verify List ID:&lt;/STRONG&gt; Ensure that the list ID 17945 is correct. You can do this by checking the list in your HubSpot account.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;API Endpoint and Payload:&lt;/STRONG&gt; The API endpoint and the payload need to be correctly formatted. Specifically, the contact ID should be in a JSON array format.&lt;/P&gt;&lt;/LI&gt;&lt;LI&gt;&lt;P&gt;&lt;STRONG&gt;Permissions:&lt;/STRONG&gt; Ensure that your HubSpot API token has the necessary permissions to modify lists and contacts.&lt;/P&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Here is an updated version of your code:&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;&amp;lt;?php&lt;/P&gt;&lt;P&gt;$list_id = "17945"; // Ensure this is the correct list ID&lt;BR /&gt;$contact_id = "CONTACT_ID_HERE"; // Replace with the actual contact ID&lt;BR /&gt;$hubspot_auth = "YOUR_HUBSPOT_AUTH_TOKEN"; // Your HubSpot API token&lt;/P&gt;&lt;P&gt;$curl = curl_init();&lt;/P&gt;&lt;P&gt;curl_setopt_array($curl, array(&lt;BR /&gt;CURLOPT_URL =&amp;gt; "&lt;A href="https://api.hubapi.com/contacts/v1/lists/$list_id/remove" target="_blank"&gt;https://api.hubapi.com/contacts/v1/lists/$list_id/remove&lt;/A&gt;",&lt;BR /&gt;CURLOPT_RETURNTRANSFER =&amp;gt; true,&lt;BR /&gt;CURLOPT_ENCODING =&amp;gt; "",&lt;BR /&gt;CURLOPT_MAXREDIRS =&amp;gt; 10,&lt;BR /&gt;CURLOPT_TIMEOUT =&amp;gt; 30,&lt;BR /&gt;CURLOPT_HTTP_VERSION =&amp;gt; CURL_HTTP_VERSION_1_1,&lt;BR /&gt;CURLOPT_CUSTOMREQUEST =&amp;gt; "POST",&lt;BR /&gt;CURLOPT_POSTFIELDS =&amp;gt; json_encode(array("vids" =&amp;gt; array($contact_id))),&lt;BR /&gt;CURLOPT_HTTPHEADER =&amp;gt; array(&lt;BR /&gt;"Authorization: Bearer $hubspot_auth",&lt;BR /&gt;"accept: application/json",&lt;BR /&gt;"content-type: application/json"&lt;BR /&gt;),&lt;BR /&gt;));&lt;/P&gt;&lt;P&gt;$response = curl_exec($curl);&lt;BR /&gt;$err = curl_error($curl);&lt;/P&gt;&lt;P&gt;curl_close($curl);&lt;/P&gt;&lt;P&gt;if ($err) {&lt;BR /&gt;echo "cURL Error #:" . $err;&lt;BR /&gt;} else {&lt;BR /&gt;echo $response;&lt;BR /&gt;}&lt;BR /&gt;?&amp;gt;&lt;/P&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;&lt;UL&gt;&lt;LI&gt;&lt;STRONG&gt;Endpoint:&lt;/STRONG&gt; Use /contacts/v1/lists/:list_id/remove for the removal action.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Payload:&lt;/STRONG&gt; The contact ID should be sent in a JSON format as an array under the key vids.&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;Method:&lt;/STRONG&gt; Use POST instead of PUT for this specific action.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hopefully this helps track down the issue.&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good luck,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;James - CEO&amp;nbsp;@&amp;nbsp;&lt;/SPAN&gt;&lt;A href="http://www.portant.co/" target="_blank" rel="noopener nofollow noreferrer"&gt;Portant&lt;BR /&gt;&lt;/A&gt;&lt;BR /&gt;&lt;STRONG&gt;Portant App for HubSpot:&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;A href="https://ecosystem.hubspot.com/marketplace/apps/sales/sales-enablement/portant-hubspot-google-docs-integration" target="_blank" rel="noopener noreferrer"&gt;https://ecosystem.hubspot.com/marketplace/apps/sales/sales-enablement/portant-hubspot-google-docs-in...&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 13:42:07 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/removing-contact-from-a-list/m-p/979733#M73771</guid>
      <dc:creator>james-portant</dc:creator>
      <dc:date>2024-05-21T13:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: removing contact from a list</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/removing-contact-from-a-list/m-p/979767#M73774</link>
      <description>&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i found 17945 list id type is dynamic..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;can we remove contact from a dynamic list using api.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;in one article i found we cann not remove contacts from a dynamic list..&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;pls confirm&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 14:29:43 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/removing-contact-from-a-list/m-p/979767#M73774</guid>
      <dc:creator>Prakashreddy</dc:creator>
      <dc:date>2024-05-21T14:29:43Z</dc:date>
    </item>
    <item>
      <title>Re: removing contact from a list</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/removing-contact-from-a-list/m-p/979771#M73775</link>
      <description>&lt;P&gt;Hey, &lt;SPAN style="background: var(--ck-color-mention-background); color: var(--ck-color-mention-text);"&gt;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/731496"&gt;@Prakashreddy&lt;/a&gt;&lt;/SPAN&gt; &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; You are correct. Active (dynamic) lists use filters to include or exclude objects. You cannot delete contacts, for example, from an active list.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Jaycee&lt;/P&gt;</description>
      <pubDate>Tue, 21 May 2024 14:35:31 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/removing-contact-from-a-list/m-p/979771#M73775</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2024-05-21T14:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: removing contact from a list</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/removing-contact-from-a-list/m-p/980348#M73796</link>
      <description>&lt;P&gt;i executed the code what u gave i got below response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;{"status":"error","message":"Api[name=inbounddb.listseg, httpMethod=POST, subPath=/inbounddb-lists/v1/static-lists/validated, correlationId=717ff9b3-e3df-4311-be95-5792b9292e03] Failed to process your request. Error code was '400'. Error message was:\n{\"status\":\"error\",\"message\":\"List 27808 has processing type DYNAMIC which is not allowed to be used in manual membership update processes.\",\"correlationId\":\"717ff9b3-e3df-4311-be95-5792b9292e03\"}","correlationId":"717ff9b3-e3df-4311-be95-5792b9292e03"}{"status":"error","message":"Api[name=inbounddb.listseg, httpMethod=POST, subPath=/inbounddb-lists/v1/static-lists/validated, correlationId=717ff9b3-e3df-4311-be95-5792b9292e03] Failed to process your request. Error code was '400'. Error message was:\n{\"status\":\"error\",\"message\":\"List 27808 has processing type DYNAMIC which is not allowed to be used in manual membership update processes.\",\"correlationId\":\"717ff9b3-e3df-4311-be95-5792b9292e03\"}","correlationId":"717ff9b3-e3df-4311-be95-5792b9292e03"}

&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my question is why in the response it mentioned&amp;nbsp;&amp;nbsp;List 27808&lt;/P&gt;&lt;P&gt;my list id is 17945 and i&amp;nbsp; passed 17945 to the request.. is 27808 internal some reference number for that list id&lt;/P&gt;</description>
      <pubDate>Wed, 22 May 2024 12:22:25 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/removing-contact-from-a-list/m-p/980348#M73796</guid>
      <dc:creator>Prakashreddy</dc:creator>
      <dc:date>2024-05-22T12:22:25Z</dc:date>
    </item>
  </channel>
</rss>

