> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developer.jelliu.co/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developer.jelliu.co/_mcp/server.

# Update a webhook

PATCH https://api.jelliu.co/api/webhooks/{webhookId}
Content-Type: application/json

Changes only the fields you send; the rest keep their stored values. Send `{"is_active": true}`
to re-enable a webhook that was disabled after repeated failures. That also resets
`failure_count` to 0 and clears `last_error`. The secret cannot be changed here: use
`POST /api/webhooks/{webhookId}/rotate-secret`.

Arrays and objects are replaced, not merged. Sending `events` replaces the whole list, and sending
`filters` or `headers` replaces the stored object. Send `{}` to clear them. The rule against call
filters on `audit.log_recorded` is checked against the result, meaning the stored values merged
with the ones you send. A new `url` goes through the same syntax and DNS checks as on create.

**Side effects.** Updates the webhook and `updated_at`. `is_active: false` stops deliveries at once,
including retries already queued. Written to the audit log as `webhook.update`.

**Idempotency.** Safe to retry: sending the same body again leaves the webhook in the same state.

**Webhook events.** Emits `audit.log_recorded` to webhooks subscribed to it. See [Webhooks](/webhooks).

**Access**

* **Required scope:** `full`. Human users need the owner or admin role.
* **Rate limit:** General API (120–600 requests/min per workspace, by plan) plus the configuration-mutations limit — 10 requests/min per workspace, shared with other configuration changes. See [Rate limits](/rate-limits).
* **Plan:** Requires the `webhook` plan feature. Every plan includes it today, so this gate currently refuses nobody.

Reference: https://developer.jelliu.co/api-reference/webhooks/patch-webhooks-by-webhook-id

## Authentication

- `Authorization` header (bearer token, required) — Workspace API key: `jl_` followed by 64 lowercase hex characters, created by the workspace owner in the dashboard (**Settings → API Keys**) and sent as `Authorization: Bearer jl_...`. The plaintext is shown once, at creation; Jelliu stores only a SHA-256 hash. A workspace can hold up to 25 active keys. | Scope | GET / HEAD | POST / PUT / PATCH / DELETE | Admin-only routes | | --- | --- | --- | --- | | `read` | Yes | No | No | | `write` | Yes | Yes | No | | `full` | Yes | Yes | Yes | Operations restricted to admins or owners reject keys without the `full` scope with `403`, and say so in their description. No key, whatever its scope, can mint or revoke API keys or rotate a webhook secret — that requires a signed-in owner session. A revoked key stops authenticating within about 10 seconds. See [Authentication](/authentication).

## Request

### Path parameters

- `webhookId` (string, required) — UUID of the outbound webhook. It must belong to the authenticated workspace; an id from another workspace answers `404`, exactly like an unknown one. Returned as `id` by `GET /api/webhooks`.

### Body (application/json)

This endpoint expects an object.

- `url` (string, optional) — New endpoint. Same syntax and DNS checks as on create.
- `events` (list of enum, optional) — Replaces the whole subscription list (at least one event).
  - Allowed values: `*`, `call.started`, `call.completed`, `call.failed`, `call.recording_ready`, `call.transcript_ready`, `agent.created`, `agent.updated`, `agent.action_recorded`, `audit.log_recorded`, `campaign.started`, `campaign.paused`, `campaign.completed`, `contact.created`, `contact.updated`, `contact.status_changed`, `contact.converted`, `contact.dnc`, `usage.threshold_reached`, `subscription.changed`, `integration.sync_completed`, `integration.sync_failed`, `integration.error`, `crm_sync.completed`, `crm_sync.failed`
