Contents: Quick start
Quick start
Formiz accepts a standard form POST and delivers it to your channels. All you need is an access key from your dashboard and a form that sends to our endpoint. There is no package to install.
Get your access key
Sign up, then copy the key from the Overview page of your dashboard. It identifies your account and decides where submissions are delivered.
Send the form to Formiz
Pick your stack below. Every version posts the same fields to the same endpoint, so you can switch later without changing anything in your dashboard.
Submit a test
Fill in the form on your site. The submission appears in your dashboard and on every active channel within seconds.
'use client';
import { useState, type FormEvent } from 'react';
type Status = 'idle' | 'sending' | 'sent' | 'error';
export default function ContactForm() {
const [status, setStatus] = useState<Status>('idle');
async function handleSubmit(event: FormEvent<HTMLFormElement>) {
event.preventDefault();
setStatus('sending');
const data = new FormData(event.currentTarget);
data.append('access_key', process.env.NEXT_PUBLIC_FORMIZ_KEY!);
const res = await fetch('https://api.formiz.app/submit', {
method: 'POST',
body: data,
});
setStatus(res.ok ? 'sent' : 'error');
}
return (
<form onSubmit={handleSubmit}>
<input name="name" required />
<input name="email" type="email" required />
<textarea name="message" required />
<button disabled={status === 'sending'}>Send</button>
{status === 'sent' && <p>Thanks! Your message is on its way.</p>}
{status === 'error' && <p>Something went wrong. Please try again.</p>}
</form>
);
}In Next.js, keep the key in .env.local as NEXT_PUBLIC_FORMIZ_KEY and restrict it to your domain in Settings. The key only allows sending to your own channels.
Response
Requests sent with fetch receive JSON. A plain HTML form is redirected to your redirect URL, or to our hosted thank-you page if none is set.
{
"success": true,
"id": "sub_8f2k1x",
"delivered": ["email", "whatsapp", "telegram"]
}