Complete API reference for the Kubiya Webhooks service methods and exceptions
list(limit: Optional[int] = None) -> List[Dict[str, Any]]
limit
(Optional[int]
): Limit the number of webhooks to displayList[Dict[str, Any]]
: List of webhooksWebhookError
: For general webhook listing errorsdescribe(webhook_id: str) -> Dict[str, Any]
webhook_id
(str
): The webhook ID to retrieveDict[str, Any]
: Complete webhook detailsWebhookError
: If webhook not found or access deniedcreate(...) -> Dict[str, Any]
name
(str
): Webhook namesource
(str
): Event source (e.g., “github”, “JIRA”, “slack”, “custom”)agent_id
(Optional[str]
): Agent ID (required for agent target)target
(str
): Webhook target - "agent"
or "workflow"
(default: “agent”)workflow
(Optional[str]
): Workflow definition (required for workflow target)runner
(Optional[str]
): Runner name for workflow executionmethod
(str
): Communication method - "Slack"
, "Teams"
, or "HTTP"
(default: “Slack”)destination
(Optional[str]
): Communication destination (channel, team:channel, etc.)filter
(Optional[str]
): JMESPath event filter expressionprompt
(Optional[str]
): Agent prompt with template variables (required for agent target)hide_webhook_headers
(bool
): Hide webhook headers in notifications (default: False)Dict[str, Any]
: Created webhook details including webhook URLtarget="agent"
: agent_id
and prompt
are requiredtarget="workflow"
: workflow
definition is requiredupdate(webhook_id: str, ...) -> Dict[str, Any]
webhook_id
(str
): The webhook ID to updatename
(Optional[str]
): New webhook namesource
(Optional[str]
): New event sourceagent_id
(Optional[str]
): New agent IDmethod
(Optional[str]
): New communication methoddestination
(Optional[str]
): New communication destinationfilter_expression
(Optional[str]
): New event filterprompt
(Optional[str]
): New agent prompthide_headers
(Optional[bool]
): New hide headers settingDict[str, Any]
: Updated webhook detailsdelete(webhook_id: str) -> Dict[str, Any]
webhook_id
(str
): The webhook ID to deleteDict[str, Any]
: Deletion resulttest(...) -> Union[Dict[str, Any], str]
webhook_id
(Optional[str]
): Webhook ID (alternative to webhook_url)webhook_url
(Optional[str]
): Direct webhook URLtest_data
(Optional[Dict[str, Any]]
): JSON data to sendwait_for_response
(bool
): Wait for HTTP response (default: False)auto_generate
(bool
): Auto-generate test data based on template variables (default: False)Union[Dict[str, Any], str]
: Test result or responseimport_from_file(file_path: str) -> Dict[str, Any]
file_path
(str
): Path to the webhook definition fileDict[str, Any]
: Imported webhook details.json
).yaml
, .yml
)export_to_file(webhook_id: str, file_path: str, format: str = "json") -> Dict[str, Any]
webhook_id
(str
): The webhook ID to exportfile_path
(str
): Output file pathformat
(str
): Export format - "json"
or "yaml"
(default: “json”)Dict[str, Any]
: Export result with metadatamessage
(str
): Error message describing the failuredetails
(Optional[Dict[str, Any]]
: Additional error contextagent_id
for agent target){{.path.to.variable}}
syntax:
test()
method with auto_generate=True
analyzes prompt templates and creates appropriate test data: