> Index of every page: https://docs.merchantservicedepot.com/llms.txt

# Update webhook endpoint


`POST /v1/webhook_endpoints/{webhook_endpoint_id}`



Auth: a secret key with the `webhookEndpoints.update` permission. Returns `200` with Webhook endpoint.

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `webhookEndpointId` | path | string | Yes | The webhook endpoint id in the request path. |
| `enabledEvents` | body | array | No | Event types delivered to this endpoint. An empty array subscribes to every event. |

## Request

**curl**

```curl
curl -X POST "https://payments-api-sandbox.merchantservicedepot.com/v1/webhook_endpoints/{webhook_endpoint_id}" \
  -H "Authorization: Bearer $MYELA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enabledEvents": [
    "invoice.paid"
  ]
}'
```

**Node**

```node
const res = await fetch("https://payments-api-sandbox.merchantservicedepot.com/v1/webhook_endpoints/{webhook_endpoint_id}", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MYELA_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "enabledEvents": [
      "invoice.paid"
    ]
  }),
});

if (!res.ok) {
  const { error } = await res.json();
  // Branch on error.code — never on error.message.
  throw new Error(error.code);
}
const data = await res.json();
```

**Python**

```python
import os
import requests

res = requests.post(
    "https://payments-api-sandbox.merchantservicedepot.com/v1/webhook_endpoints/{webhook_endpoint_id}",
    headers={
        "Authorization": f"Bearer {os.environ['MYELA_API_KEY']}",
    },
    json={
        "enabledEvents": [
            "invoice.paid"
        ]
    },
)

if not res.ok:
    # Branch on error["code"] — never on error["message"].
    raise RuntimeError(res.json()["error"]["code"])
data = res.json()
```

## Response

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Unique endpoint identifier. |
| `object` | "webhook_endpoint" | Stable resource discriminator. |
| `url` | string | Delivery destination. |
| `description` | string \| null | Optional endpoint description. |
| `enabledEvents` | string[] | Subscribed event types. |
| `status` | string | Endpoint state. |
| `secretLast4` | string | Last four characters of the signing secret. |
| `createdAt` | string | ISO 8601 creation timestamp. |

```json
{
  "id": "whe_01JEXAMPLE",
  "object": "webhook_endpoint",
  "url": "https://example.com/webhooks/myela",
  "description": null,
  "enabledEvents": [
    "invoice.paid",
    "payment.settled"
  ],
  "status": "enabled",
  "secretLast4": "m9Qx",
  "createdAt": "2026-08-10T20:49:51.653Z"
}
```

Source: https://docs.merchantservicedepot.com/api-reference/update-webhook-endpoint/
