Skip to main content

Webhooks

Signed receivers for gate and review events, with a delivery queue and a test ping.

MethodPathScopeSummary
GET/webhooksadminList Webhooks
POST/webhooksadminCreate Webhook
DELETE/webhooks/{webhook_id}adminDeactivate Webhook
GET/webhooks/{webhook_id}adminGet Webhook
GET/webhooks/{webhook_id}/deliveriesadminList Deliveries
POST/webhooks/{webhook_id}/testadminTest 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"
}
FieldTypeRequiredNotes
urlstringyes
eventsarray of stringyes
formatjson, splunk_hec, datadogno

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.

ParameterInRequiredTypeNotes
webhook_idpathyesinteger

Response 200:

"any"

GET /webhooks/{webhook_id}

Get Webhook. Scope: admin.

ParameterInRequiredTypeNotes
webhook_idpathyesinteger

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.

ParameterInRequiredTypeNotes
webhook_idpathyesinteger
limitquerynointeger

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.

ParameterInRequiredTypeNotes
webhook_idpathyesinteger

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.