# Update a webhook endpoint

`PATCH https://api.morevoice.ai/v1/webhook_endpoints/{id}`

Change the URL, the events, the description, the API version or the status. `status: enabled` resumes an endpoint that was disabled (or auto-disabled after 72 hours of failures).

Authenticate with a secret API key: `Authorization: Bearer $MOREVOICE_API_KEY`.

Operation ID: `webhook_endpoints_update`.

## Parameters

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | A webhook endpoint ID (`we_…`). |

### Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `MoreVoice-Version` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |

## Request body

Optional, `application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `api_version` | `"2026-11-01"` | no | Render payloads in this API version (default: the current one). |
| `description` | `string` | no | — |
| `enabled_events` | `string[]` | no | — |
| `max_in_flight` | `integer` | no | Deliveries in flight at once (1–100, default 10). |
| `metadata` | `MetadataInput` | no | Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
| `status` | `"enabled" \| "disabled"` | no | `disabled` stops deliveries; `enabled` resumes them (also after an auto-disable). |
| `url` | `string` | no | An https URL (http is accepted in test mode). Private and local addresses are refused. |

Example:

```json
{
  "enabled_events": [
    "call.*"
  ],
  "status": "enabled"
}
```

## Responses

### 200 OK

OK Returns `WebhookEndpoint`.

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string` | A webhook endpoint ID (prefix `we_`). |
| `object` | `"webhook_endpoint"` | — |
| `url` | `string` | Where events are POSTed. |
| `description` | `string` | — |
| `enabled_events` | `string[]` | The event types sent to this endpoint; `["*"]` means every event. |
| `status` | `"enabled" \| "disabled" \| "auto_disabled"` | `auto_disabled`: every delivery failed for 72 hours, so sending stopped (and your admins were told). Set `status: enabled` to resume. |
| `disabled_reason` | `string \| null` | — |
| `disabled_at` | `string \| null` | — |
| `api_version` | `string` | The API version event payloads are rendered in. `legacy`: an endpoint moved from the old webhook settings, which keeps getting the previous body (`{id, event, createdAt, data}`). |
| `campaign_id` | `string \| null` | `cmp_…` ID. |
| `legacy_headers` | `boolean` | Also sends the previous `X-Webhook-*` headers (moved endpoints, for one deprecation cycle). |
| `max_in_flight` | `integer` | Deliveries in flight to this endpoint at once; more wait their turn. |
| `metadata` | `Metadata` | Up to 50 key/value pairs (keys up to 40 characters, values up to 500) you attach to an object. Returned as sent. |
| `previous_secret_expires_at` | `string \| null` | While a rotated secret still signs (alongside the new one): until when. |
| `signing` | `"hmac" \| "ed25519"` | How deliveries are signed (Standard Webhooks). `hmac` (default): `v1,<HMAC-SHA256>` with a shared secret (`whsec_…`) returned once. `ed25519`: `v1a,<Ed25519 signature>`; you verify with the endpoint's `public_key` (`whpk_…`) and no secret is ever shared. |
| `public_key` | `string \| null` | `ed25519` endpoints: the Ed25519 public key (`whpk_` + base64 of 32 bytes) that verifies `v1a` signatures; also as PEM at `GET /v1/webhook_endpoints/{id}/public_key`. Null for `hmac`. |
| `previous_public_key` | `string \| null` | After a rotation of an `ed25519` key: the previous public key, which still signs alongside until `previous_secret_expires_at`. |
| `livemode` | `boolean` | `true` in live mode, `false` in test mode. |
| `created` | `string` | An ISO-8601 timestamp in UTC. |
| `updated` | `string` | An ISO-8601 timestamp in UTC. |
| `secret` | `string` | The signing secret (`whsec_…`) of an `hmac` endpoint. Returned only when the endpoint is created and when its secret is rotated: store it then. `ed25519` endpoints never return one. |

Example:

```json
{
  "api_version": "2026-11-01",
  "campaign_id": null,
  "created": "2026-11-03T09:14:22.000Z",
  "description": "CRM sync",
  "disabled_at": null,
  "disabled_reason": null,
  "enabled_events": [
    "call.ended",
    "call.analyzed"
  ],
  "id": "we_4Gk2LmN9pQ4rS6tV8wX0yZ",
  "legacy_headers": false,
  "livemode": true,
  "max_in_flight": 10,
  "metadata": {},
  "object": "webhook_endpoint",
  "previous_public_key": null,
  "previous_secret_expires_at": null,
  "public_key": null,
  "signing": "hmac",
  "status": "enabled",
  "updated": "2026-11-03T09:14:22.000Z",
  "url": "https://hooks.example.com/webhooks"
}
```

### 400 Bad Request

The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown. Returns `ErrorEnvelope`.

### 401 Unauthorized

No valid API key was sent. Returns `ErrorEnvelope`.

### 403 Forbidden

The key may not do this (a missing scope, a plan limit, or a compliance block). Returns `ErrorEnvelope`.

### 404 Not Found

No object with this ID (in the path or the body) exists in this organisation and mode. Returns `ErrorEnvelope`.

### 409 Conflict

The request conflicts with the object's state, or the Idempotency-Key was reused with other parameters. Returns `ErrorEnvelope`.

### 413 Payload Too Large

The request body is larger than the endpoint accepts, or has more parts or files than it takes. Returns `ErrorEnvelope`.

### 415 Unsupported Media Type

The request body's Content-Type is not one the endpoint takes. Returns `ErrorEnvelope`.

### 429 Too Many Requests

Too many requests, or no call capacity right now. Retry after the Retry-After delay. Returns `ErrorEnvelope`.

### 500 Internal Server Error

Something went wrong on MoreVoice's side. Retry with the same Idempotency-Key. Returns `ErrorEnvelope`.

## Code samples

**TypeScript**

```ts
import MoreVoice from "@morevoice/sdk";

const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment

const webhookEndpoint = await mv.webhookEndpoints.update("we_7Hk2Lm9Qp", {
	enabled_events: [
		"call.*",
	],
	status: "enabled",
});
console.log(webhookEndpoint);
```

**Python**

```python
from morevoice import MoreVoice

client = MoreVoice()  # MOREVOICE_API_KEY from the environment

webhook_endpoint = client.webhook_endpoints.update("we_7Hk2Lm9Qp", {
    "enabled_events": [
        "call.*",
    ],
    "status": "enabled",
})
print(webhook_endpoint)
```

**cURL**

```sh
curl -X PATCH https://api.morevoice.ai/v1/webhook_endpoints/we_7Hk2Lm9Qp \
  -H "Authorization: Bearer $MOREVOICE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled_events": [
    "call.*"
  ],
  "status": "enabled"
}'
```
