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.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"publication_id": "<publication_id>",
"segment_id": "<segment_id>"
},
"name": "get_segment"
}
}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 |