Webhooks
On every plan, Moveguide tells your server as things happen: your alert share and all of your plan's included sessions used, Avis pausing on your site, a key revoked, and a serious warning near a listing guests are asking about. Set an address, and each event arrives as a signed POST.
The events
| Event | When it's sent |
|---|---|
usage.threshold | Your alert share of your plan's included sessions is used in a cycle — 80% unless you set another in Settings, under Usage alerts — and again when all of them are. Once each, every cycle. |
widget.paused | Avis pauses on your site: your wallet is empty, or a spending cap set to pause is reached — your organisation's, a key's or a team member's. |
key.revoked | An API key is revoked on the API keys page. |
alert.triggered | One of your alerts in the console fired, with "Your system" among its channels: the rule (id, name, kind, severity), the assets it fired for (your ID, name, vicinity and the facts) and a link to open them. test is true for a test send. |
warning.near_listing | A serious warning reaches a listing guests asked Avis about in the last 7 days — below. Looked for every hour. |
test | Sent from Settings, to try your address. |
Usage and pausing also reach you as console alerts and emails; the events come whatever your email preferences. Events don't count as sessions and cost nothing.
Your webhook
Owners and Admins set its address in Settings → General, under Webhooks: https, and reachable from the internet. Each event is one call:
POST https://api.example.com/moveguide/events
Content-Type: application/json
User-Agent: Moveguide-Webhooks/1
Moveguide-Signature: t=1792401124,v1=9c41…
{
"version": 1,
"id": "evt_5e0b9c2f7a41d3e86b1f0c94",
"type": "usage.threshold",
"createdAt": "2026-10-19T09:12:04.512Z",
"details": {
"percent": 80,
"used": 4800,
"included": 6000,
"plan": "growth",
"cycleStart": "2026-10-01T00:00:00.000Z"
}
}id— the event's own, the same on every try.type— which event it is;details— what happened, by type.createdAt— when it happened. Events can arrive out of order: go by this.version— 1. Fields may be added; existing ones keep their meaning.
What each event says
usage.threshold — the example above: percent is the share reached (your alert share, or 100), with the sessions used and included this cycle, your plan and when the cycle started.
widget.paused:
"details": {
"reason": "spending_cap",
"scope": { "kind": "key", "key": { "id": "4b8e…", "name": "Main site" } },
"resumesOn": "2026-11-01T00:00:00.000Z"
}reason—wallet_empty: Avis starts again when the wallet is topped up.spending_cap: it starts again onresumesOn, your next cycle, unless the cap is raised or removed sooner.scope— where Avis paused:organization, everywhere;key, the sites using that key;member, the sites using the keys a team member created.- Conversations already under way finish as usual.
key.revoked:
"details": {
"key": { "id": "4b8e…", "name": "Main site", "prefix": "mvg_live_3f9", "test": false }
}The key itself is never sent — its name, and the first characters you see on the API keys page.
warning.near_listing:
"details": {
"listing": { "id": "listing-123", "h3": "8965a6a6a6bffff" },
"warning": {
"kind": "flood",
"category": "natural_hazard",
"severity": "serious",
"confirmedBy": "official",
"issuedBy": ["GDACS, the UN and EU disaster alert system"],
"starts": "2026-10-18",
"ends": "2026-10-22",
"ongoing": true
},
"guests": { "sessionsLast7Days": 14 }
}- Every hour, Moveguide looks at the listings guests asked Avis about in the last 7 days — up to 50, the most asked about first — and at what reaches each one now and over the next ten days.
- A warning is a live event, confirmed, that Avis would tell a guest to stay away from — a flood, cyclone or tsunami alert, a curfew, a clash — or any official alert of a serious or critical threat. Each is sent once for each listing.
listing.id— your listing ID, as in the tag'sdata-property-id;h3— its map tile, in the open H3 grid at resolution 9.kindandcategory— what it is:natural_hazard,civil_unrest,crime_violence,disruptionorhealth.severity—notice,caution,seriousorcritical.confirmedBy—official, an official alert, orseveral_reports. An official alert names the body that issued it inissuedBy, so you can follow its updates.startsandends— its dates,endsempty when not known;ongoing— under way when sent.sessionsLast7Days— the sessions in which guests asked Avis about the listing in the last 7 days.
test:
"details": { "message": "A test event from Moveguide — your webhook works." }Checking it's Moveguide
Each event is signed like a search call, with the same secret. Moveguide-Signature holds the time it was sent (t, in Unix seconds) and v1, an HMAC-SHA256 of t, a full stop and the raw body, made with your signing secret. Owners and Admins find the secret in Settings, under Webhooks. Turn away an event whose signature doesn't match, or that was sent more than five minutes ago:
import crypto from "node:crypto";
// rawBody: the request body exactly as it arrived, before any JSON parsing
function fromMoveguide(rawBody, header, secret) {
const [, t, v1] = /^t=(\d+),v1=([0-9a-f]{64})$/.exec(header ?? "") ?? [];
if (!t || Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
const expected = crypto.createHmac("sha256", secret).update(t + "." + rawBody).digest();
return crypto.timingSafeEqual(expected, Buffer.from(v1, "hex"));
}Answering, and trying again
- Answer with any 2xx status within 5 seconds. Nothing in your answer is read: answer first, and do the work after.
- Anything else — another status, no answer, a redirect — and the event is tried again after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 12 hours, then given up on: seven tries over about 21 hours.
- Each try goes to the address set at the time: change it, and the new one gets what's still to come. Remove it, and nothing more is sent.
- An event can arrive more than once: keep the ids you've handled, and skip one you've seen.
- Redirects aren't followed, and nothing is sent to a private network.
In the console
Settings → General, under Webhooks, lists your latest events and how each went: delivered, with your server's status, not delivered yet and when it's tried again, or given up on. Owners and Admins can send a test event there. Events are kept 30 days.
What's sent
Events carry your account's own news and warnings — never what guests type, who they are or their network addresses, and never your team members' names or emails. Warnings name no outlets and give no links; an official alert names the body that issued it. What's kept, and for how long: the privacy policy.