Skip to main content
PATCH
https://agentgate.mynewapi.com
/
v1
/
webhooks
/
{id}
curl -X PATCH https://agentgate.mynewapi.com/v1/webhooks/wh_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "events": ["run.completed", "run.failed", "run.cancelled"],
    "enabled": true
  }'
{
  "id": "wh_abc123",
  "url": "https://your-app.com/webhooks/agentgate",
  "events": ["run.completed", "run.failed", "run.cancelled"],
  "enabled": true,
  "description": "Production webhook",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T11:00:00Z"
}
id
string
required
Webhook ID to update.
url
string
New webhook URL.
events
array
New event subscription list.
enabled
boolean
Enable or disable the webhook.
description
string
Updated description.
The webhook secret cannot be changed. To rotate the secret, delete and recreate the webhook.
curl -X PATCH https://agentgate.mynewapi.com/v1/webhooks/wh_abc123 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "events": ["run.completed", "run.failed", "run.cancelled"],
    "enabled": true
  }'
{
  "id": "wh_abc123",
  "url": "https://your-app.com/webhooks/agentgate",
  "events": ["run.completed", "run.failed", "run.cancelled"],
  "enabled": true,
  "description": "Production webhook",
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T11:00:00Z"
}