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

# Update Webhook Settings

> Updates settings on an enrolled webhook.

Currently, `failure_threshold` is the only setting, and it must be included in the request body.
To remove the threshold and disable failure alerts, use `DELETE /webhook/failure-threshold`.




## OpenAPI

````yaml /email-api/api-reference/openapi.yaml patch /webhook
openapi: 3.0.0
info:
  contact:
    email: support@mailchannels.com
    name: MailChannels Corporation
  description: >
    This is the API reference for Email API. Here, you'll find more detailed
    information on every endpoint, including parameters, response formats, and
    error codes.
  title: Email API
  version: 1.9.0
servers:
  - url: https://api.mailchannels.net/tx/v1
security: []
tags:
  - name: Send
  - name: DKIM
  - name: Metrics
  - name: Sub-accounts
  - name: Suppression
  - name: Webhooks
  - name: Usage
  - name: Custom Tracking
paths:
  /webhook:
    patch:
      tags:
        - Webhooks
      summary: Update Webhook Settings
      description: >
        Updates settings on an enrolled webhook.


        Currently, `failure_threshold` is the only setting, and it must be
        included in the request body.

        To remove the threshold and disable failure alerts, use `DELETE
        /webhook/failure-threshold`.
      parameters:
        - description: >
            the URL of the enrolled webhook whose settings should be updated. It
            must match the webhook URL

            exactly as returned by `GET /webhook`.
          in: query
          name: endpoint
          required: true
          schema:
            maxLength: 8000
            type: string
        - in: header
          name: X-Api-Key
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookPatchRequestBody'
        required: true
      responses:
        '204':
          description: Successfully updated the webhook settings
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: >
            Bad Request. The endpoint is missing or longer than 8000 bytes, the
            request body is not valid JSON,

            or the failure_threshold is missing or below 1.
        '404':
          description: No webhook with the given endpoint is enrolled for this customer
        '500':
          description: Internal Server Error
components:
  schemas:
    WebhookPatchRequestBody:
      properties:
        failure_threshold:
          description: >
            The number of consecutive failed deliveries to this webhook before a
            failure alert is triggered.

            Must be included, and must be 1 or greater.
          minimum: 1
          type: integer
      required:
        - failure_threshold
      type: object
    ErrorResponse:
      properties:
        errors:
          description: >
            This is an array error objects that provide machine and human
            readable descriptions of the errors.
          items:
            type: string
          type: array
      type: object

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.