I have successfully got scripts working to retrieve totals of contacts matching various criteria. These criteria include filtering by list, automations stage and tag.
However, when I try using segmentid I am unable to get the correct results. Debugging shows a null response for the id and using different ids always yields the total contacts in the database.
Did you work this out in the end? I’ve just been through the same issue with the guys at AC & the answer is calls with the segmentid param need to be made twice, first time to get the segment details & a second to retrieve the contacts matching that segment.
They’ve updated the API docs to make this clear now.
@atMaarten - If you’re still having issues with this API call, please email our support team with your account name and full details on what you’re trying. They can assist ya then. Thanks!