---
title: "Update a webhook endpoint"
---

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

# Update a webhook endpoint

Path: CloudRaker Paperwork API › Webhooks

`PATCH /v1/webhooks/{id}`

Changes a saved endpoint in place, keeping its id.

- `url` — re-point it somewhere else.
- `events` — re-filter which types it receives.
- `disabled: true` — pause deliveries without losing the endpoint.

```json
{ "disabled": true }
```

> **Note:** Runs already in flight pick the change up immediately: they hold the `whe_` reference, not a URL snapshot. Rotating an endpoint mid-run reroutes the rest of that run's deliveries.

**Learn more:** [Webhooks guide](https://docs.cloudraker.com/paperwork/developers/webhooks)

## Authentication

- `bearerAuth`, http, header `Authorization`

## Path parameters

- `id` (`updateWebhookEndpoint.path.id`; string, required)
  - minLength 1

## Request body

_Required._

- `url` (`updateWebhookEndpoint.url`; string, optional)
  - format `uri`; example `"https://example.com/hooks/cloudraker"`
- `events` (`updateWebhookEndpoint.events`; array<string>, optional)
  - one of `"processing.started"`, `"file.processed"`, `"file.failed"`, `"run.completed"`, `"run.failed"`, `"processing.completed"`, `"processing.expired"`, `"space.expired"`, `"agent_run.waiting"`, `"agent_run.needs_input"`, `"agent_run.approval_requested"`, `"agent_run.task_ready"`, `"agent_run.completed"`, `"agent_run.failed"`, `"work_session.opened"`, `"work_session.waiting"`, `"work_session.done"`, `"turn.started"`, `"turn.finished"`, `"turn.failed"`, `"approval.requested"`, `"approval.decided"`, `"artifact.created"`, `"artifact.committed"`, `"embed.document_saved"`, `"embed.document_approved"`
- `disabled` (`updateWebhookEndpoint.disabled`; boolean, optional)

## Example request

```json
{
  "url": "https://example.com/hooks/cloudraker",
  "events": [
    "processing.started"
  ],
  "disabled": true
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url 'https://api.cloudraker.com/v1/webhooks/<id>' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "url": "https://example.com/hooks/cloudraker",
  "events": [
    "processing.started"
  ],
  "disabled": true
}
'
```

### TypeScript

```typescript
const url = 'https://api.cloudraker.com/v1/webhooks/<id>';
const options = {
  method: 'PATCH',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({
    url: 'https://example.com/hooks/cloudraker',
    events: ['processing.started'],
    disabled: true
  })
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.cloudraker.com/v1/webhooks/<id>"

payload = {
    "url": "https://example.com/hooks/cloudraker",
    "events": ["processing.started"],
    "disabled": True
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

The updated endpoint.

#### Example

```json
{
  "object": "webhook_endpoint",
  "id": "whe_01JQ8ZKMRT4V6WXYZ0ABCDEFGH",
  "url": "string",
  "events": [
    "string"
  ],
  "disabled": true,
  "createdAt": "string"
}
```

- `object` (`updateWebhookEndpoint.response.200.object`; string, required)
- `id` (`updateWebhookEndpoint.response.200.id`; string, required)
  - example `"whe_01JQ8ZKMRT4V6WXYZ0ABCDEFGH"`
- `url` (`updateWebhookEndpoint.response.200.url`; string, required)
- `disabled` (`updateWebhookEndpoint.response.200.disabled`; boolean, required)
- `createdAt` (`updateWebhookEndpoint.response.200.createdAt`; string, required)
- `events` (`updateWebhookEndpoint.response.200.events`; array<string>, optional)

### 400

Validation Error

#### Example

```json
{
  "success": false,
  "error": [
    null
  ],
  "data": null
}
```

- `success` (`updateWebhookEndpoint.response.400.success`; boolean, required)
  - one of `false`
- `error` (`updateWebhookEndpoint.response.400.error`; array<unknown>, required)
- `data` (`updateWebhookEndpoint.response.400.data`; unknown, required)

### 404

Unknown endpoint id.

### 429

Rate limited. The `/v1` API allows at least **67 requests per minute per organization** (about 1,000 requests per 15 minutes) — a guaranteed floor, enforced per edge location, so a geographically spread caller may get more. Wait for the `Retry-After` interval and retry — the error is `retryable`.

#### Example

```json
{
  "code": "rate_limited",
  "message": "string",
  "retryable": true,
  "requestId": "string",
  "docUrl": "string"
}
```

- `code` (`updateWebhookEndpoint.response.429.code`; string, required)
  - one of `"rate_limited"`
- `message` (`updateWebhookEndpoint.response.429.message`; string, required)
- `retryable` (`updateWebhookEndpoint.response.429.retryable`; boolean, required)
  - one of `true`
- `requestId` (`updateWebhookEndpoint.response.429.requestId`; string, required)
- `docUrl` (`updateWebhookEndpoint.response.429.docUrl`; string, optional)


Source: https://docs.cloudraker.com/paperwork/api/webhook-endpoints/update-webhook-endpoint/index.md
