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

# Update Webhook

> Update an existing Webhook



## OpenAPI

````yaml put /webhooks/{id}
openapi: 3.0.2
info:
  title: DeliveryKey API Specification
  description: API documentation for DeliveryKey endpoints
  version: v1
  x-logo:
    url: http://app.deliverykey.local/images/deliveryRoundDocs.png
    backgroundColor: '#F4F4F6'
    padding: 5px
    altText: DeliveryKey Logo
servers:
  - url: https://api.deliverykey.com/v1
security: []
tags:
  - name: Account
    description: Current Account
  - name: Domain
    description: Domains
    x-displayName: Domain
  - name: Template
    description: Templates
    x-displayName: Template
  - name: Webhook
    description: Webhooks
    x-displayName: Webhook
  - name: Email
    description: Emails
    x-displayName: Email
paths:
  /webhooks/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        example: 095d3db4-91a9-4a46-ba88-8b67099347a9
    put:
      tags:
        - Webhook
      summary: Update Webhook
      description: Update an existing Webhook
      operationId: webhooks.update
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Domain'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Webhook'
        '422':
          $ref: '#/components/responses/errors.422'
        default:
          $ref: '#/components/responses/errors.404'
components:
  schemas:
    Domain:
      required:
        - domain
      properties:
        id:
          description: UUID of the domain in the system
          format: uuid
          type: string
          readOnly: true
          example: 27c6e6e1-0025-4c6e-843f-b2872985a28c
        domain:
          type: string
          example: mail.contoso.com
        active:
          type: boolean
        track_opens:
          default: false
          type: boolean
        track_clicks:
          default: false
          type: boolean
        created_at:
          description: The date the subscriber was created
          format: date-time
          type: string
          example: '2022-10-12T18:57:23.000000Z'
        emails_sent:
          type: number
          readOnly: true
        emails_received:
          type: number
          readOnly: true
    Webhook:
      required:
        - endpoint
      properties:
        id:
          description: UUID of the domain in the system
          format: uuid
          type: string
          readOnly: true
          example: b5b118bc-7e81-4c29-9f10-98387b94b5ce
        enabled:
          description: True if the webhook is enabled
          type: boolean
        endpoint:
          type: string
          example: http(s) endpoint to receive the events
        events:
          description: array of events to subscribe to
          type: array
          example:
            - email.clicked
            - email.delivered
            - email.opened
        created_at:
          description: The date the subscriber was created
          format: date-time
          type: string
          example: '2022-10-12T18:57:23.000000Z'
  responses:
    errors.422:
      description: Unprocessable Entity
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                description: A description of all errors
                type: string
                example: The name must be a string.
              fields:
                description: Key Map of fields with array of errors
                type: object
                example:
                  name:
                    - The team name must be a string.
                    - The team name must be at least 1 characters.
    errors.404:
      description: Not Found

````