Guide
Wire a React contact page to NexusKit Contact API in four steps. Works with any React framework — Next.js, Vite, Remix, or plain CRA.
In your dashboard, go to Modules → Contact and create a new form. Copy the form ID.
Go to Developers and create a key with contact:write scope.
Add these environment variables to your React site:
NEXUSKIT_API_URL=https://api.nexus-kit.com
NEXUSKIT_API_KEY=nk_live_...
NEXUSKIT_FORM_ID=...Call the public Contact API when the user submits your form.
await fetch(`${import.meta.env.VITE_NEXUSKIT_API_URL}/v1/public/contact/forms/${import.meta.env.VITE_NEXUSKIT_FORM_ID}/submissions`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${import.meta.env.VITE_NEXUSKIT_API_KEY}`,
},
body: JSON.stringify({
locale: 'en',
turnstileToken,
payload: { name, email, message, website: '' },
}),
});See also docs/examples/contact-react-snippet.tsx in the monorepo.