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

# Subscribe a Webhook

> Add a new webhook to the specified campaign.



## OpenAPI

````yaml https://api.callers.ai/openapi-json post /campaigns/{campaignId}/webhook/subscribe
openapi: 3.0.0
info:
  title: Callers API
  description: API documentation for Callers, providing endpoints for seamless integration.
  version: 1.0.0
  contact: {}
servers:
  - url: https://api.callers.ai
security: []
tags: []
paths:
  /campaigns/{campaignId}/webhook/subscribe:
    post:
      tags:
        - Webhooks
      summary: Subscribe a Webhook
      description: Add a new webhook to the specified campaign.
      operationId: CampaignPublicController_subscribeWebhook
      parameters:
        - name: campaignId
          required: true
          in: path
          description: The campaign ObjectId as a string.
          schema:
            type: string
        - name: x-sub-organization-id
          in: header
          schema:
            type: string
          description: >-
            Optional sub organization ID. Must belong to your main organization
            API key.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicWebhooksZodDto'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - success
                  data:
                    type: boolean
        '400':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
                  data:
                    type: array
                    items:
                      type: object
        '403':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
        '404':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    enum:
                      - error
                  message:
                    type: string
      security:
        - Authorization: []
components:
  schemas:
    PublicWebhooksZodDto:
      type: object
      properties:
        name:
          type: string
          maxLength: 30
        url:
          type: string
        events:
          type: array
          items:
            type: string
            enum:
              - POST_PROCESSING_FINISHED:INTERESTED
              - POST_PROCESSING_FINISHED:NOT_INTERESTED
              - POST_PROCESSING_FINISHED:CALL_ME_LATER
              - POST_PROCESSING_FINISHED:WRONG_NUMBER
              - POST_PROCESSING_FINISHED:DO_NOT_CALL
              - POST_PROCESSING_FINISHED:VOICE_MAIL
              - FORWARDED_CALL_FINISHED
              - FORWARDED
              - HANG_UP
              - DIALING
              - CONNECTED
              - FAILED
              - COULD_NOT_CONNECT:NO_ANSWER
              - COULD_NOT_CONNECT:BUSY
              - CALL_FINISHED
            x-enumNames:
              - POST_PROCESSING_FINISHED_INTERESTED
              - POST_PROCESSING_FINISHED_NOT_INTERESTED
              - POST_PROCESSING_FINISHED_CALL_ME_LATER
              - POST_PROCESSING_FINISHED_WRONG_NUMBER
              - POST_PROCESSING_FINISHED_DO_NOT_CALL
              - POST_PROCESSING_FINISHED_VOICE_MAIL
              - FORWARDED_CALL_FINISHED
              - FORWARDED
              - HANG_UP
              - DIALING
              - CONNECTED
              - FAILED
              - COULD_NOT_CONNECT_NO_ANSWER
              - COULD_NOT_CONNECT_BUSY
              - CALL_FINISHED
          default:
            - POST_PROCESSING_FINISHED:INTERESTED
            - POST_PROCESSING_FINISHED:NOT_INTERESTED
            - POST_PROCESSING_FINISHED:CALL_ME_LATER
            - POST_PROCESSING_FINISHED:WRONG_NUMBER
            - POST_PROCESSING_FINISHED:DO_NOT_CALL
        isAdvanced:
          type: boolean
          default: false
        advancedWebhook:
          type: object
          properties:
            url:
              type: string
            method:
              type: string
              enum:
                - GET
                - POST
                - PUT
                - DELETE
                - PATCH
              x-enumNames:
                - GET
                - POST
                - PUT
                - DELETE
                - PATCH
            headers:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  value:
                    type: string
                required:
                  - name
                  - value
            parameters:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  value:
                    type: string
                required:
                  - name
                  - value
            body:
              type: string
              default: ''
      required:
        - url
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: Authorization

````