BETA
Skip to content

Quickstart ​

Collect your first form submission in under two minutes. This guide walks you through creating a form, embedding it on your site, and viewing submissions.

Prerequisites ​

  • A Krafter account (invite-only -- request access at app.krafter.dev)
  • An API key with forms:write scope (or use the dashboard to create forms without an API key)

Step 1: Create a Form ​

You can create a form from the Krafter dashboard or via the API.

Using the Dashboard ​

  1. Log in to the dashboard and navigate to Forms.
  2. Click New Form.
  3. Give it a name (e.g., "Contact Form") and a slug (e.g., contact).
  4. Configure fields, notifications, and spam protection as needed.
  5. Click Create.

Using the API ​

bash
curl -X POST https://app.krafter.dev/api/v1/forms \
  -H "Authorization: Bearer kr_live_abc123def456" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Contact Form",
    "slug": "contact"
  }'
json
// 201 Created
{
  "id": "b1c2d3e4-5f6a-7b8c-9d0e-1f2a3b4c5d6e",
  "name": "Contact Form",
  "slug": "contact",
  "endpoint_url": "/f/contact"
}

Your public submission endpoint is now live at:

https://app.krafter.dev/f/contact

Rate limit (public)

The public submission endpoint uses the public bucket — 200 requests / 60 seconds per client IP, shared with email tracking, unsubscribe, analytics ingest, public survey writes, and webhook ingest. A high-traffic landing page hosted behind a single egress IP can hit this ceiling — front your form with caching or queueing if you expect bursts.

Step 2: Add an HTML Form to Your Site ​

Point any HTML form's action attribute at your endpoint. No JavaScript required.

html
<form action="https://app.krafter.dev/f/contact" method="POST">
  <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>

  <button type="submit">Send</button>
</form>

TIP

The dashboard generates a ready-to-use HTML snippet for each form. Open your form and click HTML Snippet to copy it.

Step 3: Submit Your First Entry ​

You can test the endpoint with curl before adding it to your site:

bash
curl -X POST https://app.krafter.dev/f/contact \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Jane Doe",
    "email": "jane@example.com",
    "message": "Hello from the API!"
  }'
json
// 201 Created
{
  "ok": true,
  "id": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
}

The public endpoint accepts three content types:

Content-TypeUsage
application/jsonAPI clients, JavaScript fetch
application/x-www-form-urlencodedStandard HTML forms
multipart/form-dataHTML forms with file uploads

Step 4: View Submissions ​

Head to the Krafter dashboard, open your form, and click the Submissions tab. New submissions appear in real time with unread indicators.

You can also fetch submissions via the API:

bash
curl https://app.krafter.dev/api/v1/forms/FORM_ID/submissions \
  -H "Authorization: Bearer kr_live_abc123def456"

Redirecting After Submission ​

For HTML forms, add a hidden _redirect field to send the user to a thank-you page after submitting:

html
<form action="https://app.krafter.dev/f/contact" method="POST">
  <input type="hidden" name="_redirect" value="https://yoursite.com/thank-you">
  <!-- other fields -->
  <button type="submit">Send</button>
</form>

When _redirect is present, the server responds with a 302 redirect instead of JSON.

INFO

The _redirect URL is not stored as part of the submission data. It is only used for the redirect response.

Next Steps ​

Built by Krafter Studio