Webhooks
The request Hookboard sends for a webhook action, how to verify it, and what your reply can do.
When someone uses a webhook action, Hookboard's server calls the action's url. The browser never calls you directly, and the URL always comes from the card as you stored it, so a device can't point it somewhere else.
The request
| Part | Value |
|---|---|
| Method | The action's method: POST (default), PUT, PATCH or DELETE |
| URL | The action's url, with {{ }} expressions resolved. Must be http or https. |
Content-Type | application/json |
X-Hookboard-Timestamp | Seconds since 1970, as text |
X-Hookboard-Signature | sha256= followed by a hex HMAC; see below |
| Other headers | The action's headers, if any |
The body:
{
"type": "action",
"name": "delete-note",
"card": { "id": "kq3Zc0mB1xY8aQ2d", "externalId": "note-123" },
"payload": { "noteId": 123 },
"state": { "comment": "no longer needed" },
"sentAt": "2026-11-28T09:12:00.000Z"
}| Field | What it is |
|---|---|
type | Always "action". |
name | The action's name, or null if it has none. |
card.id | Hookboard's id for the card. |
card.externalId | The id you sent with the card, or null. |
payload | The action's payload with expressions resolved, or null. |
state | The card's local state on the device at that moment, such as input values. |
sentAt | When Hookboard sent the call, as an ISO date. |
Hookboard doesn't follow redirects.
Verifying the call
Each API key has a signing secret. Find it under Settings > API keys, in the key's menu, as Show signing secret. The signature is the HMAC-SHA256 of the timestamp, a dot, and the raw request body, keyed with that secret:
X-Hookboard-Signature =
"sha256=" + hex( HMAC_SHA256( secret, timestamp + "." + rawBody ) )Check it against the body exactly as it arrived, before you parse the JSON, and reject timestamps more than five minutes old.
import { createHmac, timingSafeEqual } from "node:crypto";
// rawBody is the request body exactly as received, before JSON parsing.
function fromHookboard(headers, rawBody, signingSecret) {
const timestamp = headers["x-hookboard-timestamp"];
const hmac = createHmac("sha256", signingSecret);
hmac.update(timestamp + "." + rawBody);
const expected = "sha256=" + hmac.digest("hex");
const given = headers["x-hookboard-signature"] ?? "";
const fresh = Math.abs(Date.now() / 1000 - Number(timestamp)) < 300;
return (
fresh &&
given.length === expected.length &&
timingSafeEqual(Buffer.from(given), Buffer.from(expected))
);
}import hashlib, hmac, time
def from_hookboard(headers, raw_body: bytes, signing_secret: str) -> bool:
timestamp = headers.get("x-hookboard-timestamp", "")
message = timestamp.encode() + b"." + raw_body
key = signing_secret.encode()
expected = "sha256=" + hmac.new(key, message, hashlib.sha256).hexdigest()
fresh = timestamp.isdigit() and abs(time.time() - int(timestamp)) < 300
given = headers.get("x-hookboard-signature", "")
return fresh and hmac.compare_digest(given, expected)Cards made in Hookboard's builder have no sending app, so their calls aren't signed.
Your reply
Answer with any 2xx status. To change the card, send JSON with an effects list:
{
"effects": [
{ "type": "patchData", "data": { "status": "restarting" } },
{ "type": "toast", "message": "Restart started", "tone": "success" }
]
}| Your answer | What happens |
|---|---|
2xx with effects | Those effects are applied. |
2xx with no body, or JSON without effects | The action's onSuccess effects are applied. |
| Any other status, no answer within 10 seconds, or an unreachable host | The action's onError effects are applied. Without onError, the person sees an error naming your host. |
patchData, replace and dismiss are saved on the server, so every device shows the change. setState, toast, openUrl and error only affect the device that pressed the button.
Limits
| Limit | Value |
|---|---|
| Time to answer | 10 seconds |
| Size of your reply | 256 KB |
| Calls per account | 60 per minute |
| Addresses | Private and loopback network addresses are refused |