# Add a new webhook

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /hook/add:
    post:
      summary: Add a new webhook
      deprecated: false
      description: >-
        Add a webhook to PlusVibe.ai for specified events, campaigns, and
        conditions.
      operationId: Webhook_webhook/add-a-new-webhook
      tags:
        - Webhook
        - Webhook
      parameters:
        - name: x-api-key
          in: header
          description: |
            Your PlusVibe.ai account's API Key
          required: true
          example: ''
          schema:
            type: string
            description: |
              Your PlusVibe.ai account's API Key
            default: ''
            examples:
              - your-api-key
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                workspace_id:
                  type: string
                  description: The ID of the workspace to associate the webhook with.
                name:
                  type: string
                  description: A name for the webhook.
                url:
                  type: string
                  description: The URL to send webhook events to.
                camp_ids:
                  type: array
                  items:
                    type: string
                  description: >-
                    List of campaign IDs to trigger the webhook for. Use `"ALL"`
                    to trigger for all campaigns.
                event_types:
                  type: array
                  items:
                    type: string
                  description: >-
                    A list of event types to trigger the webhook. Examples
                    include:


                    - `LEAD_MARKED_AS_INTERESTED`: Triggered when a lead is
                    marked as "interested".

                    - Custom label names (e.g., `LEAD_MARKED_AS_X` where `X` is
                    a custom label).

                    - `ALL_EMAIL_REPLIES`: Triggered for all email replies. 
                is_slack:
                  type: 'null'
                  description: >-
                    Indicates if the webhook is for Slack integration (1 for
                    true, 0 for false).
                secret:
                  type: string
                  description: Optional secret key for verifying webhook payloads.
                ignore_ooo:
                  type: integer
                  description: >-
                    Relevant for `ALL_EMAIL_REPLIES` events. When set to 1,
                    ignores out-of-office replies.
                ignore_automatic:
                  type: integer
                  description: >-
                    Relevant for `ALL_EMAIL_REPLIES` events. When set to 1,
                    ignores automatic replies.
              required:
                - workspace_id
                - name
                - url
                - camp_ids
                - event_types
                - is_slack
                - secret
                - ignore_ooo
                - ignore_automatic
              x-apidog-orders:
                - workspace_id
                - name
                - url
                - camp_ids
                - event_types
                - is_slack
                - secret
                - ignore_ooo
                - ignore_automatic
            example:
              workspace_id: 65099a0dd96fae8ab61130c0
              name: My Webhook
              url: https://example.com/webhook-handler
              camp_ids:
                - 675926845560f5bb420dca12
                - 670b156d989304cbe0949b09
              event_types:
                - LEAD_MARKED_AS_INTERESTED
                - ALL_EMAIL_REPLIES
              is_slack: null
              secret: ''
              ignore_ooo: 1
              ignore_automatic: 0
      responses:
        '200':
          description: Webhook added successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: The status of the operation.
                    examples:
                      - success
                  _id:
                    type: string
                    description: The unique ID of the created webhook.
                    examples:
                      - 675fb344e5c1f6922e9f9eba
                x-apidog-orders:
                  - status
                  - _id
          headers: {}
          x-apidog-name: OK
      security:
        - ApiKeyAuth: []
          x-apidog:
            schemeGroups:
              - id: uS5KiuC4wfZHK42AzOfA_
                schemeIds:
                  - ApiKeyAuth
            required: true
            use:
              id: uS5KiuC4wfZHK42AzOfA_
            scopes:
              uS5KiuC4wfZHK42AzOfA_:
                ApiKeyAuth: []
      x-apidog-folder: Webhook
      x-apidog-status: released
      x-run-in-apidog: https://app.apidog.com/web/project/929054/apis/api-17238033-run
components:
  schemas: {}
  securitySchemes:
    ApiKeyAuth:
      type: apikey
      in: header
      name: x-api-key
      description: |
        API key issued in the PlusVibe dashboard. The server reads it
        from the `x-api-key` header and injects it into the request as
        the `api_key` query parameter, which is why you will see
        `api_key` referenced in validation errors.
    apiKey:
      type: apikey
      in: body
      name: api_key
      description: API key passed in request body
servers:
  - url: https://api.plusvibe.ai/api/v1
    description: Prod Env
security:
  - ApiKeyAuth: []
    x-apidog:
      schemeGroups:
        - id: uS5KiuC4wfZHK42AzOfA_
          schemeIds:
            - ApiKeyAuth
      required: true
      use:
        id: uS5KiuC4wfZHK42AzOfA_
      scopes:
        uS5KiuC4wfZHK42AzOfA_:
          ApiKeyAuth: []

```
