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

# Update Webhook

> Update a webhook

Updates an existing webhook configuration.

### Path Parameters

* **id** (*required*, string): Webhook ID

### Request Body

| Field          | Type      | Required | Description                                                             |
| -------------- | --------- | -------- | ----------------------------------------------------------------------- |
| `name`         | string    | Yes      | A descriptive name for the webhook                                      |
| `url`          | string    | Yes      | The URL to receive webhook POST requests (must be a valid URL)          |
| `events`       | string\[] | Yes      | Array of event types to subscribe to (`CALL_LOGGED`, `CONTACT_SNOOZED`) |
| `dispositions` | number\[] | No       | Filter `CALL_LOGGED` events by disposition IDs                          |

### Example Request

```json theme={null}
{
  "name": "Updated CRM Sync",
  "url": "https://example.com/webhooks/v2/salesfinity",
  "events": ["CALL_LOGGED", "CONTACT_SNOOZED"],
  "dispositions": []
}
```

### Response

Returns the updated webhook object, or 404 if not found.

```json theme={null}
{
  "_id": "507f1f77bcf86cd799439011",
  "name": "Updated CRM Sync",
  "url": "https://example.com/webhooks/v2/salesfinity",
  "events": ["CALL_LOGGED", "CONTACT_SNOOZED"],
  "dispositions": [],
  "status": "active",
  "createdAt": "2024-01-15T10:00:00.000Z",
  "updatedAt": "2024-01-20T14:00:00.000Z"
}
```


## OpenAPI

````yaml PUT /v1/webhooks/{id}
openapi: 3.0.1
info:
  title: Salesfinity API
  description: API documentation for Salesfinity platform
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://client-api.salesfinity.co
security:
  - ApiKeyAuth: []
paths:
  /v1/webhooks/{id}:
    put:
      tags:
        - Webhooks
      description: Update a webhook
      operationId: update-webhook
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: Webhook ID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateWebhookDTO'
      responses:
        '200':
          description: Webhook updated successfully
          content:
            application/json:
              schema:
                type: object
        '404':
          description: Webhook not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateWebhookDTO:
      type: object
      properties:
        name:
          type: string
          description: A descriptive name for the webhook
        url:
          type: string
          format: uri
          description: The URL to receive webhook POST requests
        events:
          type: array
          items:
            type: string
            enum:
              - CALL_LOGGED
              - CONTACT_SNOOZED
          description: Event types to subscribe to
        dispositions:
          type: array
          items:
            type: integer
          description: Filter CALL_LOGGED events by disposition IDs
      required:
        - name
        - url
        - events
    Error:
      type: object
      required:
        - error
        - message
      properties:
        error:
          type: integer
          format: int32
        message:
          type: string
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````