# Patch Endpoint

Canonical: https://docs.bluehola.com/docs/webhooks/patch-v1-webhook-endpoints-id
OpenAPI: https://docs.bluehola.com/openapi.yaml

<div class="endpoint"><span class="endpoint-method endpoint-method--patch">PATCH</span><code class="endpoint-path">/v1/webhook-endpoints/{id}</code></div>

Partially update an endpoint (url / events / metadata).

:::note[Authentication]

Send `Authorization: Bearer <API_KEY>` in the request headers. Which resources an API Key can reach is determined by its current authorization scope.

:::

## Request

Base URL: `https://api.bluehola.com`

### Parameters

| Name | In | Required | Type / constraints | Description |
| --- | --- | --- | --- | --- |
| `id` | path | Yes | string | The callback endpoint ID, `whe_...` |

### Request body
A request body is required.
### Request body fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | No | The new callback address. **Goes through the same SSRF checks** — if that check only ran at creation time, a single url change would bypass the whole protection |
| `events` | string[] | No | Replaces the subscription list (a full replacement, not an append). Same values as at creation: `message`, `status`, `change`, `probe`, `job.completed`, `job.failed`, `usage.updated`, `webhook.verification`, `contact.identity_changed`, `contact.info_shared`, `marketing.preference_updated`, `phone_number.username_updated`, `*` |
| `metadata` | object | No | Caller-defined data |

Content-Type: `application/json`
Schema:

```json
{
  "type": "object",
  "properties": {
    "url": {
      "type": "string",
      "description": "string · optional — the new callback address. **Goes through the same SSRF checks** — if that check only ran at creation time, a single url change would bypass the whole protection"
    },
    "events": {
      "type": "string",
      "description": "string[] · optional — replaces the subscription list (a full replacement, not an append)"
    },
    "metadata": {
      "type": "string",
      "description": "object · optional — caller-defined data"
    }
  }
}
```

## Response

| Status | Description |
| --- | --- |
| `200` | OK |
| `4xx` | Client error |

For the common error envelope and how to handle it, see [Error Codes](../guides/error-codes.md).

## Notes

An empty body returns 400 rather than a silent 200: an empty patch usually means a field name was misspelled, and a silent success would leave the caller believing the change took effect. The secret is not returned.
