Dead Simple Form Documentation
This guide explains how to use Dead Simple Form to collect submissions from public HTML forms, manage them securely, and access them using our backend powered by Supabase.
1. Creating a Form
To create a new form, send a POST request to:
POST /api/forms
Body:
{
"name": "Contact Form",
"webhook_url": "https://example.com/webhook" // optional
}This will return a form object with a unique slug, which can be used in public HTML forms.
2. Submitting a Form (Public HTML)
You can embed a form in any HTML page like this:
<form action="https://deadsimpleform.com/api/forms/submit/[slug]" method="POST"> <label for="email">Email</label> <input type="email" name="email" id="email" required /> <label for="message">Message</label> <textarea name="message" id="message" required></textarea> <button type="submit">Send</button> </form>
Replace [slug] with the slug of your form.
3. Viewing Submissions
To fetch all submissions for a form (server-side), make an authenticated request to:
GET /api/forms/[form_id]/submissions
The response includes all submissions associated with the form, ordered by most recent.
4. Webhook Integration
If you provided a webhook_url when creating the form, every successful submission will trigger a POST request to that URL.
The webhook will receive the raw submission body as JSON. You can use this to trigger automations in tools like Zapier, Slack, Notion, or your backend.
5. Security & Access
- Creating/viewing forms and submissions requires user authentication via Supabase Auth.
- Public form submissions do not require authentication (open by design).
- Each form is owned by a user; submissions are stored with form ID and metadata (IP, user agent).
- Spam prevention methods like honeypot fields or rate limiting can be added later.
6. API Summary
POST /api/forms– Create a new form (auth required)GET /api/forms– List all forms (auth required)POST /api/forms/submit/[slug]– Submit to form publiclyGET /api/forms/[form_id]/submissions– View submissions (auth required)GET /api/form-detail/[id]– Get form detail (auth required)