> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-detect-table-modification.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Webhook

> Replaces an existing webhook. Readable optional fields
(`description`, `body`) are a full replace: omitting them clears
them. The write-only fields `headers` and `queryParams` are never
returned on read, so omitting them preserves the stored values;
send an explicit empty object (`{}`) to clear them. Exception: if the
destination (`url` or `service`) changes, omitted `headers`/
`queryParams` are cleared rather than preserved so stored secrets are
never forwarded to a new destination.




## OpenAPI

````yaml https://raw.githubusercontent.com/hyperdxio/hyperdx/refs/heads/main/packages/api/openapi.json put /api/v2/webhooks/{id}
openapi: 3.0.0
info:
  title: HyperDX External API
  description: API for managing HyperDX alerts and dashboards
  version: 2.0.0
servers:
  - url: /
    description: Your HyperDX instance (http://<host>:<port>)
security:
  - BearerAuth: []
tags:
  - name: Dashboards
    description: Endpoints for managing dashboards and their visualizations
  - name: Alerts
    description: Endpoints for managing monitoring alerts
  - name: Charts
    description: Endpoints for querying chart data
  - name: Connections
    description: Endpoints for managing ClickHouse connections
  - name: Sources
    description: Endpoints for managing data sources
  - name: Webhooks
    description: Endpoints for managing webhooks
  - name: Search
    description: Endpoints for querying raw data from log and trace sources
paths:
  /api/v2/webhooks/{id}:
    put:
      tags:
        - Webhooks
      summary: Update Webhook
      description: |
        Replaces an existing webhook. Readable optional fields
        (`description`, `body`) are a full replace: omitting them clears
        them. The write-only fields `headers` and `queryParams` are never
        returned on read, so omitting them preserves the stored values;
        send an explicit empty object (`{}`) to clear them. Exception: if the
        destination (`url` or `service`) changes, omitted `headers`/
        `queryParams` are cleared rather than preserved so stored secrets are
        never forwarded to a new destination.
      operationId: updateWebhook
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Webhook ID
          example: 507f1f77bcf86cd799439011
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookInput'
      responses:
        '200':
          description: Successfully updated webhook
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponseEnvelope'
        '400':
          description: Bad request or duplicate webhook
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Webhook not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Webhook was modified concurrently; retry with current state
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    WebhookInput:
      type: object
      required:
        - name
        - service
        - url
      description: |
        Webhook create/update body. `body`, `headers`, and `queryParams`
        only take effect for services that issue a templated HTTP request
        (`generic`, `incidentio`). The `slack` service posts a fixed payload
        to its incoming-webhook URL and ignores them, so supplying any of
        these fields on a `slack` webhook is rejected. `headers` and
        `queryParams` are write-only — they are accepted here but never
        returned by any read endpoint, so secrets such as auth tokens do
        not leak. On
        update (PUT), omitted readable fields (`description`, `body`) are
        cleared, while omitted `headers`/`queryParams` are preserved —
        send an explicit `{}` to clear them. Exception: if the destination
        (`url` or `service`) changes, omitted `headers`/`queryParams` are
        cleared rather than preserved, so stored secrets are never forwarded
        to a new destination; re-supply them for the new destination.
      properties:
        name:
          type: string
          maxLength: 1024
          description: Webhook name. Must be unique per service within the team.
          example: Production Alerts
        service:
          type: string
          enum:
            - slack
            - incidentio
            - generic
          description: Webhook service type.
          example: slack
        url:
          type: string
          format: uri
          maxLength: 2048
          description: Webhook destination URL.
          example: >-
            https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
        description:
          type: string
          maxLength: 2048
          description: Webhook description, shown in the UI.
          example: 'Sends critical alerts to the #incidents channel'
        body:
          type: string
          maxLength: 16384
          description: >-
            Optional request body template. Only for generic/incidentio;
            rejected for slack.
          example: '{"alert": "{{title}}", "severity": "{{level}}"}'
        headers:
          type: object
          maxProperties: 100
          description: >-
            Write-only. Custom HTTP headers sent with the webhook request. Never
            returned on read. Only for generic/incidentio; rejected for slack.
            Each value is capped at 4096 characters.
          additionalProperties:
            type: string
            maxLength: 4096
          example:
            Authorization: Bearer secret-token
        queryParams:
          type: object
          maxProperties: 100
          description: >-
            Write-only. Query parameters appended to the webhook URL. Never
            returned on read. Only for generic/incidentio; rejected for slack.
            Each value is capped at 4096 characters.
          additionalProperties:
            type: string
            maxLength: 4096
    WebhookResponseEnvelope:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/Webhook'
          description: The webhook object.
    Error:
      type: object
      properties:
        message:
          type: string
          description: Human-readable error message.
          example: 'NOT_FOUND: Alert not found'
    Webhook:
      oneOf:
        - $ref: '#/components/schemas/SlackWebhook'
        - $ref: '#/components/schemas/IncidentIOWebhook'
        - $ref: '#/components/schemas/GenericWebhook'
      discriminator:
        propertyName: service
        mapping:
          slack:
            $ref: '#/components/schemas/SlackWebhook'
          incidentio:
            $ref: '#/components/schemas/IncidentIOWebhook'
          generic:
            $ref: '#/components/schemas/GenericWebhook'
    SlackWebhook:
      type: object
      required:
        - id
        - name
        - service
        - updatedAt
        - createdAt
      properties:
        id:
          type: string
          description: Webhook ID
          example: 507f1f77bcf86cd799439011
        name:
          type: string
          description: Webhook name
          example: Production Alerts
        service:
          type: string
          enum:
            - slack
          description: Webhook service type
          example: slack
        url:
          type: string
          description: Slack incoming webhook URL
          example: >-
            https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
        description:
          type: string
          description: Webhook description, shown in the UI
          example: 'Sends critical alerts to the #incidents channel'
        updatedAt:
          type: string
          format: date-time
          description: Last update timestamp
          example: '2025-06-15T10:30:00.000Z'
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp
          example: '2025-01-01T00:00:00.000Z'
    IncidentIOWebhook:
      type: object
      required:
        - id
        - name
        - service
        - updatedAt
        - createdAt
      properties:
        id:
          type: string
          description: Webhook ID
          example: 507f1f77bcf86cd799439012
        name:
          type: string
          description: Webhook name
          example: Incident Response
        service:
          type: string
          enum:
            - incidentio
          description: Webhook service type
          example: incidentio
        url:
          type: string
          description: incident.io alert event HTTP source URL
          example: https://api.incident.io/v2/alert_events/http/abc123
        description:
          type: string
          description: Webhook description, shown in the UI
          example: Routes alerts to incident.io for on-call escalation
        updatedAt:
          type: string
          format: date-time
          description: Last update timestamp
          example: '2025-06-15T10:30:00.000Z'
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp
          example: '2025-01-01T00:00:00.000Z'
    GenericWebhook:
      type: object
      required:
        - id
        - name
        - service
        - updatedAt
        - createdAt
      properties:
        id:
          type: string
          description: Webhook ID
          example: 507f1f77bcf86cd799439013
        name:
          type: string
          description: Webhook name
          example: PagerDuty Integration
        service:
          type: string
          enum:
            - generic
          description: Webhook service type
          example: generic
        url:
          type: string
          description: Webhook destination URL
          example: https://example.com/webhooks/alerts
        description:
          type: string
          description: Webhook description, shown in the UI
          example: Forwards alert payloads to an external monitoring service
        body:
          type: string
          description: Optional request body template
          example: '{"alert": "{{title}}", "severity": "{{level}}"}'
        updatedAt:
          type: string
          format: date-time
          description: Last update timestamp
          example: '2025-06-15T10:30:00.000Z'
        createdAt:
          type: string
          format: date-time
          description: Creation timestamp
          example: '2025-01-01T00:00:00.000Z'
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key

````