Skip to main content

Webhooks

Endpoints that receive the workspace's events, signed. test sends a test.webhook event right away, rotate-secret replaces the signing secret, and deliveries get / deliveries retry list and retry an endpoint's deliveries.

CommandHTTPDescription
webhooks listGET /v1/webhooksList webhook endpoints
webhooks createPOST /v1/webhooksCreate a webhook endpoint
webhooks getGET /v1/webhooks/{id}Get a webhook endpoint
webhooks updatePATCH /v1/webhooks/{id}Update a webhook endpoint
webhooks deleteDELETE /v1/webhooks/{id}Delete a webhook endpoint
webhooks rotate-secretPOST /v1/webhooks/{id}/rotate_secretRotate the webhook secret
webhooks testPOST /v1/webhooks/{id}/testSend a test webhook
webhooks deliveries retryPOST /v1/webhooks/{id}/deliveries/{delivery_id}/retryRetry a webhook delivery
webhooks deliveries listGET /v1/webhooks/{id}/deliveriesList the deliveries of a webhook

Examples​

--params carries query, path and header parameters (id, page, filters, X-Workspace-Id); --json carries the request body; --fields limits which fields come back — worth using on every list/get to save context. See Global flags for the full reference.

# List webhook endpoints
kobana dashboards webhooks list --fields "id,url,active,events"

# Create a webhook endpoint
kobana dashboards webhooks create \
--json '{"url": "https://example.com/webhooks", "events": ["portal_user.invited", "portal_user.updated"]}'

# Send a test webhook
kobana dashboards webhooks test --params '{"id": "WEBHOOK_ID"}'

# List the deliveries of a webhook
kobana dashboards webhooks deliveries list \
--params '{"id": "WEBHOOK_ID", "status": "failed"}'

# Retry a webhook delivery
kobana dashboards webhooks deliveries retry \
--params '{"id": "WEBHOOK_ID", "delivery_id": "DELIVERY_ID"}'

Next steps​