Skip to Content
Hookboard

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

PartValue
MethodThe action's method: POST (default), PUT, PATCH or DELETE
URLThe action's url, with {{ }} expressions resolved. Must be http or https.
Content-Typeapplication/json
X-Hookboard-TimestampSeconds since 1970, as text
X-Hookboard-Signaturesha256= followed by a hex HMAC; see below
Other headersThe 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"
}
FieldWhat it is
typeAlways "action".
nameThe action's name, or null if it has none.
card.idHookboard's id for the card.
card.externalIdThe id you sent with the card, or null.
payloadThe action's payload with expressions resolved, or null.
stateThe card's local state on the device at that moment, such as input values.
sentAtWhen 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 answerWhat happens
2xx with effectsThose effects are applied.
2xx with no body, or JSON without effectsThe action's onSuccess effects are applied.
Any other status, no answer within 10 seconds, or an unreachable hostThe 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

LimitValue
Time to answer10 seconds
Size of your reply256 KB
Calls per account60 per minute
AddressesPrivate and loopback network addresses are refused

On this page