# PATCH /v1/webhook-endpoints/:endpointId (/docs/api/reference/webhooks/update-endpoint)



<Endpoint method="PATCH" path="/v1/webhook-endpoints/{endpointId}" auth="X-Api-Key" phase="1" />

Partial update. At least one field is required. Setting `status: "active"` on an auto-paused endpoint also resets `consecutiveFailureCount` so the dispatcher doesn't immediately re-pause on the first delivery.

<Parameters
  title="Headers"
  rows="[
  { name: 'Idempotency-Key', type: 'string (UUID)', description: 'Replays within 24h.' },
]"
/>

<Parameters
  title="Body"
  rows="[
  { name: 'url', type: 'string', description: 'Updated endpoint URL. HTTPS required in prod.' },
  { name: 'events', type: 'string[]', description: '1–50 event types from the catalog. Replaces the existing subscription list.' },
  { name: 'description', type: 'string | null', description: 'Human label; pass `null` to clear.' },
  { name: 'status', type: 'string', description: &#x22;`active` or `paused`. Cannot be set to `auto_paused` by partners — that's the dispatcher's lane.&#x22; },
]"
/>

## Example [#example]

```bash
curl -X PATCH https://api.layers.com/v1/webhook-endpoints/d4c71b62-... \
  -H "X-Api-Key: $LAYERS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{ "events": ["job.completed", "content.approved", "post.published"] }'
```

<Response status="200" description="OK — returns the updated endpoint" />

## Errors [#errors]

| Status | Code                   | When                                                                        |
| ------ | ---------------------- | --------------------------------------------------------------------------- |
| 422    | `VALIDATION`           | No fields supplied, unknown event type, URL invalid, events empty/too long. |
| 404    | `NOT_FOUND`            | Endpoint not owned by the calling org.                                      |
| 409    | `IDEMPOTENCY_CONFLICT` | Idempotency-Key reused with a different body.                               |

## See also [#see-also]

* [Get endpoint](/docs/api/reference/webhooks/get-endpoint)
* [Webhooks overview](/docs/api/operational/webhooks)
