Webhooks
Webhooks let you react to Modelux events in your own infrastructure: budget alerts, config changes, provider health transitions, request anomalies.
Event types
budget.threshold_reachedbudget.exceededrouting_config.updatedrouting_config.createdrouting_config.deletedprovider.health_changedapi_key.revokedrequest.anomaly_detected
Endpoint setup
- Open Integrations -> Webhooks in the dashboard.
- Click Add endpoint. Enter the destination URL.
- Select which event types to subscribe to.
- Modelux generates a signing secret. Save it to verify incoming payloads.
Signature verification
Every delivery includes an X-Modelux-Signature header with an HMAC-SHA256
of the raw body using your signing secret.
import crypto from "crypto";
function verify(body, signature, secret) {
const expected = crypto
.createHmac("sha256", secret)
.update(body)
.digest("hex");
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected),
);
}
Delivery & retries
- Deliveries run asynchronously through a durable queue
- On non-2xx response or timeout: retried with exponential backoff up to 24h
- The dashboard shows per-delivery status, payload, response body, and a replay button for manual redelivery
Slack-compatible format
Set the endpoint URL to a Slack webhook URL. Modelux detects it and formats the payload as a Slack message automatically.