beehiiv · Capability
API Reference — subpackage_posts
API Reference — subpackage_posts. 6 operations. Lead operation: Create post
What You Can Do
POST
Create
— Create post OAuth Scope: posts:write
/v1/publications/{publicationid}/posts
GET
Index
— List posts OAuth Scope: posts:read
/v1/publications/{publicationid}/posts
GET
Aggregatestats
— Get aggregate stats OAuth Scope: posts:read
/v1/publications/{publicationid}/posts/aggregate-stats
PATCH
Update
— Update post OAuth Scope: posts:write
/v1/publications/{publicationid}/posts/{postid}
GET
Show
— Get post OAuth Scope: posts:read
/v1/publications/{publicationid}/posts/{postid}
DELETE
Delete
— Delete post OAuth Scope: posts:write
/v1/publications/{publicationid}/posts/{postid}
MCP Tools
create-post-badge-intent-info-minimal
Create post
list-posts-badge-intent-info-minimal
List posts
read-only
idempotent
get-aggregate-stats-badge-intent-info
Get aggregate stats
read-only
idempotent
update-post-badge-intent-info-minimal
Update post
idempotent
get-post-badge-intent-info-minimal
Get post
read-only
idempotent
delete-post-badge-intent-info-minimal
Delete post
idempotent
Capability Spec
naftiko: 1.0.0-alpha2
info:
label: API Reference — subpackage_posts
description: 'API Reference — subpackage_posts. 6 operations. Lead operation: Create post <Badge intent="info" minimal outlined>OAuth
Scope: posts:write</Badge>. Self-contained Naftiko capability covering one Beehiiv business surface.'
tags:
- Beehiiv
- subpackage_posts
created: '2026-05-19'
modified: '2026-05-19'
binds:
- namespace: env
keys:
BEEHIIV_API_KEY: BEEHIIV_API_KEY
capability:
consumes:
- type: http
namespace: beehiiv-subpackage-posts
baseUri: https://api.beehiiv.com/v2
description: API Reference — subpackage_posts business capability. Self-contained, no shared references.
resources:
- name: publications-publicationId-posts
path: /publications/{publicationId}/posts
operations:
- name: create
method: POST
description: 'Create post <Badge intent="info" minimal outlined>OAuth Scope: posts:write</Badge>'
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: publicationId
in: path
type: string
description: The prefixed ID of the publication object
required: true
- name: Authorization
in: header
type: string
description: Bearer authentication
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: false
- name: index
method: GET
description: 'List posts <Badge intent="info" minimal outlined>OAuth Scope: posts:read</Badge>'
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: publicationId
in: path
type: string
description: The prefixed ID of the publication object
required: true
- name: expand
in: query
type: array
description: Optionally expand the results by adding additional information. <br>`stats` - Adds statistics about
the post(s). <br>`free_web_content` - Adds the web HTML rend
- name: audience
in: query
type: string
description: Optionally filter the results by audience
- name: platform
in: query
type: string
description: Optionally filter the results by platform.<br>`web` - Posts only published to web.<br>`email` - Posts
only published to email.<br>`both` - Posts published to em
- name: status
in: query
type: string
description: Optionally filter the results by the status of the post.<br>`draft` - not been scheduled.<br>`confirmed`
- The post will be active after the `scheduled_at`.<br>
- name: content_tags[]
in: query
type: array
description: 'Optionally filter posts by content_tags. Adding a content tag will return any post with that content
tag associated to it.<br><br><b>Example</b>: Filtering for '
- name: slugs[]
in: query
type: array
description: 'Optionally filter posts by their slugs. Adding a slug will return any post with that exact slug associated
to it.<br><br><b>Example:</b> Filtering for `slugs: ['
- name: authors[]
in: query
type: array
description: Optionally filter posts by their authors. Adding an author name will return any post with that author
associated to it (case-insensitive).<br><br><b>Example:</b
- name: premium_tiers
in: query
type: array
description: Optionally filter posts by audience based on premium tiers.<br> This takes in an array of Display Names
of the premium tiers.<br> It will also scope any expande
- name: limit
in: query
type: integer
description: A limit on the number of objects to be returned. The limit can range between 1 and 100, and the default
is 10.
- name: page
in: query
type: integer
description: 'Pagination returns the results in pages. Each page contains the number of results specified by the
`limit` (default: 10).<br>If not specified, results 1-10 from'
- name: order_by
in: query
type: string
description: The field that the results are sorted by. Defaults to created<br> `created` - The time in which the
post was first created.<br> `publish_date` - The time the po
- name: direction
in: query
type: string
description: The direction that the results are sorted in. Defaults to asc<br> `asc` - Ascending, sorts from smallest
to largest.<br> `desc` - Descending, sorts from largest
- name: hidden_from_feed
in: query
type: string
description: Optionally filter the results by the `hidden_from_feed` attribute of the post.<br>`all` - Does not
restrict results by `hidden_from_feed`.<br>`true` - Only retu
- name: Authorization
in: header
type: string
description: Bearer authentication
required: true
- name: publications-publicationId-posts-aggregate_stats
path: /publications/{publicationId}/posts/aggregate_stats
operations:
- name: aggregatestats
method: GET
description: 'Get aggregate stats <Badge intent="info" minimal outlined>OAuth Scope: posts:read</Badge>'
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: publicationId
in: path
type: string
description: The prefixed ID of the publication object
required: true
- name: audience
in: query
type: string
description: Optionally filter the results by audience
- name: platform
in: query
type: string
description: Optionally filter the results by platform.<br>`web` - Posts only published to web.<br>`email` - Posts
only published to email.<br>`both` - Posts published to em
- name: status
in: query
type: string
description: Optionally filter the results by the status of the post.<br>`draft` - not been scheduled.<br>`confirmed`
- The post will be active after the `scheduled_at`.<br>
- name: content_tags[]
in: query
type: array
description: 'Optionally filter posts by content_tags. Adding a content tag will return any post with that content
tag associated to it.<br>Example: Filtering for `content_ta'
- name: authors[]
in: query
type: array
description: Optionally filter posts by their authors. Adding an author name will return any post with that author
associated to it (case-insensitive).<br><br><b>Example:</b
- name: hidden_from_feed
in: query
type: string
description: Optionally filter the results by the `hidden_from_feed` attribute of the post.<br>`all` - Does not
restrict results by `hidden_from_feed`.<br>`true` - Only retu
- name: Authorization
in: header
type: string
description: Bearer authentication
required: true
- name: publications-publicationId-posts-postId
path: /publications/{publicationId}/posts/{postId}
operations:
- name: update
method: PATCH
description: 'Update post <Badge intent="info" minimal outlined>OAuth Scope: posts:write</Badge>'
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: publicationId
in: path
type: string
description: The prefixed ID of the publication object
required: true
- name: postId
in: path
type: string
description: The prefixed ID of the post to update
required: true
- name: Authorization
in: header
type: string
description: Bearer authentication
required: true
- name: body
in: body
type: object
description: Request body (JSON).
required: false
- name: show
method: GET
description: 'Get post <Badge intent="info" minimal outlined>OAuth Scope: posts:read</Badge>'
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: publicationId
in: path
type: string
description: The prefixed ID of the publication object
required: true
- name: postId
in: path
type: string
description: The prefixed ID of the post object
required: true
- name: expand
in: query
type: array
description: Optionally expand the results by adding additional information. <br>`stats` - Adds statistics about
the post(s). <br>`free_web_content` - Adds the web HTML rend
- name: premium_tiers
in: query
type: array
description: 'Scope any expanded content output to the specified premium tiers.<br> This takes in an array of Display
Names of the premium tiers.<br> Note: This is case insen'
- name: Authorization
in: header
type: string
description: Bearer authentication
required: true
- name: delete
method: DELETE
description: 'Delete post <Badge intent="info" minimal outlined>OAuth Scope: posts:write</Badge>'
outputRawFormat: json
outputParameters:
- name: result
type: object
value: $.
inputParameters:
- name: publicationId
in: path
type: string
description: The prefixed ID of the publication object
required: true
- name: postId
in: path
type: string
description: The prefixed ID of the post object
required: true
- name: Authorization
in: header
type: string
description: Bearer authentication
required: true
authentication:
type: bearer
token: '{{env.BEEHIIV_API_KEY}}'
exposes:
- type: rest
namespace: beehiiv-subpackage-posts-rest
port: 8080
description: REST adapter for API Reference — subpackage_posts. One Spectral-compliant resource per consumed operation,
prefixed with /v1.
resources:
- path: /v1/publications/{publicationid}/posts
name: publications-publicationid-posts
description: REST surface for publications-publicationId-posts.
operations:
- method: POST
name: create
description: 'Create post <Badge intent="info" minimal outlined>OAuth Scope: posts:write</Badge>'
call: beehiiv-subpackage-posts.create
with:
publicationId: rest.publicationId
Authorization: rest.Authorization
body: rest.body
outputParameters:
- type: object
mapping: $.
- method: GET
name: index
description: 'List posts <Badge intent="info" minimal outlined>OAuth Scope: posts:read</Badge>'
call: beehiiv-subpackage-posts.index
with:
publicationId: rest.publicationId
expand: rest.expand
audience: rest.audience
platform: rest.platform
status: rest.status
content_tags[]: rest.content_tags[]
slugs[]: rest.slugs[]
authors[]: rest.authors[]
premium_tiers: rest.premium_tiers
limit: rest.limit
page: rest.page
order_by: rest.order_by
direction: rest.direction
hidden_from_feed: rest.hidden_from_feed
Authorization: rest.Authorization
outputParameters:
- type: object
mapping: $.
- path: /v1/publications/{publicationid}/posts/aggregate-stats
name: publications-publicationid-posts-aggregate-stats
description: REST surface for publications-publicationId-posts-aggregate_stats.
operations:
- method: GET
name: aggregatestats
description: 'Get aggregate stats <Badge intent="info" minimal outlined>OAuth Scope: posts:read</Badge>'
call: beehiiv-subpackage-posts.aggregatestats
with:
publicationId: rest.publicationId
audience: rest.audience
platform: rest.platform
status: rest.status
content_tags[]: rest.content_tags[]
authors[]: rest.authors[]
hidden_from_feed: rest.hidden_from_feed
Authorization: rest.Authorization
outputParameters:
- type: object
mapping: $.
- path: /v1/publications/{publicationid}/posts/{postid}
name: publications-publicationid-posts-postid
description: REST surface for publications-publicationId-posts-postId.
operations:
- method: PATCH
name: update
description: 'Update post <Badge intent="info" minimal outlined>OAuth Scope: posts:write</Badge>'
call: beehiiv-subpackage-posts.update
with:
publicationId: rest.publicationId
postId: rest.postId
Authorization: rest.Authorization
body: rest.body
outputParameters:
- type: object
mapping: $.
- method: GET
name: show
description: 'Get post <Badge intent="info" minimal outlined>OAuth Scope: posts:read</Badge>'
call: beehiiv-subpackage-posts.show
with:
publicationId: rest.publicationId
postId: rest.postId
expand: rest.expand
premium_tiers: rest.premium_tiers
Authorization: rest.Authorization
outputParameters:
- type: object
mapping: $.
- method: DELETE
name: delete
description: 'Delete post <Badge intent="info" minimal outlined>OAuth Scope: posts:write</Badge>'
call: beehiiv-subpackage-posts.delete
with:
publicationId: rest.publicationId
postId: rest.postId
Authorization: rest.Authorization
outputParameters:
- type: object
mapping: $.
- type: mcp
namespace: beehiiv-subpackage-posts-mcp
port: 9090
transport: http
description: MCP adapter for API Reference — subpackage_posts. One tool per consumed operation, routed inline through
this capability's consumes block.
tools:
- name: create-post-badge-intent-info-minimal
description: 'Create post <Badge intent="info" minimal outlined>OAuth Scope: posts:write</Badge>'
hints:
readOnly: false
destructive: false
idempotent: false
call: beehiiv-subpackage-posts.create
with:
publicationId: tools.publicationId
Authorization: tools.Authorization
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: list-posts-badge-intent-info-minimal
description: 'List posts <Badge intent="info" minimal outlined>OAuth Scope: posts:read</Badge>'
hints:
readOnly: true
destructive: false
idempotent: true
call: beehiiv-subpackage-posts.index
with:
publicationId: tools.publicationId
expand: tools.expand
audience: tools.audience
platform: tools.platform
status: tools.status
content_tags[]: tools.content_tags[]
slugs[]: tools.slugs[]
authors[]: tools.authors[]
premium_tiers: tools.premium_tiers
limit: tools.limit
page: tools.page
order_by: tools.order_by
direction: tools.direction
hidden_from_feed: tools.hidden_from_feed
Authorization: tools.Authorization
outputParameters:
- type: object
mapping: $.
- name: get-aggregate-stats-badge-intent-info
description: 'Get aggregate stats <Badge intent="info" minimal outlined>OAuth Scope: posts:read</Badge>'
hints:
readOnly: true
destructive: false
idempotent: true
call: beehiiv-subpackage-posts.aggregatestats
with:
publicationId: tools.publicationId
audience: tools.audience
platform: tools.platform
status: tools.status
content_tags[]: tools.content_tags[]
authors[]: tools.authors[]
hidden_from_feed: tools.hidden_from_feed
Authorization: tools.Authorization
outputParameters:
- type: object
mapping: $.
- name: update-post-badge-intent-info-minimal
description: 'Update post <Badge intent="info" minimal outlined>OAuth Scope: posts:write</Badge>'
hints:
readOnly: false
destructive: false
idempotent: true
call: beehiiv-subpackage-posts.update
with:
publicationId: tools.publicationId
postId: tools.postId
Authorization: tools.Authorization
body: tools.body
outputParameters:
- type: object
mapping: $.
- name: get-post-badge-intent-info-minimal
description: 'Get post <Badge intent="info" minimal outlined>OAuth Scope: posts:read</Badge>'
hints:
readOnly: true
destructive: false
idempotent: true
call: beehiiv-subpackage-posts.show
with:
publicationId: tools.publicationId
postId: tools.postId
expand: tools.expand
premium_tiers: tools.premium_tiers
Authorization: tools.Authorization
outputParameters:
- type: object
mapping: $.
- name: delete-post-badge-intent-info-minimal
description: 'Delete post <Badge intent="info" minimal outlined>OAuth Scope: posts:write</Badge>'
hints:
readOnly: false
destructive: true
idempotent: true
call: beehiiv-subpackage-posts.delete
with:
publicationId: tools.publicationId
postId: tools.postId
Authorization: tools.Authorization
outputParameters:
- type: object
mapping: $.