Webhooks
Signed receivers for gate and review events, with a delivery queue and a test ping.
| Method | Path | Scope | Summary |
|---|---|---|---|
GET | /webhooks | admin | List Webhooks |
POST | /webhooks | admin | Create Webhook |
DELETE | /webhooks/{webhook_id} | admin | Deactivate Webhook |
GET | /webhooks/{webhook_id} | admin | Get Webhook |
GET | /webhooks/{webhook_id}/deliveries | admin | List Deliveries |
POST | /webhooks/{webhook_id}/test | admin | Test Webhook |
Try it
curl -sf -H "Authorization: Bearer $VIGIL_KEY" "$VIGIL_URL/webhooks" # admin key
Routes
GET /webhooks
List Webhooks. Scope: admin.
Response 200:
[
{
"id": 0,
"url": "string",
"events": [
"string"
],
"format": "string",
"active": true,
"secret_hint": "string",
"created_at": "string"
}
]
POST /webhooks
Create Webhook. Scope: admin.
Request body:
{
"url": "string",
"events": [
"string"
],
"format": "json | splunk_hec | datadog"
}
| Field | Type | Required | Notes |
|---|---|---|---|
url | string | yes | |
events | array of string | yes | |
format | json, splunk_hec, datadog | no |
Response 200:
{
"id": 0,
"url": "string",
"events": [
"string"
],
"format": "string",
"active": true,
"secret_hint": "string",
"created_at": "string",
"secret": "string"
}
DELETE /webhooks/{webhook_id}
Deactivate Webhook. Scope: admin.
| Parameter | In | Required | Type | Notes |
|---|---|---|---|---|
webhook_id | path | yes | integer |
Response 200:
"any"
GET /webhooks/{webhook_id}
Get Webhook. Scope: admin.
| Parameter | In | Required | Type | Notes |
|---|---|---|---|---|
webhook_id | path | yes | integer |
Response 200:
{
"id": 0,
"url": "string",
"events": [
"string"
],
"format": "string",
"active": true,
"secret_hint": "string",
"created_at": "string"
}
GET /webhooks/{webhook_id}/deliveries
List Deliveries. Scope: admin.
| Parameter | In | Required | Type | Notes |
|---|---|---|---|---|
webhook_id | path | yes | integer | |
limit | query | no | integer |
Response 200:
[
{
"id": 0,
"event": "string",
"status": "string",
"attempts": 0,
"next_attempt_at": "string",
"last_error": "string | null",
"created_at": "string",
"delivered_at": "string | null"
}
]
POST /webhooks/{webhook_id}/test
Test Webhook. Scope: admin.
Deliver a signed ping now and return what the receiver said. Not queued, not retried.
| Parameter | In | Required | Type | Notes |
|---|---|---|---|---|
webhook_id | path | yes | integer |
Response 200:
{
"delivered": true,
"status_code": 0,
"error": "string | null"
}
Generated from openapi.json (VIGIL 0.2.0). Scopes follow the router dependencies in VIGIL_SPEC.md section 4.2.