Howdy!
How do I check if a user is globally suppressed with an API call?
From the documentation it looks like the /api/v2/list/{list_id}/get-list-subscription should be able to handle this but the user is still returned even though the user is globally suppressed :/
The api endpoint /api/v1/people/exclusions sees the user as being globally but this endpoint will not scale well to find if a single user is unsuppressed as the number of users grows.
And the $consent array on the profile object appears to be useless for this.
What is the correct way of solving this?
Checking if a user is suppressed?

Best answer by Chuck Curtis
Hi Henrik,
Thank you for the additional details!
I had to check with our dev team to confirm the expected behavior of the /v2/list/{list_id}/get-list-subscriptions (ie ListsSegments.get_list_subscriptions) endpoint and they confirmed that it is expected with this version of the API that the endpoint will return the profiles that are on the list, even if the profiles are globally suppressed for email. The endpoint will not return the profile if it is not on the list.
We acknowledge that this is not intuitive and we will be addressing this in future iterations of the Klaviyo APIs. I've also shared this with our documentation team to clarify the confusion well.
As for the suppressed segment timing, there can be a delay of up to 15 minutes between when a profile is added to a segment, and when the APIs will reflect the new addition. Though it is a great workaround!
As you mentioned, using the Metrics API will generally not have this same lag period.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.