Add/Remove contacts to/from lists API responses

Highlighted
Occasional Contributor

So I am using the add API (in conjunction with the remove API) to manage contacts in lists.

 

https://developers.hubspot.com/docs/methods/lists/add_contact_to_list

 

But there are something I don't understand. I only understand 'updated' from the response

 

{ 
    updated: [],
    discarded: [],
    invalidVids: [],
    invalidEmails: [] 
}

because that's what you have explained in the page. What about the others? It is likely I need to work on the contacts/emails listed under the others.

 

Edit: Just want to add, I can guess or trial and error what could those list mean and I already have some rough idea to what they mean. It is of course much better I got a more official explanation rather than me trying my luck.

 

Thanks,

 

 

Reply
0 Upvotes
1 Reply 1
HubSpot Moderator

Hi @phena109 , I can speak to the updated, invalidEmails, and invalidVids properties, but am getting clarification on the discarded property now.

  • The updated array stores the vids of the contacts that were added (or removed) from the list.
  • The invalidVids array stores the vids of contacts that don't exist in your account and thus were not added/removed from the list if you tried to add contacts to the lists via vid.
  • The invalidEmail array stores the emails of contacts that don't exist in your account and thus were not added/removed from the list if you tried to add contacts to the lists via email.

I'll get you info on the discarded array as soon as I find out more