naftiko: 1.0.0-alpha2 info: label: API Reference — subpackage_polls description: 'API Reference — subpackage_polls. 3 operations. Lead operation: List polls OAuth Scope: polls:read. Self-contained Naftiko capability covering one Beehiiv business surface.' tags: - Beehiiv - subpackage_polls 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-polls baseUri: https://api.beehiiv.com/v2 description: API Reference — subpackage_polls business capability. Self-contained, no shared references. resources: - name: publications-publicationId-polls path: /publications/{publicationId}/polls operations: - name: index method: GET description: 'List polls OAuth Scope: polls:read' 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: 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: cursor in: query type: string description: '**Cursor-based pagination (recommended)**: Use this opaque cursor token to fetch the next page of results. When provided, pagination will use cursor-based metho' - name: page in: query type: integer description: '**Offset-based pagination (deprecated)**: Page number for offset-based pagination. Please migrate to cursor-based pagination using the `cursor` parameter. If no' - name: order_by in: query type: string description: The field that the results are sorted by. Defaults to created.
`created` - The time the poll was created.
`name` - The name of the poll. - name: direction in: query type: string description: The direction that the results are sorted in. Defaults to asc.
`asc` - Ascending, sorts from smallest to largest.
`desc` - Descending, sorts from larges - name: expand[] in: query type: array description: 'Optionally expand the response to include additional data.
`stats` - Returns aggregate vote counts per choice and total completions.
`poll_responses` - ' - name: post_id in: query type: string description: Filter to only return polls that were embedded in the specified post. Accepts a prefixed post ID (e.g. `post_abc123`). - name: Authorization in: header type: string description: Bearer authentication required: true - name: publications-publicationId-polls-pollId path: /publications/{publicationId}/polls/{pollId} operations: - name: show method: GET description: 'Get poll OAuth Scope: polls:read' 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: pollId in: path type: string description: The prefixed ID of the poll object required: true - name: expand[] in: query type: array description: 'Optionally expand the response to include additional data.
`stats` - Returns aggregate vote counts per choice and total completions.
`poll_responses` - ' - name: Authorization in: header type: string description: Bearer authentication required: true - name: publications-publicationId-polls-pollId-responses path: /publications/{publicationId}/polls/{pollId}/responses operations: - name: listresponses method: GET description: 'List poll responses OAuth Scope: polls:read' 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: pollId in: path type: string description: The prefixed ID of the poll object required: true - 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: cursor in: query type: string description: '**Cursor-based pagination (recommended)**: Use this opaque cursor token to fetch the next page of results.' - name: page in: query type: integer description: '**Offset-based pagination (deprecated)**: Page number for offset-based pagination.' - name: order_by in: query type: string description: The field that the results are sorted by. Defaults to created. - name: direction in: query type: string description: The direction that the results are sorted in. Defaults to asc.
`asc` - Ascending, sorts from smallest to largest.
`desc` - Descending, sorts from larges - name: expand[] in: query type: array description: Optionally expand the response to include additional data.
`post` - Returns the post title and publication date for the post where each response was collect - name: post_id in: query type: string description: Filter to only return responses collected via the specified post. Accepts a prefixed post ID (e.g. `post_abc123`). - 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-polls-rest port: 8080 description: REST adapter for API Reference — subpackage_polls. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/publications/{publicationid}/polls name: publications-publicationid-polls description: REST surface for publications-publicationId-polls. operations: - method: GET name: index description: 'List polls OAuth Scope: polls:read' call: beehiiv-subpackage-polls.index with: publicationId: rest.publicationId limit: rest.limit cursor: rest.cursor page: rest.page order_by: rest.order_by direction: rest.direction expand[]: rest.expand[] post_id: rest.post_id Authorization: rest.Authorization outputParameters: - type: object mapping: $. - path: /v1/publications/{publicationid}/polls/{pollid} name: publications-publicationid-polls-pollid description: REST surface for publications-publicationId-polls-pollId. operations: - method: GET name: show description: 'Get poll OAuth Scope: polls:read' call: beehiiv-subpackage-polls.show with: publicationId: rest.publicationId pollId: rest.pollId expand[]: rest.expand[] Authorization: rest.Authorization outputParameters: - type: object mapping: $. - path: /v1/publications/{publicationid}/polls/{pollid}/responses name: publications-publicationid-polls-pollid-responses description: REST surface for publications-publicationId-polls-pollId-responses. operations: - method: GET name: listresponses description: 'List poll responses OAuth Scope: polls:read' call: beehiiv-subpackage-polls.listresponses with: publicationId: rest.publicationId pollId: rest.pollId limit: rest.limit cursor: rest.cursor page: rest.page order_by: rest.order_by direction: rest.direction expand[]: rest.expand[] post_id: rest.post_id Authorization: rest.Authorization outputParameters: - type: object mapping: $. - type: mcp namespace: beehiiv-subpackage-polls-mcp port: 9090 transport: http description: MCP adapter for API Reference — subpackage_polls. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: list-polls-badge-intent-info-minimal description: 'List polls OAuth Scope: polls:read' hints: readOnly: true destructive: false idempotent: true call: beehiiv-subpackage-polls.index with: publicationId: tools.publicationId limit: tools.limit cursor: tools.cursor page: tools.page order_by: tools.order_by direction: tools.direction expand[]: tools.expand[] post_id: tools.post_id Authorization: tools.Authorization outputParameters: - type: object mapping: $. - name: get-poll-badge-intent-info-minimal description: 'Get poll OAuth Scope: polls:read' hints: readOnly: true destructive: false idempotent: true call: beehiiv-subpackage-polls.show with: publicationId: tools.publicationId pollId: tools.pollId expand[]: tools.expand[] Authorization: tools.Authorization outputParameters: - type: object mapping: $. - name: list-poll-responses-badge-intent-info description: 'List poll responses OAuth Scope: polls:read' hints: readOnly: true destructive: false idempotent: true call: beehiiv-subpackage-polls.listresponses with: publicationId: tools.publicationId pollId: tools.pollId limit: tools.limit cursor: tools.cursor page: tools.page order_by: tools.order_by direction: tools.direction expand[]: tools.expand[] post_id: tools.post_id Authorization: tools.Authorization outputParameters: - type: object mapping: $.