beehiiv · Capability

API Reference — subpackage_webhooks

API Reference — subpackage_webhooks. 5 operations. Lead operation: Create a webhook OAuth Scope: webhooks:write. Self-contained Naftiko capability covering one Beehiiv business surface.

Run with Naftiko Beehiivsubpackage_webhooks

What You Can Do

POST
Create — Create a webhook OAuth Scope: webhooks:write
/v1/publications/{publicationid}/webhooks
GET
Index — List webhooks OAuth Scope: webhooks:read
/v1/publications/{publicationid}/webhooks
GET
Show — Get webhook OAuth Scope: webhooks:read
/v1/publications/{publicationid}/webhooks/{endpointid}
PATCH
Update — Update webhook OAuth Scope: webhooks:write
/v1/publications/{publicationid}/webhooks/{endpointid}
DELETE
Delete — Delete a webhook OAuth Scope: webhooks:write
/v1/publications/{publicationid}/webhooks/{endpointid}

MCP Tools

create-webhook-badge-intent-info-minimal

Create a webhook OAuth Scope: webhooks:write

list-webhooks-badge-intent-info-minimal

List webhooks OAuth Scope: webhooks:read

read-only idempotent
get-webhook-badge-intent-info-minimal

Get webhook OAuth Scope: webhooks:read

read-only idempotent
update-webhook-badge-intent-info-minimal

Update webhook OAuth Scope: webhooks:write

idempotent
delete-webhook-badge-intent-info-minimal

Delete a webhook OAuth Scope: webhooks:write

idempotent

Capability Spec

beehiiv-subpackage-webhooks.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: API Reference — subpackage_webhooks
  description: 'API Reference — subpackage_webhooks. 5 operations. Lead operation: Create a webhook <Badge intent="info" minimal
    outlined>OAuth Scope: webhooks:write</Badge>. 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 <Badge intent="info" minimal outlined>OAuth Scope: webhooks: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 webhooks <Badge intent="info" minimal outlined>OAuth Scope: webhooks: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: 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 <Badge intent="info" minimal outlined>OAuth Scope: webhooks: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: 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 <Badge intent="info" minimal outlined>OAuth Scope: webhooks: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: 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 <Badge intent="info" minimal outlined>OAuth Scope: webhooks: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: 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 <Badge intent="info" minimal outlined>OAuth Scope: webhooks:write</Badge>'
        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 <Badge intent="info" minimal outlined>OAuth Scope: webhooks:read</Badge>'
        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 <Badge intent="info" minimal outlined>OAuth Scope: webhooks:read</Badge>'
        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 <Badge intent="info" minimal outlined>OAuth Scope: webhooks:write</Badge>'
        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 <Badge intent="info" minimal outlined>OAuth Scope: webhooks:write</Badge>'
        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 <Badge intent="info" minimal outlined>OAuth Scope: webhooks:write</Badge>'
      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 <Badge intent="info" minimal outlined>OAuth Scope: webhooks:read</Badge>'
      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 <Badge intent="info" minimal outlined>OAuth Scope: webhooks:read</Badge>'
      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 <Badge intent="info" minimal outlined>OAuth Scope: webhooks:write</Badge>'
      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 <Badge intent="info" minimal outlined>OAuth Scope: webhooks:write</Badge>'
      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: $.