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

# Update Webhook

> Update a webhook endpoint.

Changes state - verify before retry
Updates a registered webhook subscription. You can change the delivery `url`, replace the stored `events` list (it does not filter deliveries), rotate the signing `secret`, or toggle `is_active` to temporarily pause delivery (inactive subscriptions receive no deliveries). Only the fields you include are updated, omitted fields keep their current values. The subscription's `id` does not change, so consumers can continue to reference the same webhook ID after the update. The response returns the updated subscription in `data.webhook` with the secret masked as `********`. Changing the URL does not send a test request to it.

## When to use this

* **URL change**: your consumer service moved to a new host or path.
* **Changing events**: the `events` list is stored and returned as sent, but it does not filter deliveries today; every active subscription receives the call-ended delivery. See [Available events](https://dialnexa.com/docs/api-reference/v1/webhooks/create.md#available-events).
* **Secret rotation**: your signing secret leaked, expired, or you are on a periodic rotation cadence.
* **Temporary pause**: you want to stop receiving events without losing the subscription. Set `is_active` to `false`, then back to `true` later. If you do not plan to re-enable, use [Delete Webhook](https://dialnexa.com/docs/api-reference/v1/webhooks/delete.md) instead.

## Rotating the signing secret

Send a new `secret` in this request. There is no dual-secret overlap window: the next delivery is signed with the new value.

1. Update your consumer service to accept both the old and new secret during a transition window.
2. Send the new secret to DialNexa through this endpoint.
3. Confirm new deliveries are being verified with the new secret.
4. Remove the old secret from your consumer service.

See [Verifying the signature](https://dialnexa.com/docs/api-reference/v1/webhooks/create.md#verifying-the-signature) for the verification format and helper code.

## Path parameters

| Parameter | Description |
| - | - |
| `id` | The webhook ID, for example `webhook_c9v3nz8rq4pmxa`. |

## Errors

* `404 Not Found` is returned when the webhook does not exist in this workspace.
* `400 Bad Request` is returned when the URL is malformed or `events` is empty.

## Related endpoints

* [List Webhooks](https://dialnexa.com/docs/api-reference/v1/webhooks/list.md): review every webhook on the workspace.
* [Delete Webhook](https://dialnexa.com/docs/api-reference/v1/webhooks/delete.md): permanently remove a subscription.
* [Verifying the signature](https://dialnexa.com/docs/api-reference/v1/webhooks/create.md#verifying-the-signature): verification format.
* [Delivery behavior](https://dialnexa.com/docs/api-reference/v1/webhooks/create.md#delivery-behavior): deliveries are sent once and not retried.


## OpenAPI

````yaml PATCH /v1/user-webhooks/{id}
openapi: 3.0.0
info:
  title: DialNexa API
  description: Public `/v1` REST API for the DialNexa voice AI platform.
  version: 1.0.0
servers:
  - url: https://api.dialnexa.com
    description: DialNexa production API
security:
  - bearer: []
tags:
  - name: Agents
  - name: Batch Calls
  - name: Calls
  - name: Knowledge Base
  - name: Languages
  - name: LLMs
  - name: Phone Numbers
  - name: Organization Folders
  - name: Transcribers
  - name: Webhooks
  - name: Voices
  - name: Workflows
  - name: Workflow Leads
  - name: Authentication
  - name: Agent Builder
  - name: Agent Evaluations
paths:
  /v1/user-webhooks/{id}:
    patch:
      tags:
        - Webhooks
      summary: Update Webhook
      description: >-
        Updates the URL, events, active flag, or signing secret. Only the fields
        you send change. The response masks the secret as ********. A new secret
        signs the next delivery; there is no overlap window.
      operationId: updateWebhook
      parameters:
        - name: id
          required: true
          in: path
          description: >-
            Webhook ID with the `webhook_` prefix, as returned by Create
            Webhook.
          schema:
            example: webhook_c9v3nz8rq4pmxa
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWebhookRequest'
            examples:
              request:
                summary: Update a webhook
                value:
                  is_active: false
      responses:
        '200':
          description: Webhook updated successfully.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - error
                  - statusCode
                  - message
                  - data
                  - timestamp
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  error:
                    type: boolean
                    enum:
                      - false
                  statusCode:
                    type: integer
                    example: 200
                  message:
                    type: string
                    example: Success
                  data:
                    type: object
                    properties:
                      message:
                        type: string
                        example: Webhook updated successfully
                      webhook:
                        type: object
                        properties:
                          id:
                            type: string
                            example: webhook_c9v3nz8rq4pmxa
                            description: Webhook ID with the `webhook_` prefix.
                          org_id:
                            type: string
                            example: o14XKPP84rt22g
                            description: Owning workspace ID, without the `org_` prefix.
                          url:
                            type: string
                            format: uri
                            example: https://example.com/dialnexa/webhook
                          events:
                            type: array
                            items:
                              type: string
                            example:
                              - call.completed
                            description: >-
                              Stored and returned as sent. It does not filter
                              deliveries today.
                          is_active:
                            type: boolean
                            example: true
                            description: Inactive subscriptions receive no deliveries.
                          secret:
                            type: string
                            example: '********'
                            description: >-
                              Always `********`; only Create Webhook returns the
                              secret.
                          last_triggered_at:
                            type: string
                            format: date-time
                            nullable: true
                            description: >-
                              When a delivery was last attempted, whether or not
                              your endpoint accepted it.
                          is_deleted:
                            type: boolean
                            example: false
                          created_at:
                            type: string
                            format: date-time
                          updated_at:
                            type: string
                            format: date-time
                  timestamp:
                    type: string
                    format: date-time
              examples:
                success:
                  summary: Successful response
                  value:
                    success: true
                    error: false
                    statusCode: 200
                    message: Success
                    data:
                      message: Webhook updated successfully
                      webhook:
                        id: webhook_c9v3nz8rq4pmxa
                        org_id: o14XKPP84rt22g
                        url: https://example.com/dialnexa/webhook
                        events:
                          - call.completed
                        is_active: false
                        secret: '********'
                        last_triggered_at: null
                        is_deleted: false
                        created_at: '2026-07-03T10:30:00.000Z'
                        updated_at: '2026-07-04T08:00:00.000Z'
                    timestamp: '2026-09-07T06:00:00.000Z'
        '400':
          description: Bad request - invalid fields.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  summary: 400 Bad Request
                  value:
                    statusCode: 400
                    error: true
                    success: false
                    data: []
                    message: url must be a URL address
                    errors:
                      - url must be a URL address
        '401':
          description: Unauthorized - missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  summary: 401 Unauthorized
                  value:
                    statusCode: 401
                    error: true
                    success: false
                    data: []
                    message: Invalid API key
                    errors: []
        '404':
          description: Webhook not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  summary: 404 Not Found
                  value:
                    statusCode: 404
                    error: true
                    success: false
                    data: []
                    message: Webhook not found for the given ID and organization
                    errors: []
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                error:
                  summary: 500 Internal Server Error
                  value:
                    statusCode: 500
                    error: true
                    success: false
                    data: []
                    message: Internal server error
                    errors: []
      security:
        - bearer: []
components:
  schemas:
    UpdateWebhookRequest:
      type: object
      properties:
        url:
          type: string
          format: uri
          example: https://webhook.site/updated-endpoint
          description: The new URL for the webhook.
        events:
          minItems: 1
          example:
            - call.completed
          description: Updated list of events.
          type: array
          items:
            type: string
        is_active:
          type: boolean
          example: false
          description: Whether the webhook is active.
        secret:
          type: string
          example: replace-with-a-new-long-random-secret
          description: New secret for signing payloads.
    ErrorResponse:
      type: object
      description: Error body on endpoints without response filtering.
      properties:
        statusCode:
          type: integer
          example: 404
        error:
          type: boolean
          enum:
            - true
        success:
          type: boolean
          enum:
            - false
        data:
          oneOf:
            - type: object
              properties:
                code:
                  type: string
                  description: Machine-readable refusal code.
            - type: array
              items: {}
          description: >-
            For a coded refusal, an object with code and the details listed for
            that code. Otherwise an empty array.
        message:
          type: string
        errors:
          type: array
          items:
            type: string
          description: Validation messages for a 400. Empty for other errors.
        validation_errors:
          type: array
          description: >-
            Present when uploaded rows fail number validation (batch and
            workflow lead uploads): one group per distinct error.
          items:
            type: object
            properties:
              error:
                type: string
              rows:
                type: array
                items:
                  type: integer
                description: Row numbers with this error.
              phone_numbers:
                type: array
                items:
                  type: string
        invalid_row_count:
          type: integer
          description: 'Present with validation_errors: how many rows failed.'
      required:
        - statusCode
        - error
        - success
        - data
        - message
        - errors
  securitySchemes:
    bearer:
      scheme: bearer
      type: http

````

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