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

# Update Webhook

## Overview

The "Add Webhook to Campaign" endpoint allows users to attach a webhook to a specific campaign in Toingg. By sending a POST request to the `/add_webhook_campaign` endpoint, users can link a webhook to a campaign, enabling the webhook to trigger actions based on campaign-specific events. This integration is crucial for automating processes and ensuring that the campaign's activities are synchronized with external systems. Users can specify the campaign ID and webhook details to ensure seamless interaction and real-time updates.

#### Example cURL Request

```bash theme={null}
curl -X POST \
  'https://api.toingg.com/api/v3/add_webhook_campaingn?webhookId=YOUR_WEBHOOK_ID&campaignId=YOUR_CAMPAIGN_ID' \
 -H 'accept: application/json' \
  -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
```


## OpenAPI

````yaml POST /add_webhook_campaingn
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.toingg.com/api/v3
security: []
paths:
  /add_webhook_campaingn:
    post:
      tags:
        - Webhook handling
      summary: Add Webhook Campaingn
      operationId: add_webhook_campaingn_add_webhook_campaingn_post
      parameters:
        - name: webhookId
          in: query
          required: true
          schema:
            type: string
            title: Webhookid
        - name: campaignId
          in: query
          required: true
          schema:
            type: string
            title: Campaignid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: login

````