naftiko: 1.0.0-alpha2 info: label: API Reference — subpackage_webhooks description: 'API Reference — subpackage_webhooks. 5 operations. Lead operation: Create a webhook OAuth Scope: webhooks:write. Self-contained Naftiko capability covering one Beehiiv business surface.' tags: - Beehiiv - subpackage_webhooks 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-webhooks baseUri: https://api.beehiiv.com/v2 description: API Reference — subpackage_webhooks business capability. Self-contained, no shared references. resources: - name: publications-publicationId-webhooks path: /publications/{publicationId}/webhooks operations: - name: create method: POST description: 'Create a webhook OAuth Scope: webhooks:write' 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 webhooks OAuth Scope: webhooks: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: Authorization in: header type: string description: Bearer authentication required: true - name: publications-publicationId-webhooks-endpointId path: /publications/{publicationId}/webhooks/{endpointId} operations: - name: show method: GET description: 'Get webhook OAuth Scope: webhooks: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: endpointId in: path type: string description: The prefixed ID of the webhook object required: true - name: Authorization in: header type: string description: Bearer authentication required: true - name: update method: PATCH description: 'Update webhook OAuth Scope: webhooks:write' 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: endpointId in: path type: string description: The prefixed ID of the webhook 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: delete method: DELETE description: 'Delete a webhook OAuth Scope: webhooks:write' 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: endpointId in: path type: string description: The prefixed ID of the webhook 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-webhooks-rest port: 8080 description: REST adapter for API Reference — subpackage_webhooks. One Spectral-compliant resource per consumed operation, prefixed with /v1. resources: - path: /v1/publications/{publicationid}/webhooks name: publications-publicationid-webhooks description: REST surface for publications-publicationId-webhooks. operations: - method: POST name: create description: 'Create a webhook OAuth Scope: webhooks:write' call: beehiiv-subpackage-webhooks.create with: publicationId: rest.publicationId Authorization: rest.Authorization body: rest.body outputParameters: - type: object mapping: $. - method: GET name: index description: 'List webhooks OAuth Scope: webhooks:read' call: beehiiv-subpackage-webhooks.index with: publicationId: rest.publicationId limit: rest.limit Authorization: rest.Authorization outputParameters: - type: object mapping: $. - path: /v1/publications/{publicationid}/webhooks/{endpointid} name: publications-publicationid-webhooks-endpointid description: REST surface for publications-publicationId-webhooks-endpointId. operations: - method: GET name: show description: 'Get webhook OAuth Scope: webhooks:read' call: beehiiv-subpackage-webhooks.show with: publicationId: rest.publicationId endpointId: rest.endpointId Authorization: rest.Authorization outputParameters: - type: object mapping: $. - method: PATCH name: update description: 'Update webhook OAuth Scope: webhooks:write' call: beehiiv-subpackage-webhooks.update with: publicationId: rest.publicationId endpointId: rest.endpointId Authorization: rest.Authorization body: rest.body outputParameters: - type: object mapping: $. - method: DELETE name: delete description: 'Delete a webhook OAuth Scope: webhooks:write' call: beehiiv-subpackage-webhooks.delete with: publicationId: rest.publicationId endpointId: rest.endpointId Authorization: rest.Authorization outputParameters: - type: object mapping: $. - type: mcp namespace: beehiiv-subpackage-webhooks-mcp port: 9090 transport: http description: MCP adapter for API Reference — subpackage_webhooks. One tool per consumed operation, routed inline through this capability's consumes block. tools: - name: create-webhook-badge-intent-info-minimal description: 'Create a webhook OAuth Scope: webhooks:write' hints: readOnly: false destructive: false idempotent: false call: beehiiv-subpackage-webhooks.create with: publicationId: tools.publicationId Authorization: tools.Authorization body: tools.body outputParameters: - type: object mapping: $. - name: list-webhooks-badge-intent-info-minimal description: 'List webhooks OAuth Scope: webhooks:read' hints: readOnly: true destructive: false idempotent: true call: beehiiv-subpackage-webhooks.index with: publicationId: tools.publicationId limit: tools.limit Authorization: tools.Authorization outputParameters: - type: object mapping: $. - name: get-webhook-badge-intent-info-minimal description: 'Get webhook OAuth Scope: webhooks:read' hints: readOnly: true destructive: false idempotent: true call: beehiiv-subpackage-webhooks.show with: publicationId: tools.publicationId endpointId: tools.endpointId Authorization: tools.Authorization outputParameters: - type: object mapping: $. - name: update-webhook-badge-intent-info-minimal description: 'Update webhook OAuth Scope: webhooks:write' hints: readOnly: false destructive: false idempotent: true call: beehiiv-subpackage-webhooks.update with: publicationId: tools.publicationId endpointId: tools.endpointId Authorization: tools.Authorization body: tools.body outputParameters: - type: object mapping: $. - name: delete-webhook-badge-intent-info-minimal description: 'Delete a webhook OAuth Scope: webhooks:write' hints: readOnly: false destructive: true idempotent: true call: beehiiv-subpackage-webhooks.delete with: publicationId: tools.publicationId endpointId: tools.endpointId Authorization: tools.Authorization outputParameters: - type: object mapping: $.