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

# Update a webhook

> Updates a webhook in the database.



## OpenAPI

````yaml /api-v2-reference/openapi.yml put /management/webhooks/{id}
openapi: 3.1.0
info:
  title: Formbricks API
  description: Manage Formbricks resources programmatically.
  version: 2.0.0
servers:
  - url: https://app.formbricks.com/api/v2
    description: Formbricks Cloud
security:
  - apiKeyAuth: []
tags:
  - name: Health
    description: Operations for checking critical application dependencies health status.
  - name: Roles
    description: Operations for managing roles.
  - name: Me
    description: Operations for managing your API key.
  - name: Management API - Responses
    description: Operations for managing responses.
  - name: Management API - Contacts
    description: Operations for managing contacts.
  - name: Management API - Contact Attributes
    description: Operations for managing contact attributes.
  - name: Management API - Contact Attribute Keys
    description: Operations for managing contact attribute keys.
  - name: Management API - Surveys
    description: Operations for managing surveys.
  - name: Management API - Surveys - Contact Links
    description: Operations for generating personalized survey links for contacts.
  - name: Management API - Webhooks
    description: Operations for managing webhooks.
  - name: Organizations API - Teams
    description: Operations for managing teams.
  - name: Organizations API - Project Teams
    description: Operations for managing project teams.
  - name: Organizations API - Users
    description: Operations for managing users.
paths:
  /management/webhooks/{id}:
    put:
      tags:
        - Management API - Webhooks
      summary: Update a webhook
      description: Updates a webhook in the database.
      operationId: updateWebhook
      parameters:
        - in: path
          name: id
          description: The ID of the webhook
          schema:
            $ref: '#/components/schemas/webhookId'
          required: true
      requestBody:
        required: true
        description: The webhook to update
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type:
                    - string
                    - 'null'
                  description: The name of the webhook
                url:
                  type: string
                  format: uri
                  description: The URL of the webhook
                source:
                  type: string
                  enum:
                    - user
                    - zapier
                    - make
                    - n8n
                  description: The source of the webhook
                environmentId:
                  type: string
                  description: The ID of the environment
                triggers:
                  type: array
                  items:
                    type: string
                    enum:
                      - responseFinished
                      - responseCreated
                      - responseUpdated
                  minItems: 1
                  description: The triggers of the webhook
                surveyIds:
                  type: array
                  items:
                    type: string
                  description: 'The IDs of the surveys '
              required:
                - name
                - url
                - source
                - environmentId
                - triggers
                - surveyIds
      responses:
        '200':
          description: Webhook updated successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    description: The ID of the webhook
                  name:
                    type:
                      - string
                      - 'null'
                    description: The name of the webhook
                  createdAt:
                    type: string
                    description: The date and time the webhook was created
                    example: '2021-01-01T00:00:00.000Z'
                  updatedAt:
                    type: string
                    description: The date and time the webhook was last updated
                    example: '2021-01-01T00:00:00.000Z'
                  url:
                    type: string
                    format: uri
                    description: The URL of the webhook
                  source:
                    type: string
                    enum:
                      - user
                      - zapier
                      - make
                      - n8n
                    description: The source of the webhook
                  environmentId:
                    type: string
                    description: The ID of the environment
                  triggers:
                    type: array
                    items:
                      type: string
                      enum:
                        - responseFinished
                        - responseCreated
                        - responseUpdated
                    minItems: 1
                    description: The triggers of the webhook
                  surveyIds:
                    type: array
                    items:
                      type: string
                    description: 'The IDs of the surveys '
components:
  schemas:
    webhookId:
      type: string
      description: The ID of the webhook
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Use your Formbricks x-api-key to authenticate.

````