ChristosC
ChristosC

Reputation: 31

How can i get all tags from a mailchimp audience using API v3?

I'm using mailchimp API v3 in my PHP project.
What is the best (and efficient) way to get all TAGS at once from an audience (list) as Mailchimp does at campaign creation?
Image 1
Any example?

Upvotes: 1

Views: 755

Answers (2)

City
City

Reputation: 31

$mailchimp->lists->listSegments($list_id)

returns array off tags + segments. better to use this

$mailchimp->lists->tagSearch($list_id)

Upvotes: 1

ChristosC
ChristosC

Reputation: 31

for all the people who might face the same problem (and pull their hair) the answer is simple is this:

$response = $mailchimp->lists->listSegments($list_id);
print_r($response);

the response contains all the tags from the specified list

Upvotes: 2

Related Questions