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"
}
Webhooks
Update Webhook
Update webhook configuration
PATCH
/
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"
}
string
required
Webhook ID to update.
string
New webhook URL.
array
New event subscription list.
boolean
Enable or disable the webhook.
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"
}