Send an HTML form to email
FormDoc receives your HTML form’s submissions and emails them to you. You don’t need a server or any backend code.
1. Get an access key
Go to app.formdoc.dev/new, enter the email address that should receive submissions, and confirm it from the email we send. You then get an access key that starts with fd_. We email it to you as well.
2. Add the form to your page
<form action="https://api.formdoc.dev/v1/submit" method="POST">
<input type="hidden" name="access_key" value="YOUR_ACCESS_KEY">
<label for="name">Name</label>
<input type="text" id="name" name="name" required>
<label for="email">Email</label>
<input type="email" id="email" name="email" required>
<label for="message">Message</label>
<textarea id="message" name="message" required></textarea>
<!-- Spam trap: keep it hidden and empty. -->
<input type="checkbox" name="botcheck" style="display:none" tabindex="-1" autocomplete="off">
<button type="submit">Send</button>
</form>
Replace YOUR_ACCESS_KEY with your key. Every input needs a name: that name becomes the label in your email.
3. Send a test
Open your page, fill in the form and submit it. You’ll see a thank-you page, and the submission arrives in your inbox.
Useful hidden fields
| Field | What it does |
|---|---|
subject |
Sets the email subject |
from_name |
Sets the sender name shown in your inbox |
redirect |
Full https:// address of your own thank-you page |
replyto |
Address your reply goes to (otherwise the email field is used) |
botcheck |
Honeypot: must stay empty |
Sending with JavaScript
Send the form with fetch and ask for JSON to show your own success message:
const res = await fetch("https://api.formdoc.dev/v1/submit", {
method: "POST",
headers: { Accept: "application/json" },
body: new FormData(form),
});
const result = await res.json(); // { success: true, ... } or { success: false, error: { code, message } }
Next
- API reference: every field, limit and error code.
- Webhooks: send each submission to your own server (paid plans).