<!-- source: https://secondlayer.tools/docs/api-reference#update-webhook -->

## Update a webhook

`PATCH /api/webhooks/{id}` (self-hosted instances only)

Change any subset of fields; at least one is required. `triggers` are fixed at create: to change them, create a new webhook.

### Path parameters

| Name | Type | Description |
| --- | --- | --- |
| `id` | string, required | Webhook id (UUID), as returned by create or list. |

### Body

| Field | Type | Description |
| --- | --- | --- |
| `name` | string | New unique name. |
| `url` | string | New delivery target, `http://` or `https://`. |
| `format` | enum | Payload and signing format. `standard-webhooks` signs with the webhook's secret; the others shape the body for that receiver. |
| `authConfig` | object | Per-format receiver credentials: `token` / `tokenEnc` for `trigger` and `cloudflare`, `headers` or `basicAuth` for `raw`. Write-only — never returned; a read gets `auth` instead. |
| `maxRetries` | integer · 0 to 100 | Attempts before an event moves to the dead-letter queue. Default 7. |
| `timeoutMs` | integer · 100 to 300000 | Per-attempt HTTP timeout in milliseconds. Default 10000. |
| `concurrency` | integer · 1 to 100 | Deliveries in flight at once for this webhook. Default 4. |

### Returns

One `Webhook` object.

### Responses

- `200` The updated webhook
- `400` A parameter, filter, cursor or body field was refused; `code` says which. A body carrying `subgraphName`, `tableName` or `filter` is answered with `SUBGRAPH_WEBHOOKS_REMOVED`: subgraph webhooks were removed
- `401` This bind requires the instance token, and it was missing or wrong
- `404` No webhook with this id
- `415` Missing or non-JSON `Content-Type` (`UNSUPPORTED_MEDIA_TYPE`) — writes must send `Content-Type: application/json`

### Example

```bash
curl -X PATCH http://127.0.0.1:3800/api/webhooks/{id} \
  -H "Authorization: Bearer $INSTANCE_TOKEN" \
  --json '{
  "url": "https://example.com/webhooks/sbtc-v2",
  "maxRetries": 10
}'
```

```json
{
  "id": "3f1c2a9e-8b7d-4c21-9a55-6e0d4b2f7c18",
  "name": "sbtc-moves",
  "status": "active",
  "kind": "chain",
  "format": "standard-webhooks",
  "url": "https://example.com/webhooks/sbtc",
  "lastDeliveryAt": "2026-09-22T14:03:11.402Z",
  "lastSuccessAt": "2026-09-22T14:03:11.402Z",
  "circuitOpenedAt": null,
  "circuitFailures": 0,
  "managedBy": null,
  "createdAt": "2026-09-20T09:12:45.118Z",
  "updatedAt": "2026-09-20T09:12:45.118Z",
  "triggers": [
    {
      "type": "ft_transfer",
      "assetIdentifier": "SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-token::sbtc-token",
      "minAmount": "100000"
    },
    {
      "type": "print_event",
      "contractId": "SM3VDXK3WZZSA84XXFKAFAF15NNZX32CTSG82JFQ4.sbtc-registry"
    }
  ],
  "auth": {
    "type": "none",
    "headerNames": [],
    "hasSecret": false
  },
  "maxRetries": 7,
  "timeoutMs": 10000,
  "concurrency": 4,
  "lastError": null,
  "receiverCertExpiresAt": "2026-12-25T22:56:35.000Z",
  "warning": null
}
```
