The Kubiya Webhooks service provides a powerful interface for managing webhook integrations within the Kubiya platform.
It enables you to create, configure, and monitor webhooks that connect external systems to your Kubiya agents and workflows with comprehensive error handling and flexible configuration options.
# Auto-generate test data based on webhook prompt template variablestest_result = client.webhooks.test( webhook_id="your-webhook-id", auto_generate=True)
# Always test webhooks after creationwebhook = client.webhooks.create(...)# Test with realistic datatest_result = client.webhooks.test( webhook_id=webhook['id'], auto_generate=True, wait_for_response=True)if not test_result.get('success'): print("Webhook test failed - review configuration")
# Use Slack for development notificationsdev_webhook = client.webhooks.create( method="Slack", destination="#dev-alerts")# Use HTTP for programmatic integrationsapi_webhook = client.webhooks.create( method="HTTP", destination="" # Uses SSE streaming)
# Regular backup of important webhooksimportant_webhooks = client.webhooks.list()for webhook in important_webhooks: if webhook.get('name', '').startswith('prod-'): client.webhooks.export_to_file( webhook_id=webhook['id'], file_path=f"./backups/{webhook['name']}.yaml", format="yaml" )