- `description` (string, optional) — New label, up to 500 characters.
- `is_active` (boolean, optional) — `false` pauses deliveries, including queued retries. `true` re-enables and resets `failure_count` and `last_error`.
- `filters` (object, optional) — Optional delivery filters, combined with AND. The ID, outcome and sentiment filters fail closed: if the event's `data` does not carry the field, the event is NOT delivered. They are matched against `data.campaignId`/`data.campaign_id`, `data.agentId`/`data.agent_id`, `data.outcome`/`data.result` and `data.sentimentScore`/`data.sentiment`. Filtered-out events leave no delivery log entry.
  - `campaignIds` (list of string, optional) — Deliver only events whose campaign is in this list (up to 50 UUIDs). Events without a campaign are dropped.
  - `agentIds` (list of string, optional) — Deliver only events whose agent is in this list (up to 50 UUIDs). Events without an agent are dropped.
  - `outcomes` (list of string, optional) — Deliver only events whose outcome is in this list (up to 20 values, 100 characters each). Events without an outcome are dropped.
  - `minSentiment` (double, optional) — Deliver only events whose sentiment score is at least this value (-1 to 1). Events without a score are dropped.
  - `auditActions` (list of string, optional) — Only for `audit.log_recorded`: action prefixes, combined with OR (for example `payments.`, or `FAILED_` for refused attempts only). Each prefix is tested against the action with and without its `FAILED_MUTATION:` / `FAILED_READ:` prefix. Ignored for every other event.
  - `conditions` (list of object, optional) — Custom conditions on the payload, up to 10. All must hold. `field` is a dot path inside `data`.
    - `field` (string, required) — Dot path inside the event's `data`.
    - `operator` (enum, required) — `eq`/`neq` compare for equality; `gt`/`lt`/`gte`/`lte` compare numbers only; `contains` tests a substring on strings only; `exists` checks that the field is present.
      - Allowed values: `eq`, `neq`, `gt`, `lt`, `gte`, `lte`, `contains`, `exists`
    - `value` (string or double or boolean, optional) — Value to compare with. Not used by `exists`.
- `headers` (map from string to string, optional) — Replaces all custom headers. `{}` removes them. Same limits as on create.
- `payload_template` (string, optional) — Replaces the template. `""` goes back to the default body. Same validation as on create.

## Response

### 200

The updated webhook, secret masked.

