Rebuild your site with webhooks

6 min read

When an editor publishes, your static site needs to rebuild and your integrations need to know. Webhooks are that signal: a signed POST to the endpoints you choose, the moment content goes live. Webhooks are on every plan, the free one included.

Add a webhook

  1. 1 Open API keys and find the Webhooks section.
  2. 2 Give it a name and the URL to call - for example a Netlify or Vercel build hook.
  3. 3 Save it. Mojimoto shows a signing secret once; copy it somewhere safe.

What gets sent

On publish, Mojimoto POSTs a JSON payload describing the event and the affected document. Every request carries an X-Mojimoto-Signature header - an HMAC of the body using your signing secret - so your receiver can prove the request is genuine before acting on it.

Verify the signature

The header is sha256= followed by the HMAC in hex. Compute the same over the raw request body and compare it, in constant time, to the header. Reject anything that does not match.

node - verify
import crypto from 'node:crypto';

function verify(rawBody, signature, secret) {
  const expected = 'sha256=' + crypto
    .createHmac('sha256', secret)
    .update(rawBody)
    .digest('hex');

  if (signature.length !== expected.length) {
    return false;
  }

  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected),
  );
}

If you only need rebuilds, point the webhook straight at your host's build hook - no receiver code required.

Next

Build it for real

Spin up a project and try this yourself - your first project is free.

Start free All guides
© 2026 Your Ikigai Ltd · Registered in England & Wales, no. 15274889 文 · モジモト