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

# Update Webhook

> Modify an existing webhook endpoint's configuration.

Modify an existing webhook endpoint's configuration.

### Path Parameters

<ParamField path="id" type="string" required>
  The unique ID of the webhook.
</ParamField>

### Body Parameters

<ParamField body="url" type="string">
  (Optional) The new URL.
</ParamField>

<ParamField body="topics" type="array">
  (Optional) Updated list of event types.
</ParamField>

<ParamField body="active" type="boolean">
  (Optional) Set to `false` to deactivate.
</ParamField>

### Sample Request

```bash theme={null}
curl --location 'https://api.paytring.com/api/v2/webhook/wh_12345' \
--user '<API_KEY>:<API_SECRET>' \
--header 'Content-Type: application/json' \
--data '{
    "url": "https://new-domain.com/webhook",
    "active": false
}'
```


## OpenAPI

````yaml POST /api/v2/webhook/{id}
openapi: 3.1.0
info:
  title: Orchestration
  version: '1'
servers:
  - url: https://api.paytring.com
security:
  - sec0: []
paths:
  /api/v2/webhook/{id}:
    post:
      tags:
        - Webhook V2
      summary: Update Webhook
      description: Modify an existing webhook endpoint's configuration.
      operationId: update-webhook
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: The unique ID of the webhook.
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                topics:
                  type: array
                  items:
                    type: string
                active:
                  type: boolean
      responses:
        '200':
          description: Webhook updated successfully
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: http
      scheme: basic

````