Update Webhook

PATCH /webhooks/{id}

Update a webhook

Path Parameters

id string required

Body Parameters

url string
events "document.received" | "run.processing" | "run.completed" | "run.failed"[]
isActive boolean
curl -X PATCH \
-H "x-api-key: dsk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com/webhook",
"events": [
  "run.completed"
],
"isActive": true
}' \
https://api.tracore.io/webhooks/doc_abc123
import { TracoreClient } from '@tracore/sdk';

const client = new TracoreClient({ apiKey: 'dsk_your_api_key' });

const webhook = await client.webhooks.update('wh_abc123', {
events: ['run.completed'],
isActive: true,
});
console.log(webhook);
200 Response
{
  "id": "ws_abc123",
  "environmentId": "env_abc123",
  "schemaFamilyId": "sf_abc123",
  "url": "https://example.com/webhook",
  "events": [
    "document.received"
  ],
  "isActive": true,
  "secret": "whsec_abc123...",
  "createdAt": "2024-03-15T10:30:00Z",
  "updatedAt": "2024-03-15T10:30:00Z"
}