splitforms.com

Contact Form API for any frontend

A contact form API is an HTTPS endpoint that receives a form POST, validates and spam-filters it, stores it and notifies the owner. splitforms runs one at https://splitforms.com/api/submit, free for 500 submissions a month.

One endpoint, any frontend. REST, signed webhooks and an MCP server for AI agents.
contact.htmlHTML
<form action="https://splitforms.com/api/submit"
      method="POST">
  <input type="hidden" name="access_key"
         value="YOUR_KEY">
  <input name="email" type="email" required>
  <textarea name="message"></textarea>
  <button>Send</button>
</form>
200 OKaccepted
{
  "success": true,
  "message": "Submission received"
}

Landed in your inbox

nowAnna Lopezanna@studio.coQuick design ask
500 free submissions a monthSpam filtered on every planHTML, React, Next.js, curl, Python
Call the API from
  • Next.js
  • React
  • HTML
  • Vue
  • Astro
  • JavaScript
  • WordPress
  • cURL
  • Python

How the contact form API works

One request in. Your lead, delivered.

  1. A developer sending form data to the contact form API

    01 / Send

    POST your form to one endpoint.

    Send URL-encoded, multipart or JSON data to https://splitforms.com/api/submit with your access key.

  2. Form submissions being validated and spam-checked

    02 / Check

    The API validates and filters it.

    Each request is validated and spam-checked. You get a clear JSON response with a status code.

  3. A form submission arriving by email, dashboard and chat

    03 / Deliver

    You get the lead everywhere.

    The submission is saved to your dashboard and emailed to you, and can go on to Slack or a webhook on paid plans.

Copy-paste ready

Point any form at one API endpoint.

Add a hidden access_key field and set the form action to https://splitforms.com/api/submit. That is the whole contact form API integration for plain HTML.

contact.html
<form action="https://splitforms.com/api/submit" method="POST">
  <input type="hidden" name="access_key" value="YOUR_ACCESS_KEY" />
  <input type="hidden" name="form_loaded_at" />
  <input type="checkbox" name="botcheck" style="display:none" tabindex="-1" />
  <input name="name" required />
  <input name="email" type="email" required />
  <textarea name="message" required></textarea>
  <button type="submit">Send</button>
</form>

<script>
  // time-trap: stamp the load time so instant bot submits get flagged
  document.querySelector('[name="form_loaded_at"]').value = Date.now();
</script>

Contact form API reference

Contact form API fields, responses and limits.

One endpoint: POST https://splitforms.com/api/submit. It accepts JSON, multipart and URL-encoded bodies and answers in JSON.

  • Any other field name you send, like name, email or message, is saved and emailed as lead data.
contact.js
const form = document.querySelector('#contact-form');
const status = document.querySelector('#form-status');

form.addEventListener('submit', async (event) => {
  event.preventDefault();
  try {
    const res = await fetch('https://splitforms.com/api/submit', {
      method: 'POST',
      body: new FormData(form),
      headers: { Accept: 'application/json' },
    });
    const data = await res.json();
    if (res.status === 429 && data.code === 'rate_limited') {
      status.textContent = 'Too many submissions, try again in a minute.';
    } else if (data.success) {
      status.textContent = 'Thanks, we got your message.';
      form.reset();
    } else {
      status.textContent = data.message;
    }
  } catch {
    status.textContent = 'Network error, please try again.';
  }
});
  • 6 / minRate limit

    6 per minute and 20 per 15 minutes, per IP address per form.

  • 500 / moFree plan

    500 submissions a month. Past that the API returns 429 quota_reached until the next month.

  • 100 fieldsPer submission

    Up to 100 fields are stored, each value up to 10,000 characters.

  • 5 × 5 MBFile uploads

    Up to 5 files of 5 MB each with multipart/form-data, on paid plans.

Every field, status and error code: full API reference · OpenAPI 3.1 spec

Show the verified API facts table

API facts

What does the splitforms contact form API accept and return?

The splitforms contact form API takes a POST at one endpoint and answers in JSON. Each row below is checked against the endpoint's source code.

