Contact forms
Any HTML form on your site can send messages to you. No code or extra service needed.
Add a form
Point the form at /_form/ followed by a name you choose:
<form action="/_form/contact" method="post">
<input name="name" placeholder="Your name" required>
<input name="email" type="email" placeholder="Your email" required>
<textarea name="message" required></textarea>
<button>Send</button>
</form>
Each message is emailed to you and kept under your site's Forms tab, where you can also download
them as a spreadsheet (CSV). Replying to the email replies to the visitor, thanks to the email field.
Building the site for someone else? On the Forms tab you can send a site's messages to another address, such as your client's. We email that address a link first, and messages go there only once it's confirmed. Each message includes a link to stop them.
Optional extras
<input type="hidden" name="_subject" value="New message from my site">: the subject of the email you get.<input type="hidden" name="_redirect" value="/thanks.html">: a page on your site to show after sending.<input name="_gotcha" style="display:none" tabindex="-1" autocomplete="off">: catches spam bots. Keep it hidden; people never fill it in.
Sending with JavaScript
To send a form without leaving the page (a pop-up, or a site an AI assistant made), post it with
fetch and ask for JSON. You get {"ok": true} back instead of the thank-you page:
form.addEventListener('submit', async e => {
e.preventDefault();
const res = await fetch(form.action, {
method: 'POST', body: new FormData(form), headers: { Accept: 'application/json' },
});
if (res.ok) form.replaceWith('Thanks! Your message was sent.');
});
Webhooks
To send messages to your own app as well (a Telegram or Slack bot, a spreadsheet, a CRM), add a webhook address on the Forms tab. Each submission is then posted to it as JSON:
POST https://example.com/pagehaus-hook
Content-Type: application/json
X-Pagehaus-Event: form.submission
X-Pagehaus-Timestamp: 1792512000
X-Pagehaus-Signature: sha256=5d41402abc4b2a76b9719d911017c592…
{"event":"form.submission","site":"mysite","form":"contact","id":"7f3c9a2e5d1b4c08a6e4f2b9d0c1e3a5",
"received":"2026-10-22T14:00:00Z","page":"https://mysite.pagehaus.site/contact.html",
"fields":[{"name":"name","value":"Ada"},{"name":"email","value":"ada@example.org"},
{"name":"message","value":"Hello!"}]}
- Check it came from us: work out the HMAC-SHA256 of the timestamp, a full stop and the body, with the signing secret shown on the Forms tab, and compare it with the signature. Ignore requests with an old timestamp.
- Answer quickly with any 2xx status. If we get an error or no answer within 10 seconds, we try again after a minute and after ten minutes. The Forms tab shows the latest result.
- The address must be
https://on the standard port, with a public domain name. - We never send visitors' IP addresses or browser details. Messages are still kept on the Forms tab, and emailed unless you turn that off.
// Node.js: check the signature
const crypto = require("crypto");
const expected = "sha256=" + crypto.createHmac("sha256", secret)
.update(req.headers["x-pagehaus-timestamp"] + "." + rawBody).digest("hex");
const ok = crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(req.headers["x-pagehaus-signature"]));
Good to know
- Confirm your email address first; forms stay off until you do.
- Forms can't be used to collect passwords or payment card numbers.
- Your plan includes a number of messages a month (see your Account page). File attachments aren't supported.