Generate post preview URL OAuth Scope: posts:read

Generate a URL to preview a post as a given audience. The returned preview_url renders the post in the beehiiv app and requires a beehiiv session with access to the publication - it is not itself an HTML-returning endpoint.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

publicationIdstringRequiredformat: "^(pub_[0-9a-fA-F\-]+)$"
The prefixed ID of the publication object
postIdstringRequiredformat: "^(post_[0-9a-fA-F\-]+)$"
The prefixed ID of the post object

Query parameters

platformstringOptional

email (default) or web.

subscriber_typestringOptional

free (default) or premium. premium requires tier_ids to be present. Ignored if subscriber_id is present.

tier_idslist of stringsOptional

One or more premium tier IDs to preview as. Only used when subscriber_type is premium. Ignored if subscriber_id is present.

subscriber_idstringOptionalformat: "^(sub_[0-9a-fA-F\-]+)$"

Preview using a specific subscriber’s real tier memberships. Takes precedence over subscriber_type/tier_ids when present.

Response

OK
dataobject

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error