Get segment
get_segmentFetch a Beehiiv segment by publication and segment ID to read its data, with optional stats expansion for recently calculated segment metrics.
Instructions
Get segment. Reads account data. OAuth integrations require segments:read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expand | No | Optionally expand the response to include additional data. `stats` - Requests the most recently calculated statistics for a segment. Segment stats are recalculated once daily around 7 a.m. UTC for dynamic segments, but can be manually recalculated at any time in the dashboard. Manual and static segments only calculate once upon upload or creation. | |
| account | No | Named private account from BEEHIIV_ACCOUNTS. Defaults to BEEHIIV_DEFAULT_ACCOUNT or the first configured account. | |
| segment_id | Yes | The prefixed ID of the segment object | |
| publication_id | Yes | The prefixed ID of the publication object |