> ## Documentation Index
> Fetch the complete documentation index at: https://docs.botdog.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create webhook

> Create a webhook subscription. The signing secret is never returned.



## OpenAPI

````yaml /openapi.json post /v1/webhooks
openapi: 3.0.0
info:
  title: Botdog API
  description: |-
    API documentation for Botdog.

    **Authentication**: Pass your API key as the `x-api-key` header.
    Example: `x-api-key: bd_live_abc123`

    Do NOT use the `Authorization` header.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.botdog.co
    description: Production
security: []
tags:
  - name: campaigns
    description: >-
      Create, read, update, and control campaigns (pause/resume, pause
      activities, archive, delete).
  - name: leads
    description: >-
      List and filter leads, read full detail + event history, update metadata,
      add to a campaign, or stop a sequence.
  - name: lists
    description: Manage lead/audience lists and their members.
  - name: blacklist
    description: Manage suppression lists (excluded profiles).
  - name: snippets
    description: Manage message snippets / templates.
  - name: accounts
    description: >-
      Connected LinkedIn accounts (seats), their connection health, and daily
      sending limits.
  - name: webhooks
    description: Manage webhook subscriptions.
  - name: messaging
    description: >-
      Send messages and replies, schedule a future send, and mark conversations
      read/unread. Rate-limited per sending account.
  - name: analytics
    description: Team-level analytics totals, daily breakdowns, and per-user metrics.
  - name: users
    description: Read the users in your team.
  - name: teams
    description: Current team context.
  - name: health
    description: Service health checks (no authentication).
paths:
  /v1/webhooks:
    post:
      tags:
        - webhooks
      summary: Create webhook
      description: Create a webhook subscription. The signing secret is never returned.
      operationId: WebhooksController_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookDto'
        '401':
          description: Unauthorized. API key is missing or invalid.
        '429':
          description: Rate limit exceeded. Retry after cooldown.
      security:
        - api-key: []
components:
  schemas:
    CreateWebhookDto:
      type: object
      properties:
        name:
          type: string
          description: A human-readable name for the webhook
        endpoint:
          type: string
          description: The URL that will receive event notifications (POST)
          example: https://example.com/hooks/botdog
        eventTypes:
          type: array
          description: The event types to subscribe to
          items:
            type: string
            enum:
              - CAMPAIGN_STARTED
              - CAMPAIGN_COMPLETED
              - LEAD_PROFILE_VISITED
              - LEAD_INVITATION_SENT
              - LEAD_INVITATION_ACCEPTED
              - LEAD_MESSAGE_SENT
              - LEAD_MESSAGE_REPLIED
              - LEAD_INVITATION_WITHDRAWN
              - LEAD_SKIPPED
              - ACCOUNT_DISCONNECTED
              - DAILY_LIMIT_REACHED
        campaignIds:
          description: 'Restrict delivery to specific campaign IDs (default: all)'
          type: array
          items:
            type: string
      required:
        - name
        - endpoint
        - eventTypes
    WebhookDto:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the webhook
        name:
          type: string
          description: A human-readable name for the webhook
        endpoint:
          type: string
          description: The URL that receives event notifications
          example: https://example.com/hooks/botdog
        status:
          type: string
          description: The webhook status
          example: ACTIVE
        scope:
          type: string
          description: 'Delivery scope: ALL campaigns or SPECIFIC_CAMPAIGNS'
          example: ALL
        type:
          type: string
          description: The webhook type
          example: GENERIC
        isTeamWebhook:
          type: boolean
          description: Whether the webhook is shared across the team
          example: false
        eventTypes:
          description: Event types this webhook is subscribed to
          example:
            - LEAD_INVITATION_ACCEPTED
            - LEAD_MESSAGE_REPLIED
          type: array
          items:
            type: string
        campaignIds:
          description: Campaign IDs this webhook is scoped to (empty when scope is ALL)
          type: array
          items:
            type: string
        createdAt:
          format: date-time
          type: string
          description: When the webhook was created
        updatedAt:
          format: date-time
          type: string
          description: When the webhook was last updated
      required:
        - id
        - name
        - endpoint
        - status
        - scope
        - type
        - isTeamWebhook
        - eventTypes
        - campaignIds
        - createdAt
        - updatedAt
  securitySchemes:
    api-key:
      type: apiKey
      in: header
      name: x-api-key
      x-default: bd_live_your_key_here

````