Webhooks API
API endpoints for managing webhooks in the Kubiya platform
Webhooks API
The Webhooks API allows you to manage webhooks that can be triggered by various events in the Kubiya platform. You can create, update, and delete webhooks, as well as view their delivery history.
Endpoints
Method | Path | Description |
---|---|---|
GET | /api/v1/webhooks | List all webhooks |
GET | /api/v1/webhooks/{webhookId} | Get webhook details |
POST | /api/v1/webhooks | Create a new webhook |
PUT | /api/v1/webhooks/{webhookId} | Update a webhook |
DELETE | /api/v1/webhooks/{webhookId} | Delete a webhook |
List Webhooks
Retrieve all webhooks configured in your workspace.
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Response
Get Webhook Details
Retrieve details about a specific webhook.
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
webhookId | string | Yes | ID of the webhook |
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Response
Create Webhook
Create a new webhook endpoint.
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Content-Type | Yes | application/json |
Request Body
Notification Methods
Method | Description |
---|---|
Slack | Send notifications to a Slack channel or user |
Teams | Send notifications to a Microsoft Teams channel |
Http | Send notifications to an HTTP endpoint |
Response
Store the secret value returned when creating a webhook securely. This secret is used to validate that incoming webhook requests are from Kubiya. It will only be shown once when the webhook is created.
Update Webhook
Update an existing webhook.
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
webhookId | string | Yes | ID of the webhook to update |
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Content-Type | Yes | application/json |
Request Body
Response
Delete Webhook
Delete a webhook.
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
webhookId | string | Yes | ID of the webhook to delete |
Headers
Name | Required | Description |
---|---|---|
Authorization | Yes | UserKey YOUR_API_KEY |
Response
A successful delete operation returns an HTTP 200 status with no response body.
Webhook Events
When a subscribed event occurs, Kubiya sends an HTTP POST request to your webhook URL with details about the event.
Request Headers
Name | Description |
---|---|
User-Agent | Kubiya-Webhook/1.0 |
Content-Type | application/json |
X-Kubiya-Event | Type of event (e.g., execution.completed ) |
X-Kubiya-Signature | HMAC signature of the request body using your webhook secret |
X-Kubiya-Timestamp | Unix timestamp when the event was sent |
X-Kubiya-Request-ID | Unique ID for the webhook request |
Request Body Example (execution.completed)
Example Usage
Webhooks are a powerful way to integrate Kubiya with your existing systems. Make sure to handle webhook events securely and implement proper error handling.
Common Errors
HTTP Status | Description |
---|---|
400 | Bad Request - Invalid request body or missing required fields |
401 | Unauthorized - API key is missing or invalid |
403 | Forbidden - The API key doesn't have permission to perform this action |
404 | Not Found - The specified webhook was not found |
500 | Internal Server Error - An unexpected error occurred on the server |
Next Steps
After setting up webhooks, you can:
- Monitor webhook delivery status through the Webhooks API
- Set up Agents to process webhook events
- Configure Sources to trigger webhook events