- `data` (object, required) — An outbound webhook exactly as the API serializes it: the stored row with snake_case keys. `secret` is masked as `"[configured]"` on list, retrieve and update. The plaintext signing secret is returned only once, in the `POST /api/webhooks` response, and a new one by `rotate-secret`. Custom `headers` are returned as stored, in plaintext.
  - `id` (string, required) — Unique identifier of the webhook. Use it as `webhookId` in the other webhook endpoints.
  - `tenant_id` (string, required) — The workspace that owns the webhook.
  - `url` (string, required) — Endpoint that receives the `POST` deliveries.
  - `secret` (string, required) — `"[configured]"` everywhere except the create response, where it is the plaintext signing secret (`whsec_` followed by 48 hex characters). Store it then; it cannot be read back.
  - `events` (list of enum, required) — Subscribed event names. `"*"` means every event except `audit.log_recorded`.
    - Allowed values: `*`, `call.started`, `call.completed`, `call.failed`, `call.recording_ready`, `call.transcript_ready`, `agent.created`, `agent.updated`, `agent.action_recorded`, `audit.log_recorded`, `campaign.started`, `campaign.paused`, `campaign.completed`, `contact.created`, `contact.updated`, `contact.status_changed`, `contact.converted`, `contact.dnc`, `usage.threshold_reached`, `subscription.changed`, `integration.sync_completed`, `integration.sync_failed`, `integration.error`, `crm_sync.completed`, `crm_sync.failed`
  - `is_active` (boolean, required) — `false` after a `PATCH` with `is_active: false`, or after the webhook was disabled automatically once 10 consecutive events failed. Inactive webhooks receive nothing.
  - `failure_count` (integer, required) — Consecutive events that failed for good. Reset to 0 by any 2xx delivery and by re-enabling the webhook. At 10 the webhook is disabled.
  - `created_at` (datetime, required) — When the webhook was created.
  - `updated_at` (datetime, required) — Last change to the row, including delivery bookkeeping (logs, counters), not only your edits.
  - `description` (string, optional, nullable) — Free-text label shown in the dashboard, up to 500 characters.
  - `filters` (object, optional, nullable) — Delivery filters, or null when every subscribed event is delivered. See `WebhookFilters`.
    - `campaignIds` (list of string, optional) — Deliver only events whose campaign is in this list (up to 50 UUIDs). Events without a campaign are dropped.
    - `agentIds` (list of string, optional) — Deliver only events whose agent is in this list (up to 50 UUIDs). Events without an agent are dropped.
    - `outcomes` (list of string, optional) — Deliver only events whose outcome is in this list (up to 20 values, 100 characters each). Events without an outcome are dropped.
    - `minSentiment` (double, optional) — Deliver only events whose sentiment score is at least this value (-1 to 1). Events without a score are dropped.
    - `auditActions` (list of string, optional) — Only for `audit.log_recorded`: action prefixes, combined with OR (for example `payments.`, or `FAILED_` for refused attempts only). Each prefix is tested against the action with and without its `FAILED_MUTATION:` / `FAILED_READ:` prefix. Ignored for every other event.
    - `conditions` (list of object, optional) — Custom conditions on the payload, up to 10. All must hold. `field` is a dot path inside `data`.
      - `field` (string, required) — Dot path inside the event's `data`.
      - `operator` (enum, required) — `eq`/`neq` compare for equality; `gt`/`lt`/`gte`/`lte` compare numbers only; `contains` tests a substring on strings only; `exists` checks that the field is present.
        - Allowed values: `eq`, `neq`, `gt`, `lt`, `gte`, `lte`, `contains`, `exists`
      - `value` (string or double or boolean, optional) — Value to compare with. Not used by `exists`.
  - `headers` (map from string to string, optional, nullable) — Custom headers added to every delivery, returned in plaintext. Null when none are set.
  - `payload_template` (string, optional, nullable) — Custom JSON body template, or null for the default `{event, timestamp, data}` body. See `CreateWebhookInput.payload_template`.
  - `delivery_logs` (list of object, optional, nullable) — The last delivery attempts (at most 25), newest first. Same rows as `GET /api/webhooks/{webhookId}/delivery-logs`. Null until the first attempt.
    - `event` (enum, required) — Outbound webhook event catalog, plus `*` (every event except `audit.log_recorded`). Every value is accepted in a subscription, but only these events are delivered today: `call.completed`, `call.failed`, `campaign.completed`, `crm_sync.completed`, `crm_sync.failed`, `agent.action_recorded` and `audit.log_recorded`. The rest are reserved and are not sent yet.
      - Allowed values: `*`, `call.started`, `call.completed`, `call.failed`, `call.recording_ready`, `call.transcript_ready`, `agent.created`, `agent.updated`, `agent.action_recorded`, `audit.log_recorded`, `campaign.started`, `campaign.paused`, `campaign.completed`, `contact.created`, `contact.updated`, `contact.status_changed`, `contact.converted`, `contact.dnc`, `usage.threshold_reached`, `subscription.changed`, `integration.sync_completed`, `integration.sync_failed`, `integration.error`, `crm_sync.completed`, `crm_sync.failed`
    - `status` (integer, required) — HTTP status your endpoint answered. `0` means no response: a timeout, a connection or DNS failure, or a delivery refused before sending (invalid custom headers, a `payload_template` that did not render).
    - `duration_ms` (integer, required) — Time from the start of the attempt to the response or failure, in milliseconds. `0` for deliveries refused before sending.
    - `delivered_at` (datetime, required) — The event's timestamp (the same value as `X-Webhook-Timestamp`), not the time of this attempt. Retries of one event share it.
    - `error` (string, optional) — Present on failures only. Formats include `HTTP <status>: [remote-error] <body>` (body sanitized and truncated to 500 characters) and network or timeout messages.
  - `last_triggered_at` (datetime, optional, nullable) — When a delivery last succeeded or finally failed. Null until then.
  - `last_error` (string, optional, nullable) — Error of the most recent final failure. Cleared by a success or by re-enabling.
  - `deleted_at` (datetime, optional, nullable) — Always `null` in responses; deleted webhooks are not returned.

## Errors

### 400 Bad Request Error

The body failed validation (issue list in `details`), or the merged events and filters are incompatible. The second case comes from the service, with the reason in `message` and no `details`.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 401 Unauthorized Error

