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

# Toggle Webhook Status

> API for deactivating or activating the status of a webhook.



## OpenAPI

````yaml /openapi-v1.json post /webhooks/toggle/{id}
openapi: 3.1.0
info:
  title: Mailercloud Marketing API
  version: 1.0.0
  description: >-
    Campaigns, contacts, lists, segments, automations, and webhooks for the
    Mailercloud Marketing Platform.
servers:
  - url: https://cloudapi.mailercloud.com/v1
security:
  - apiKey: []
tags:
  - name: Campaigns
  - name: Contacts
  - name: Lists
  - name: Tags
  - name: Segments
  - name: Custom Properties
  - name: Senders
  - name: Templates
  - name: Automations
  - name: Webhooks
  - name: Webforms
  - name: Inbox Tracker
  - name: Account
paths:
  /webhooks/toggle/{id}:
    post:
      tags:
        - Webhooks
      summary: Toggle Webhook Status
      description: API for deactivating or activating the status of a webhook.
      operationId: toggle-webhook-status
      parameters:
        - name: id
          in: path
          required: true
          description: Webhook Id
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              x-examples:
                Example 1:
                  status: '1'
              required:
                - status
              properties:
                status:
                  type: string
                  description: |-
                    To activate a webhook set status : 1

                    To deactivate a webhook set status : 0
            examples:
              Example-1:
                value:
                  status: '1'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                x-examples:
                  Example 1:
                    message: Activated the webhook
              examples:
                Example-1:
                  value:
                    message: Activated the webhook
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                x-examples:
                  Example 1:
                    error: Invalid status
              examples:
                Example-1:
                  value:
                    error: Invalid status
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: object
                      properties:
                        field:
                          type: string
                        message:
                          type: string
                x-examples:
                  Example 1:
                    errors:
                      - field: ''
                        message: Authorization failed
              examples:
                Example-1:
                  value:
                    errors:
                      - field: ''
                        message: Authorization failed
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                x-examples:
                  Example 1:
                    error: Record not found with the given Id
              examples:
                Example-1:
                  value:
                    error: Record not found with the given Id
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Your Mailercloud API key (plain text, no Bearer prefix). Create keys in
        Settings → API.

````