Last verified
FactBehavior
EndpointPOST https://splitforms.com/api/submit. Cross-origin requests are allowed and the OPTIONS preflight returns 204.
Content typesapplication/x-www-form-urlencoded, multipart/form-data, application/json. Any other Content-Type, or none, returns 415 unsupported_content_type.
access_keyRequired. The form's public identifier, sent as a hidden field or JSON property. Missing returns 400 missing_access_key; unknown returns 404 invalid_access_key.
botcheckOptional honeypot that must stay empty. When it is filled, the request still gets a 200, but the submission is filed in the Spam folder instead of the inbox and no notification email or webhook is sent.
Success response200 with JSON { success: true, message } for fetch and API calls, plus redirect, note or files when they apply. A native HTML post gets a hosted thank-you page or your redirect.
Error response4xx with JSON { success: false, message, code }, for example 400 invalid_body, 403 origin_not_allowed, 404 invalid_access_key or 413 payload_too_large.
Rate limit6 per minute and 20 per 15 minutes per IP, per form. Going over either returns 429 rate_limited.
Plan allowanceWhen Free's 500 monthly submissions are used, new ones get 429 quota_reached (with quota.limit and quota.used) until the quota resets next month or you upgrade. Paid plans return the same code at their monthly cap.
RedirectA hidden redirect field sends a native HTML post a 303 See Other to the validated URL. fetch and JSON callers get it back as a redirect field and navigate themselves.
File uploadsmultipart/form-data, up to 5 files of 5 MB each per submission on paid plans with Storage connected. Free saves the text fields, drops the files and adds a note. Larger bodies return 413 payload_too_large.
Webhook signingPaid plans. X-Splitforms-Signature: sha256=<hex>, an HMAC-SHA256 of the raw body with your webhook secret. 8-second timeout and one retry after about 2 seconds, then scheduled retries at 1 minute, 10 minutes, 1 hour, 6 hours and 24 hours, on network errors, timeouts and 5xx; 4xx is not retried.
MCP endpointhttps://splitforms.com/api/mcp over HTTP with an Authorization: Bearer token. 12 tools, on every plan including Free.
OpenAPIAn OpenAPI 3.1 description of POST /api/submit is published at https://splitforms.com/openapi.json.

Machine-readable copies: OpenAPI 3.1 spec and brand-facts.json. Every field, status and error code is in the API reference.

Setup

How to connect a form to the contact form API.

Works the same way whether your frontend is a React app, plain HTML, or something else — the endpoint doesn't care what rendered the markup. For fetch code that sends FormData, URL-encoded or JSON bodies, see how to send form data to an API.

Step 1 of 6

Create a free access key

Sign up for splitforms (no credit card) and create a form in the dashboard. Copy its access_key — a public identifier that goes in your form, not a secret.

Step 2 of 6

Point your form at the endpoint

Set your HTML form's action to https://splitforms.com/api/submit with method POST, or POST FormData/JSON to the same URL from React, Next.js, Vue, or any HTTP client. Include the access_key as a hidden field.

Step 3 of 6

Add the spam-prevention fields

Add a hidden botcheck input that must stay empty (a honeypot) and a hidden form_loaded_at field stamped with the page-load time. Both are checked automatically before a submission is accepted.

Step 4 of 6

Set optional control fields

Add subject to customize the email subject line, redirect to send visitors to a thank-you page, and replyto to control the reply-to address on notification emails.

Step 5 of 6

Test it and check your inbox

Submit the form once. The owner notification email is free on every plan, and the submission shows up in the dashboard immediately.

Step 6 of 6

Automate what happens next

Add signed webhooks, native Slack, Notion, or Google Sheets integrations, or an auto-responder on a paid plan (Pro at $5 per month or Annual at $49 per year) once email alone isn't enough.

You're all set ✓

Where submissions go

Where do your contact form API submissions go?

Every submission is emailed to you and saved to a searchable dashboard — spam filtered before it ever reaches you. Pull them back out with the read API (GET /api/submissions), or, on paid plans, export to CSV or forward it to a webhook or Slack.

  • 500 submissions a month, free to start
  • Read API: GET /api/submissions with a Bearer token
  • Signed webhooks and Slack or Discord alerts on paid plans
