1

Some of my members share a specific tag I have assigned them - ie: tag123

What api command can I use to retrieve all members who have this tag assigned to them?

Paul Preibisch
  • 4,115
  • 2
  • 27
  • 32

2 Answers2

1

You can't use /search_members end point to do that. That endpoint only searches in email, FNAME and LNAME. You need to get all members in your list, and after that search in your php script or whatever.

Striped
  • 2,544
  • 3
  • 25
  • 31
0

You can try using the search-members GET API call with the specific tag set in the query field. (More on https://developer.mailchimp.com/documentation/mailchimp/reference/search-members/#read-get_search_members)

e.g.

curl --request GET \
--url 'https://usX.api.mailchimp.com/3.0/search-members?query=tag123' \
--user 'anystring:apikey' \
--include
Josip Kolarić
  • 456
  • 1
  • 7
  • 21