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

# Update a webhook

> Updates a webhook. All fields are optional and follow the create rules. If you change `type` to `http`, the response includes a new one-time `secret`.

**Required permission:** `alerts:manage`




## OpenAPI

````yaml /api-reference/openapi.yaml patch /api/v1/webhooks/{id}
openapi: 3.1.0
info:
  title: Igris Management API
  version: '1'
  description: >-
    REST API for managing Igris connections, policies, sessions, audit events
    and alerts.
servers:
  - url: https://api.igrisecurity.com
security:
  - bearerAuth: []
tags:
  - name: Connections
  - name: Policies
  - name: Sessions
  - name: Audit Events
  - name: Incidents
  - name: Webhooks
  - name: API Keys
  - name: Members
  - name: LLM Providers
  - name: LLM Cost
  - name: Observe
paths:
  /api/v1/webhooks/{id}:
    patch:
      tags:
        - Webhooks
      summary: Update a webhook
      description: >
        Updates a webhook. All fields are optional and follow the create rules.
        If you change `type` to `http`, the response includes a new one-time
        `secret`.


        **Required permission:** `alerts:manage`
      operationId: updateWebhook
      parameters:
        - $ref: '#/components/parameters/Id'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 100
                type:
                  type: string
                  enum:
                    - slack
                    - discord
                    - http
                url:
                  type: string
                  format: uri
                  description: Must start with `https://`.
                eventTypes:
                  type: array
                  minItems: 1
                  items:
                    type: string
                    enum:
                      - policy_deny
                      - anomaly
                      - session_suspended
                enabled:
                  type: boolean
            example:
              enabled: false
      responses:
        '200':
          description: The updated webhook.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/WebhookWithSecret'
              example:
                data:
                  id: 4d5e6f70-0000-4000-8000-00000000000a
                  name: Security alerts
                  type: http
                  url: https://your-service.com/...****
                  eventTypes:
                    - policy_deny
                    - anomaly
                  enabled: false
                  hasSecret: true
                  updatedAt: '2026-01-02T00:00:00Z'
        '400':
          description: The URL points at an internal address or does not match the type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          description: Missing permission, or the new type is not on your plan.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ForbiddenError'
                  - $ref: '#/components/schemas/PlanError'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          description: Validation failed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    Id:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
  schemas:
    WebhookWithSecret:
      allOf:
        - $ref: '#/components/schemas/Webhook'
        - type: object
          properties:
            secret:
              type: string
              description: >-
                The signing secret, including its `whsec_` prefix. Shown only in
                this response; store it now.
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
    ForbiddenError:
      type: object
      properties:
        error:
          type: string
          example: Forbidden
        required:
          type: string
          description: The permission the caller lacks.
          example: policies:write
    PlanError:
      type: object
      description: Plan limit or plan feature errors. See Limits and errors.
      properties:
        error:
          type: string
          example: PLAN_LIMIT_REACHED
        code:
          type: string
          example: PLAN_LIMIT_REACHED
        feature:
          type: string
        detector:
          type: string
          description: The detector your plan does not include.
        limit:
          type: string
        current:
          type: integer
        max:
          type: integer
        plan:
          type: string
        currentPlan:
          type: string
        upgradeTo:
          type: string
    Webhook:
      type: object
      description: >
        A webhook. The URL is masked in every response. Only `hasSecret` is
        exposed, never the secret itself, except the one-time `secret` returned
        when a signing secret is issued.
      properties:
        id:
          type: string
          format: uuid
        organizationId:
          type: string
        name:
          type: string
        type:
          type: string
          enum:
            - slack
            - discord
            - http
        url:
          type: string
          description: Masked
          for example `https://your-service.com/...****`.: null
        eventTypes:
          type: array
          items:
            type: string
            enum:
              - policy_deny
              - anomaly
              - session_suspended
        enabled:
          type: boolean
        hasSecret:
          type: boolean
          description: Whether deliveries are signed.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
  responses:
    Unauthorized:
      description: No valid session or API key, or the key's creator is no longer a member.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Unauthorized
    NotFound:
      description: Not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Not found
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: ig_...
      description: >-
        An Igris API key. It acts with the current role and permission overrides
        of the member who created it.

````

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