如何查找Mailchimp标签的segment id(API v3批量加标签场景)
Got it, let's break down exactly how to track down that segment ID you need for Mailchimp API v3—whether you prefer using the web dashboard or fetching it programmatically.
Finding Segment ID via the Mailchimp Web Dashboard
This is the quickest way if you're working manually:
- Log into your Mailchimp account and head to the Audience tab.
- Pick the specific audience you're targeting (skip this step if you only manage one audience).
- From the audience navigation menu, go to Manage Contacts > Segments.
- Locate the segment tied to your desired tag, then click its name to open the segment details page.
- Check your browser's address bar. You'll see a URL like
https://usX.admin.mailchimp.com/lists/12345/segments/67890/edit/—the number right after/segments/(in this example,67890) is your segment ID.
Fetching Segment ID via Mailchimp API v3
If you need to automate this or access IDs at scale, use the API directly:
- First, grab your Audience ID from your audience settings (under "Audience name and defaults"—it's a unique string like
us12-abcde12345). - Send a GET request to the segments endpoint, replacing
{audience_id}with your actual audience ID:GET /3.0/lists/{audience_id}/segments - Authenticate with your Mailchimp API key, formatted as
your_api_key:usX(whereusXmatches your account's server prefix, which is part of your API key). - In the JSON response, look for the
segmentsarray. Each segment object includes anidfield—that's the value you need for your tagging API calls.
Quick note: Remember that tags and segments are linked but not identical in Mailchimp. Double-check that the segment you're targeting is the one associated with the tag you want to apply to subscribers.
内容的提问来源于stack exchange,提问作者Nicole Hemenway
相关产品推荐
相关产品推荐