Contact form API submissions in the splitforms dashboard

No backend needed

Do you need a backend for a contact form API? No.

Your form POSTs standard FormData or JSON to one URL. splitforms validates the access_key, runs the spam checks, and forwards it to your email — so there's no server, API route, or database for you to build or maintain.

  • POST /api/submit — multipart, url-encoded, or JSON
  • Returns JSON { success, message } to fetch and API calls
  • Works from HTML, React, Next.js, or any HTTP client
How the splitforms contact form API processes a submission

Spam filtering

Does the contact form API stop spam?

Every plan screens submissions with a honeypot, a time-trap, content heuristics, and per-form rate limits before anything reaches you — a reCAPTCHA-free way to keep bots out without a puzzle for real visitors.

  • Honeypot + time-trap on every plan, including Free
  • 6 per minute and 20 per 15 minutes per IP, per form
  • Optional allowed-domain locking per form
Spam filtering on the splitforms contact form API

REST + MCP

Drive the contact form API with REST and MCP.

One API token powers both the REST read API and a free MCP server, so agents like Claude and Cursor can create forms and read submissions directly — the same key, no bespoke integration. Full request and response examples live in the API reference.

  • Free MCP server on every plan — 12 tools
  • create_form, generate_form, list_submissions
  • Same Bearer token as the read API
The splitforms contact form API MCP server for AI agents

Questions

Contact form API questions.

Anything missing? Email us, we read every message.

A person reading answers to common questions
What's included in the splitforms contact form API?

One POST endpoint (/api/submit) that accepts any HTML form or fetch/JSON request, a read API for pulling submissions back out, a free MCP server for AI agents, file uploads on paid plans, thank-you redirects, and a replyto override — plus CC/BCC on paid plans. Spam filtering (honeypot, time-trap, content heuristics, allowed-domains) and owner notification emails are included on every plan, including Free.

Is the contact form API really free?

Yes. Free covers 500 submissions a month, unlimited forms, spam filtering, the dashboard, owner notification emails, and the MCP server — no credit card required. Paid plans add CSV/XML/PDF export, webhooks, integrations, file uploads, CC/BCC and an auto-responder. Pro is $5/month for 5,000 submissions a month, and Annual is $49/year for 15,000 a month.

Do I need an API key to use it?

You need two different credentials. Every form has an access_key — a public identifier you put in a hidden field or POST body that tells splitforms which form a submission belongs to. Your account also has one API token, found at Dashboard → MCP, that authenticates the read API (GET /api/submissions) and the MCP server with an Authorization: Bearer header. Only the access_key belongs in client-side HTML.

Is it safe to put the access_key in my HTML?

Yes. The access key is a public form identifier, not a secret. Abuse is limited by the honeypot and time-trap, rate limits of 6 per minute and 20 per 15 minutes per IP, per form, and optional allowed-domain locking. Your account API token, from Dashboard > MCP, is the secret: never put it in client-side code.

How do I POST to the contact form API from curl, fetch, or Python?

The endpoint is language-agnostic — POST to https://splitforms.com/api/submit with your access_key and fields. From curl use -F flags; from JavaScript send new FormData(form) with fetch; from Python post a JSON body with requests. Every client gets JSON back: { success, message } on a 200, or { success: false, message, code } on a 4xx validation, auth or rate-limit error.

Can I connect a form without writing backend code?

Yes — that's the point of the API. Build the form in the drag-and-drop dashboard (50+ templates) and grab a ready-made embed for WordPress (shortcode), Shopify (Custom Liquid), iframe, plain HTML, or a React component; or wire up your own markup by pointing action at https://splitforms.com/api/submit with the access_key field. Either way there's no server to run — accepted submissions are saved to your dashboard before owner notification email is attempted; delivery time and inbox placement depend on provider and recipient settings.

View all FAQs

Free contact form API. Real free tier.

Point a form you already have at the endpoint and start receiving submissions in minutes — no server to deploy and no credit card to sign up. Move to a paid plan (Pro at $5 per month) only when you need webhooks, integrations, or an auto-responder.

  • No credit card required
  • 500 free submissions
  • Setup in minutes
Two people celebrating a working contact form