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

# Update Webhook

> Updates an existing webhook endpoint

## Request Parameters

### Path Parameters

<ParamField path="id" type="string" required>
  Webhook endpoint ID
</ParamField>

### Request Body

<ParamField body="url" type="string">
  New HTTPS URL where webhook events will be sent
</ParamField>

<ParamField body="filterTypes" type="array">
  New list of event types to subscribe to (null to keep existing)
</ParamField>

<ParamField body="description" type="string">
  New description of the webhook endpoint
</ParamField>

<RequestExample>
  ```json theme={null}
  {
    "url": "https://example.com/new-webhook",
    "filterTypes": ["shipment.created", "shipment.cancelled"],
    "description": "Updated production webhook"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json theme={null}
  {
    "id": "ep_2KtRQ8fTStWPKrXP",
    "url": "https://example.com/new-webhook",
    "filterTypes": ["shipment.created", "shipment.cancelled"],
    "active": true,
    "created_at": "2024-01-15T10:00:00Z",
    "description": "Updated production webhook"
  }
  ```
</ResponseExample>

<Note>
  You can also use `PATCH /api/partner_webhooks/{id}` with the same request body format.
</Note>

## Response Fields

<ResponseField name="id" type="string">
  Unique identifier for the webhook endpoint
</ResponseField>

<ResponseField name="url" type="string">
  HTTPS URL where webhook events are sent
</ResponseField>

<ResponseField name="filterTypes" type="array">
  Event types this endpoint is subscribed to
</ResponseField>

<ResponseField name="active" type="boolean">
  Whether the endpoint is active
</ResponseField>

<ResponseField name="created_at" type="string">
  When the endpoint was created (ISO 8601 format)
</ResponseField>

<ResponseField name="description" type="string">
  Description of the webhook endpoint
</ResponseField>
