Get subscription by ID
get_subscriptionFetch a Beehiiv subscription by publication and subscription ID to read account data; requires subscriptions:read and can expand stats, tags, referrals, or custom fields.
Instructions
Get subscription by ID. Reads account data. OAuth integrations require subscriptions:read.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| expand | No | Optional list of expandable objects. `subscription_premium_tiers` - Returns an array of tiers the subscription is associated with. `referrals` - Returns an array of subscriptions with limited data - `id`, `email`, and `status`. These are the subscriptions that were referred by this subscription. `stats` - Returns statistics about the subscription(s). `custom_fields` - Returns an array of custom field values that have been set on the subscription. `tags` - Returns an array of tags that have been set on the subscription. `newsletter_lists` - Returns an array of newsletter list prefixed IDs the subscription is actively subscribed to. | |
| account | No | Named private account from BEEHIIV_ACCOUNTS. Defaults to BEEHIIV_DEFAULT_ACCOUNT or the first configured account. | |
| publication_id | Yes | The prefixed ID of the publication object | |
| subscription_id | Yes | The prefixed ID of the subscription object |