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

# Update a webhook

> Updates an existing webhook configuration. Only provided fields will be updated.



## OpenAPI

````yaml /openapi.json patch /webhooks
openapi: 3.0.0
info:
  title: JetEmail API
  version: 1.0.0
  description: API documentation for JetEmail's transactional email service.
servers:
  - url: https://api.jetemail.com
    description: Production
security:
  - apiKeyAuth: []
externalDocs:
  description: Download OpenAPI Specification
  url: /openapi.json
paths:
  /webhooks:
    patch:
      tags:
        - Webhooks
      summary: Update a webhook
      description: >-
        Updates an existing webhook configuration. Only provided fields will be
        updated.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - uuid
              properties:
                uuid:
                  type: string
                  format: uuid
                  description: UUID of the webhook to update
                  example: a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
                name:
                  type: string
                  maxLength: 64
                  pattern: ^[a-zA-Z0-9-_\s]+$
                  description: >-
                    New webhook name. Only letters, numbers, hyphens,
                    underscores, and spaces allowed.
                  example: Updated Webhook Name
                url:
                  type: string
                  format: uri
                  description: New webhook endpoint URL
                  example: https://example.com/new-webhook
                events:
                  type: array
                  items:
                    type: string
                    enum:
                      - outbound.delivered
                      - outbound.bounced
                      - outbound.rejected
                      - outbound.deferred
                      - outbound.spam
                      - outbound.dropped
                      - outbound.virus
                      - outbound.opened
                      - outbound.clicked
                      - outbound.complaint
                      - inbound.received
                      - inbound.delivered
                      - inbound.spam
                      - inbound.blocked
                  minItems: 1
                  description: >-
                    New list of event types. Must only include allowed event
                    types.
                  example:
                    - outbound.delivered
                    - outbound.bounced
                    - inbound.received
                status:
                  type: integer
                  enum:
                    - 0
                    - 1
                  description: 'New webhook status: 0 = disabled, 1 = enabled'
                  example: 1
                filter_users:
                  type: array
                  items:
                    type: string
                  nullable: true
                  description: >-
                    New filter for outbound events by username. Must be
                    transactional keys or smarthosts you own.
                  example: null
                filter_domains:
                  type: array
                  items:
                    type: string
                  nullable: true
                  description: >-
                    New filter for inbound events by domain. Must be inbound
                    domains you own.
                  example:
                    - example.com
            examples:
              Update URL:
                value:
                  uuid: a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
                  url: https://example.com/new-webhook
              Disable Webhook:
                value:
                  uuid: a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
                  status: 0
              Update Events and Filters:
                value:
                  uuid: a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
                  events:
                    - outbound.bounced
                    - outbound.complaint
                  filter_domains:
                    - example.com
      responses:
        '200':
          description: Webhook updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Webhook updated successfully
        '400':
          description: Bad request - Invalid input
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Webhook uuid is required and must be a string
        '401':
          description: Unauthorized - User not authenticated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: User information not found
        '403':
          description: >-
            Forbidden - Invalid filter values (users/domains not owned by
            caller)
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: >-
                      Invalid filter_users: my_key. You can only filter by
                      users/keys that you own.
        '404':
          description: Not found - Webhook not found or access denied
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Webhook not found or access denied
        '500':
          description: Server error
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                    example: Failed to update webhook
components:
  securitySchemes:
    apiKeyAuth:
      type: http
      scheme: bearer
      description: API key for account management endpoints. Use your api_ prefixed token.

````