Skip to content

Webhooks

VelaOS can send an HTTPS POST to your own endpoint when something happens in your fleet. Which events are sent, what they contain and how to check they came from VelaOS.

A webhook is an address on your side, such as a ticketing system, a chat integration or your own script, that VelaOS calls with an HTTPS POST each time a chosen event happens. Each call carries a JSON body and a signature made with a secret only you and VelaOS know.

Which events are sent?

Events VelaOS sends to webhooks today
EventSent whenPayload fields
device.enrolledA device registers with your organisation, before approval.device_id, serial, model
device.approvedSomeone approves a pending device.device_id
device.onlineA device that was offline connects again.device_id, status
device.offlineA device disconnects, or misses its check-ins for 90 seconds.device_id, status
command.completedA device finishes an action (restart, lock, collect logs and the like), whether it worked or failed.device_id, command_id, command, status (completed or failed), code
policy.updatedSomeone saves a change to a policy, or reverts it to an earlier version.policy_id, version, change (update or revert)
app.deployedAn app from the Vela Catalog finishes installing on a device.device_id, app_id; from a rollout also version, rollout_id
ota.deployedA device restarts on the VelaOS version an OS rollout sent it.device_id, rollout_id, target_version
alert.firedAn alert rule with Send to webhooks fires.alert_id, rule_id, rule_name, rule_type, summary, device_id, rollout_id, details, fired_at

device.online and device.offline come once per change, not on every check-in. To wait a while before you hear about a device going offline, or to hear about failed updates, halted rollouts or expiring device certificates, use an alert rule (below).

Alerts through a webhook

Under Alerts, create a rule (for example Device offline after a number of minutes, Update failed on a device or Rollout halted) and tick Send to webhooks. Rules are checked every minute. Each alert fires once and reaches every webhook subscribed to alert.fired.

How do you add a webhook?

You need a role that can change organisation settings. The endpoint must use https://, must be reachable from the internet (private, local and link-local addresses are refused), and must not contain a user name or password.

  1. 1

    Add the webhook

    In Settings → Webhooks, select New webhook, enter the endpoint URL, pick the events and select Create webhook.

  2. 2

    Copy the signing secret

    The console shows the signing secret once, with a copy button. Store it in your endpoint's secret store, then select I've stored it. VelaOS never shows it again.

  3. 3

    Check a delivery

    Trigger one of the events, for example restart a device, and check that your endpoint accepts the signature.

On each webhook in the list:

  • New secret makes a new signing secret and shows it once. The old one stops working at once, so update your endpoint straight away.
  • Pause stops deliveries without deleting the webhook; Resume starts them again.
  • The bin deletes the webhook.

With an API key that has the settings:write scope you can do the same through the API: POST /api/v1/settings/webhooks creates one and returns its secret once, PATCH /settings/webhooks/ID changes the URL, the events or active, POST /settings/webhooks/ID/rotate-secret returns a new secret, DELETE removes it, and GET /settings/webhooks/ID/deliveries lists the last 50 deliveries with their HTTP status.

What does a call look like?

Every call is a POST with these headers and a JSON body:

http
POST /velaos HTTP/1.1
Content-Type: application/json
X-Vela-Event: device.approved
X-Vela-Signature: 5d41402abc4b2a76b9719d911017c592...

{"event":"device.approved","payload":{"device_id":"3f6c..."},"timestamp":"2026-11-12T09:41:07Z"}

timestamp is the time the call was built, in UTC (ISO 8601).

How do you check the signature?

X-Vela-Signature is the HMAC-SHA256 of the raw request body, keyed with the secret as text, written as lowercase hexadecimal. Compute the same value over the bytes you received, before parsing the JSON, and compare the two in constant time. Reject the call if they differ.

javascript
import crypto from "node:crypto";

function isFromVelaOS(rawBody, signatureHeader, secret) {
  const expected = crypto.createHmac("sha256", secret).update(rawBody).digest("hex");
  const a = Buffer.from(expected);
  const b = Buffer.from(signatureHeader ?? "");
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}

The signature doesn't cover a separate time header. To refuse replayed calls, also check that timestamp in the body is recent, for example within 5 minutes.

Delivery and retries

  • Answer with any 2xx status to confirm. Anything else, or no answer within 10 seconds, counts as a failure.
  • VelaOS tries each call up to 3 times, waiting 2 seconds and then 4 seconds between tries.
  • Redirects are not followed. Point the webhook at the final address.
  • The same event can reach you more than once: a device can be reported as enrolled again when it is approved. Use device_id or alert_id to ignore repeats.
  • VelaOS keeps the status code of each delivery, never your endpoint's answer body.

Answer quickly and do slow work afterwards. A queue on your side keeps calls from timing out.

Was this helpful?
Updated 13 November 2026