Existing integrations remain unsigned by default. Opt in from Project → Webhooks or send signingEnabled: true to this endpoint. WhatsApp and SMS status payloads remain unchanged.
Configure optional signing
Use a project API key with webhooks:write. Example request body:
{"url":"https://example.com/webhooks/wevlix","enabled":true,"signingEnabled":true}The response envelope contains data.signingSecret only when a key is generated. Copy it into your receiver secret store. Wevlix stores it encrypted; normal GET responses expose only signingEnabled and signingKeyConfigured.
Verify incoming deliveries
Read x-wevlix-timestamp (Unix seconds), x-wevlix-signature (sha256=<hex>), and the exact raw HTTP body before parsing JSON. Compute HMAC-SHA256 of timestamp + "." + rawBody, using the returned key as a UTF-8 string (do not hex-decode it). Compare signatures in constant time, reject missing/invalid signatures and timestamps more than 5 minutes away from your server clock, and deduplicate x-wevlix-delivery-id in durable storage. Acknowledge already processed events with 2xx.
const { createHmac, timingSafeEqual } = require("node:crypto");
function verify(rawBody, timestamp, signature, key) {
if (typeof timestamp !== "string" || !/^\d+$/.test(timestamp)) return false;
if (Math.abs(Date.now() / 1000 - Number(timestamp)) > 300) return false;
if (typeof signature !== "string" || !/^sha256=[a-f0-9]{64}$/.test(signature)) return false;
const expected = createHmac("sha256", key).update(timestamp + ".").update(rawBody).digest();
return timingSafeEqual(expected, Buffer.from(signature.slice(7), "hex"));
}Media-backed outbound messages may include message.attachments with Wevlix media IDs. Download through GET /v1/media/{mediaId}/content with a live project API key and media:read. Files expire 30 days after storage.
Retries retain the event ID but receive a fresh signing timestamp. Do not use the payload createdAt as the signature timestamp. Test deliveries use the same signing format.
Disable or replace a key
Omitting signing fields preserves the saved configuration. signingEnabled: false disables signature headers without changing the payload or deleting the saved key. To replace a key, send signingEnabled: true and regenerateSigningSecret: true: this immediately invalidates the previous key, with no overlap window. Coordinate replacement with your receiver. No existing integration is opted in automatically.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
200