curl -X PATCH https://api.jasni.ai/api/v1/webhooks \ -H "Authorization: Bearer jsk_your_api_key" \ -H "Content-Type: application/json" \ -d '{ "id": "550e8400-e29b-41d4-a716-446655440000", "url": "https://new-server.com/webhooks" }'
{ "success": true, "data": { "webhook": { "id": "550e8400-e29b-41d4-a716-446655440000", "url": "https://new-server.com/webhooks", "events": ["email.received", "email.sent"], "active": true, "description": "Production webhook", "created_at": "2024-01-15T10:30:00Z", "updated_at": "2024-01-15T14:20:00Z" } } }
Update an existing webhook configuration
Show properties
await updateWebhook({ id: 'webhook-id', url: 'https://new-endpoint.com/webhook', });
await updateWebhook({ id: 'webhook-id', events: ['email.received', 'email.sent', 'email.bounced'], });
// Disable during maintenance await updateWebhook({ id: 'webhook-id', active: false, }); // Re-enable after maintenance await updateWebhook({ id: 'webhook-id', active: true, });
await updateWebhook({ id: 'webhook-id', description: 'Updated: Production webhook for AI agent', });
id