Webhooks

Beta

Save an endpoint, verify the signature, and review or retry deliveries.

What a webhook is

A webhook is a saved HTTPS endpoint. Reference it from any callback with callback_id set to the webhook id (whook_...). Efflux signs the body so you can reject anything that did not come from your key.

POST/v3/webhooks

Create a webhook

Request fields

FieldRequiredNotes
nameyesLabel in your webhook list
urlyesEndpoint that will receive deliveries
descriptionno
methodnoHTTP method Efflux will use
headersnoExtra headers added to each delivery
verify_tlsnoVerify the endpoint certificate. Defaults on when omitted

Create returns 201 with the webhook and a secret. The secret is shown once. Later reads return secret_hint only. Rotate when you need a new secret. The response of rotate includes the new secret once.

curl -sS -X POST "https://api.efflux.io/v3/webhooks" \
  -H "Authorization: Bearer $EFFLUX_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Scan sink",
    "url": "https://example.com/efflux",
    "method": "POST",
    "verify_tls": true
  }'

Verify the signature

Each delivery sets:

HeaderValue
Efflux-EventEvent name
Efflux-Delivery-IdDelivery id
Efflux-Webhook-IdWebhook id
Efflux-Signaturet=<unix>,v1=<hex>

v1 is HMAC-SHA256, keyed with the webhook secret, over the ASCII string <unix>. concatenated with the raw body. Compare in constant time, and reject timestamps outside the window you allow.

Do not put Efflux-Event, Efflux-Delivery-Id, Efflux-Webhook-Id, or Efflux-Signature in the headers map. Those names are reserved.

Manage and test

GET/v3/webhooks

List webhooks

GET/v3/webhooks/{webhook_id}

Get a webhook

PUT/v3/webhooks/{webhook_id}

Replace mutable fields

DELETE/v3/webhooks/{webhook_id}

Delete a webhook

POST/v3/webhooks/{webhook_id}/rotate-secret

Rotate the signing secret

POST/v3/webhooks/{webhook_id}/test

Send a test delivery

GET/v3/webhooks/{webhook_id}/deliveries

Delivery history

Update can change name, description, url, method, headers, active, and verify_tls. It does not change the secret. The list defaults to limit 20 (max 200).

Use the webhook id as callback.success.callback_id (or start / fail) on a job. You can also save that id on preferences so new jobs pick it up when the request leaves the phase empty.

Deleting or deactivating a webhook does not edit preferences or schedules.

Where the id is setWhat happens
On the job requestCreate is rejected
Only in preferencesThat phase is skipped. The job is still created. GET /preferences reports issues
On a schedule's stored requestThat run is not created. The schedule keeps the id

The app lists webhooks under Settings then Preferences. Create, update, and delete still use these routes.