Docs
Everything goes to POST https://forms.zexa.se/submit with your access key.
HTML form
<form action="https://forms.zexa.se/submit" method="POST">
<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">
<input type="hidden" name="form_name" value="Contact form">
<input type="text" name="botcheck" style="display:none" tabindex="-1" autocomplete="off">
<input type="text" name="name" required>
<input type="email" name="email" required>
<textarea name="message" required></textarea>
<button type="submit">Send</button>
</form>
The access key is visible in your page source. That is normal for this kind of service, so protect it with allowed domains (below). It can only ever deliver mail to your address.
fetch()
const res = await fetch("https://forms.zexa.se/submit", {
method: "POST",
headers: { "Content-Type": "application/json", "Accept": "application/json" },
body: JSON.stringify({
access_key: "YOUR_ACCESS_KEY",
form_name: "Contact form",
botcheck: "",
name: "Ada",
email: "ada@example.org",
message: "Hello!"
})
});
const data = await res.json(); // { success: true, message: "Submitted" }
You can also send the key as Authorization: Bearer YOUR_ACCESS_KEY. JSON, application/x-www-form-urlencoded and multipart/form-data are accepted; uploaded files are not.
Field reference
| Field | Meaning |
|---|---|
access_key | Required. Your key (zf_ and 32 characters), or use the Authorization header. |
form_name | Optional. Shown in the mail subject. Letters, digits, spaces and a few marks only; cut at 40 characters. Default "Contact form". |
botcheck | Optional honeypot. Keep it hidden and empty. If anything is in it, the submission is dropped silently (the bot is told it worked). |
redirect | Optional, for browser form posts. After success the visitor is sent here, but only if the address is on one of your allowed domains (or, with no list, on the site the form was sent from). Otherwise they see our thank-you page. JSON requests get JSON instead. |
| everything else | Becomes the content of the mail, in the order sent. |
Answers
| Status | Meaning |
|---|---|
200 {"success":true} | Stored and mailed (or, if the daily mail budget is used up, stored and visible in your inbox). |
| 400 | Empty form or unreadable body. |
| 401 / 403 | Unknown key, disabled key, or a site that is not on the allowed list. |
| 413 / 422 | Too large, or too many links. |
| 429 | A rate limit was hit. |
Allowed domains
On your inbox page, list the hostnames that may use the key, for example example.com. Subdomains such as www.example.com are included. We check the Origin header, then Referer; a request with neither is refused when a list is set. This stops other websites from reusing a key they copied from your page. It does not stop someone who forges headers from a script, which is why the rate limits exist too.
Limits
| What | Limit |
|---|---|
| Submissions per key | 250 a month; 100 a day; 5 a minute |
| New key, before its first delivered submission | 10 a day |
| One network (IPv4 address or IPv6 /64) | 30 submissions an hour |
| Size | 20 KB per request; 40 fields; 4,000 characters per field; 8,000 in total |
| Links | More than 3 links in a submission is rejected as spam |
| Storage | Submissions are kept 30 days, then deleted |
| We send from a shared address under a global daily budget; when it is used up, submissions are still stored | |
| Not supported | File uploads, sending to other addresses, auto-replies to visitors, integrations, Turnstile or other captchas |
Your key and your data
We store only a hash of the key. If you lose it, rotate it on the manage page. There you can also delete everything we hold for your address. See the privacy page.