Lists API - How to get only new added contacs

I’m looking at he lists api doc and I didn’t find a way to get only the new added contacts.

There is the “/crm/v3/lists/{listId}/memberships/join-order” but it will get all the members right? Ot is there a way to filter by joining date?

Hey, @RAraujo0 :waving_hand: This is a great question.

Looking at the available endpoints, I think this one is the closest we can get:

GET /crm/v3/lists/{listId}/memberships/join-order

It doesn’t filter by join date, but it does return the list members sorted by the order they are added. You’d still need to do the processing outside the request, but it will return the members of the list in the order they are added. From the documentation:

Fetch the memberships of a list in order sorted by the time the records were added to the list.

The recordIds are sorted in ascending order if an after offset or no offset is provided. If only a before offset is provided, then the records are sorted in descending order.

The after offset parameter will take precedence over the before offset in a case where both are provided.

You’ll need to track which contacts you’ve already processed and compare them on each request to identify new additions.

Best,

Jaycee

Hello @Jaycee_Lewis Thank you for your response.

With this endpoint I will need to fetch all the IDs and check which one is new right? Is there a way to fetch only the new added contacts or receive the new added IDs through a webhook for example? Otherwise I will need to keep hitting this endpoint from time to time to check the new contacts.