Webhooks API
Outbound webhook subscriptions — CRUD, test delivery, and delivery log.
Endpoints Overview
| Method | Endpoint | Description |
|---|---|---|
| GET | /spaces/{slug}/webhooks/event-types | List event types |
| GET | /spaces/{slug}/webhooks | List webhooks |
| POST | /spaces/{slug}/webhooks | Create webhook |
| PATCH | /spaces/{slug}/webhooks/{id} | Update webhook |
| DELETE | /spaces/{slug}/webhooks/{id} | Delete webhook |
| POST | /spaces/{slug}/webhooks/{id}/test | Send test event |
| GET | /spaces/{slug}/webhooks/{id}/deliveries | Delivery log |
List Event Types
GET /spaces/{slug}/webhooks/event-types
Returns all supported event types grouped by category (e.g., product.created, quality_check.failed).
Create Webhook
POST /spaces/{slug}/webhooks
{
"url": "https://hooks.example.com/qarion",
"event_types": ["product.created", "quality_check.failed"],
"secret": "<your-signing-secret>",
"is_enabled": true
}
Test Webhook
POST /spaces/{slug}/webhooks/{webhook_id}/test
Sends a synthetic event to the webhook URL and returns the delivery result (status code, response time).
Delivery Log
GET /spaces/{slug}/webhooks/{webhook_id}/deliveries
Paginated log of webhook delivery attempts with status, response code, and timestamps.
Error Responses
| Status | Description |
|---|---|
404 | Webhook not found |