No usable credential. Either the `Authorization` header is missing or is not a well-formed `Bearer jl_…` key, or the key is unknown, revoked or expired. Do not retry with the same key. See [Authentication](/authentication#401-unauthorized).

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 403 Forbidden Error

Role below admin, an API key without the `full` scope, or a suspended workspace.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 404 Not Found Error

No webhook with this id in the workspace, or it was deleted.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 429 Too Many Requests Error

The configuration-mutations limit (10/min) or the general API limit was exceeded.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

### 500 Internal Server Error

The new `url` was refused when its hostname was resolved. The response does not say why.

- `error` (object, required) — The error object. Always has `code` and `message`.
  - `code` (string, required) — Stable machine-readable error code (for example `VALIDATION_FAILED`, `UNAUTHORIZED`, `FORBIDDEN`, `NOT_FOUND`, `BILLING_ERROR`, `COMPLIANCE_BLOCKED`, `RATE_LIMIT_EXCEEDED`, `INTERNAL_ERROR`). Switch on this, not on `message`. See [Errors](/errors).
  - `message` (string, required) — Human-readable explanation. English or Spanish depending on the route; may change without notice.
  - `details` (object or list of object, optional) — Present on `VALIDATION_FAILED` only. Its shape depends on how the route validates: * a field map, either Zod's `flatten()` output (`{ "formErrors": [], "fieldErrors": { "name": ["..."] } }`) or just its `fieldErrors` part (`{ "name": ["..."] }`); * an issue list, where each issue has at least `path`, `message` and `code`. `path` is a dot-separated string on routes that let the schema throw, and an array of keys on routes that forward Zod's raw issues (those also carry Zod's extra issue fields).
    - Field map
      - `formErrors` (list of string, optional)
      - `fieldErrors` (map from string to list of string, optional)
  - `metadata` (map from string to any, optional) — Structured detail exposed for a small allowlist of codes only — for example `BILLING_ERROR` carries `limit`, `current` and `tier` (resource caps) or `tier` and `feature` (feature gates).

## Examples

### Webhooks_patchWebhooksByWebhookId_example

**Request**

```json
undefined
```

**Response**

```json
{
  "data": {
    "id": "3c9e1f7a-6b2d-4e8a-a5c4-1f0b2d3e4a5b",
    "tenant_id": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
    "url": "https://siem.inmobiliariaandina.co/ingest/jelliu",
    "secret": "[configured]",
    "events": [
      "audit.log_recorded"
    ],
    "is_active": true,
    "failure_count": 0,
    "created_at": "2026-08-20T10:00:00.000Z",
    "updated_at": "2026-09-14T16:21:08.330Z",
    "description": "Auditoría hacia el SIEM",
    "filters": {
      "auditActions": [
        "webhook.",
        "FAILED_"
      ]
    },
    "headers": {},
    "payload_template": null,
    "delivery_logs": [
      {
        "event": "audit.log_recorded",
        "status": 0,
        "duration_ms": 10003,
        "delivered_at": "2026-08-30T09:12:44.010Z",
        "error": "The operation was aborted due to timeout"
      }
    ],
    "last_triggered_at": "2026-08-30T09:13:59.871Z",
    "last_error": null,
    "deleted_at": null
  }
}
```

**SDK Code**

```python Webhooks_patchWebhooksByWebhookId_example
import requests

url = "https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d"

headers = {"Authorization": "Bearer <token>"}

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

print(response.json())
```

```javascript Webhooks_patchWebhooksByWebhookId_example
const url = 'https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d';
const options = {method: 'PATCH', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Webhooks_patchWebhooksByWebhookId_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d"

	req, _ := http.NewRequest("PATCH", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Webhooks_patchWebhooksByWebhookId_example
require 'uri'
require 'net/http'

url = URI("https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Webhooks_patchWebhooksByWebhookId_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Webhooks_patchWebhooksByWebhookId_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Webhooks_patchWebhooksByWebhookId_example
using RestSharp;

var client = new RestClient("https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Webhooks_patchWebhooksByWebhookId_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Re-enable after auto-disable

**Request**

```json
{
  "is_active": true
}
```

**Response**

```json
{
  "data": {
    "id": "3c9e1f7a-6b2d-4e8a-a5c4-1f0b2d3e4a5b",
    "tenant_id": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
    "url": "https://siem.inmobiliariaandina.co/ingest/jelliu",
    "secret": "[configured]",
    "events": [
      "audit.log_recorded"
    ],
    "is_active": true,
    "failure_count": 0,
    "created_at": "2026-08-20T10:00:00.000Z",
    "updated_at": "2026-09-14T16:21:08.330Z",
    "description": "Auditoría hacia el SIEM",
    "filters": {
      "auditActions": [
        "webhook.",
        "FAILED_"
      ]
    },
    "headers": {},
    "payload_template": null,
    "delivery_logs": [
      {
        "event": "audit.log_recorded",
        "status": 0,
        "duration_ms": 10003,
        "delivered_at": "2026-08-30T09:12:44.010Z",
        "error": "The operation was aborted due to timeout"
      }
    ],
    "last_triggered_at": "2026-08-30T09:13:59.871Z",
    "last_error": null,
    "deleted_at": null
  }
}
```

**SDK Code**

```python Re-enable after auto-disable
import requests

url = "https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d"

payload = { "is_active": True }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Re-enable after auto-disable
const url = 'https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"is_active":true}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Re-enable after auto-disable
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d"

	payload := strings.NewReader("{\n  \"is_active\": true\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Re-enable after auto-disable
require 'uri'
require 'net/http'

url = URI("https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"is_active\": true\n}"

response = http.request(request)
puts response.read_body
```

```java Re-enable after auto-disable
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"is_active\": true\n}")
  .asString();
```

```php Re-enable after auto-disable
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d', [
  'body' => '{
  "is_active": true
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Re-enable after auto-disable
using RestSharp;

var client = new RestClient("https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"is_active\": true\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Re-enable after auto-disable
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["is_active": true] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Change events and filters

**Request**

```json
{
  "events": [
    "call.completed",
    "campaign.completed"
  ],
  "filters": {
    "agentIds": [
      "2c4e6a8b-0d1f-4e3a-9b5c-7d9e1f3a5b7c"
    ]
  }
}
```

**Response**

```json
{
  "data": {
    "id": "3c9e1f7a-6b2d-4e8a-a5c4-1f0b2d3e4a5b",
    "tenant_id": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
    "url": "https://siem.inmobiliariaandina.co/ingest/jelliu",
    "secret": "[configured]",
    "events": [
      "audit.log_recorded"
    ],
    "is_active": true,
    "failure_count": 0,
    "created_at": "2026-08-20T10:00:00.000Z",
    "updated_at": "2026-09-14T16:21:08.330Z",
    "description": "Auditoría hacia el SIEM",
    "filters": {
      "auditActions": [
        "webhook.",
        "FAILED_"
      ]
    },
    "headers": {},
    "payload_template": null,
    "delivery_logs": [
      {
        "event": "audit.log_recorded",
        "status": 0,
        "duration_ms": 10003,
        "delivered_at": "2026-08-30T09:12:44.010Z",
        "error": "The operation was aborted due to timeout"
      }
    ],
    "last_triggered_at": "2026-08-30T09:13:59.871Z",
    "last_error": null,
    "deleted_at": null
  }
}
```

**SDK Code**

```python Change events and filters
import requests

url = "https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d"

payload = {
    "events": ["call.completed", "campaign.completed"],
    "filters": { "agentIds": ["2c4e6a8b-0d1f-4e3a-9b5c-7d9e1f3a5b7c"] }
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Change events and filters
const url = 'https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"events":["call.completed","campaign.completed"],"filters":{"agentIds":["2c4e6a8b-0d1f-4e3a-9b5c-7d9e1f3a5b7c"]}}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Change events and filters
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d"

	payload := strings.NewReader("{\n  \"events\": [\n    \"call.completed\",\n    \"campaign.completed\"\n  ],\n  \"filters\": {\n    \"agentIds\": [\n      \"2c4e6a8b-0d1f-4e3a-9b5c-7d9e1f3a5b7c\"\n    ]\n  }\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Change events and filters
require 'uri'
require 'net/http'

url = URI("https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"events\": [\n    \"call.completed\",\n    \"campaign.completed\"\n  ],\n  \"filters\": {\n    \"agentIds\": [\n      \"2c4e6a8b-0d1f-4e3a-9b5c-7d9e1f3a5b7c\"\n    ]\n  }\n}"

response = http.request(request)
puts response.read_body
```

```java Change events and filters
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"events\": [\n    \"call.completed\",\n    \"campaign.completed\"\n  ],\n  \"filters\": {\n    \"agentIds\": [\n      \"2c4e6a8b-0d1f-4e3a-9b5c-7d9e1f3a5b7c\"\n    ]\n  }\n}")
  .asString();
```

```php Change events and filters
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d', [
  'body' => '{
  "events": [
    "call.completed",
    "campaign.completed"
  ],
  "filters": {
    "agentIds": [
      "2c4e6a8b-0d1f-4e3a-9b5c-7d9e1f3a5b7c"
    ]
  }
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Change events and filters
using RestSharp;

var client = new RestClient("https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"events\": [\n    \"call.completed\",\n    \"campaign.completed\"\n  ],\n  \"filters\": {\n    \"agentIds\": [\n      \"2c4e6a8b-0d1f-4e3a-9b5c-7d9e1f3a5b7c\"\n    ]\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Change events and filters
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "events": ["call.completed", "campaign.completed"],
  "filters": ["agentIds": ["2c4e6a8b-0d1f-4e3a-9b5c-7d9e1f3a5b7c"]]
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Go back to the default body and drop custom headers

**Request**

```json
{
  "payload_template": ""
}
```

**Response**

```json
{
  "data": {
    "id": "3c9e1f7a-6b2d-4e8a-a5c4-1f0b2d3e4a5b",
    "tenant_id": "7a1b2c3d-4e5f-4a6b-8c7d-9e0f1a2b3c4d",
    "url": "https://siem.inmobiliariaandina.co/ingest/jelliu",
    "secret": "[configured]",
    "events": [
      "audit.log_recorded"
    ],
    "is_active": true,
    "failure_count": 0,
    "created_at": "2026-08-20T10:00:00.000Z",
    "updated_at": "2026-09-14T16:21:08.330Z",
    "description": "Auditoría hacia el SIEM",
    "filters": {
      "auditActions": [
        "webhook.",
        "FAILED_"
      ]
    },
    "headers": {},
    "payload_template": null,
    "delivery_logs": [
      {
        "event": "audit.log_recorded",
        "status": 0,
        "duration_ms": 10003,
        "delivered_at": "2026-08-30T09:12:44.010Z",
        "error": "The operation was aborted due to timeout"
      }
    ],
    "last_triggered_at": "2026-08-30T09:13:59.871Z",
    "last_error": null,
    "deleted_at": null
  }
}
```

**SDK Code**

```python Go back to the default body and drop custom headers
import requests

url = "https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d"

payload = { "payload_template": "" }
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Go back to the default body and drop custom headers
const url = 'https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d';
const options = {
  method: 'PATCH',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"payload_template":""}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Go back to the default body and drop custom headers
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d"

	payload := strings.NewReader("{\n  \"payload_template\": \"\"\n}")

	req, _ := http.NewRequest("PATCH", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Go back to the default body and drop custom headers
require 'uri'
require 'net/http'

url = URI("https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"payload_template\": \"\"\n}"

response = http.request(request)
puts response.read_body
```

```java Go back to the default body and drop custom headers
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.patch("https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"payload_template\": \"\"\n}")
  .asString();
```

```php Go back to the default body and drop custom headers
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PATCH', 'https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d', [
  'body' => '{
  "payload_template": ""
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp Go back to the default body and drop custom headers
using RestSharp;

var client = new RestClient("https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d");
var request = new RestRequest(Method.PATCH);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"payload_template\": \"\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Go back to the default body and drop custom headers
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = ["payload_template": ""] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.jelliu.co/api/webhooks/9a7b6c5d-4e3f-4a2b-8c1d-0e9f8a7b6c5d")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PATCH"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```