Skip to content

Form Configuration

Each form in FormSentry has its own configuration that controls how submissions are classified and protected.

  1. Go to Forms in your FormSentry dashboard
  2. Click Create Form
  3. Enter a name and description
  4. Configure fields, referrer restrictions, and rate limiting as needed

The number of forms you can create depends on your plan:

PlanMax Forms
Free1
Pro10
Scale50

The form name and description are passed to the AI during classification. Be specific — this directly impacts accuracy.

Good:

Name: Bright Solutions Technical Support
Description: Technical support requests for Bright Solutions software products.

Too vague:

Name: Contact Form
Description: A form for contacting us.

A specific name and description helps the AI understand what submissions are relevant to your form and what should be flagged as spam or off-topic.

Define the fields your form expects. This gives the AI structural context about what a valid submission looks like.

{
"fields": [
{ "name": "name", "label": "Full Name", "type": "text", "required": true },
{ "name": "email", "label": "Email Address", "type": "email", "required": true },
{ "name": "message", "label": "Message", "type": "textarea", "required": true },
{ "name": "phone", "label": "Phone Number", "type": "phone", "required": false }
]
}
TypeDescription
textSingle-line text input
emailEmail address
phonePhone number
textareaMulti-line text input
numberNumeric input
dateDate input
selectDropdown selection
urlURL input
checkboxCheckbox
radioRadio button
codeSingle-line code input
code-blockMulti-line code input

Restrict which domains can submit to your form. This prevents your form from being called from unauthorized websites.

{
"referrerRestriction": {
"enabled": true,
"allowedDomains": ["example.com", "www.example.com"]
}
}

When enabled, submissions from domains not in the allowlist are automatically blocked with a 403 response. Subdomains are matched automatically — adding example.com also allows app.example.com.

Configure per-form rate limiting to prevent abuse. Rate limiting uses a token bucket algorithm and is always active. The two settings you can adjust are:

SettingDefaultRangeDescription
burst101—50Maximum number of requests allowed in a short burst
refillWindow60s10s—24hTime to fully refill the bucket from empty
{
"rateLimiting": {
"burst": 10,
"refillWindow": 60
}
}

The sustained request rate equals burst / refillWindow per second. At the defaults, that is approximately 10 requests per minute with bursts of up to 10 requests allowed immediately.

See Rate Limiting for full details on how the token bucket algorithm works, response headers, and escalation behaviour.

After creating a form, copy the Form ID from the dashboard. Use it in your API requests:

const response = await fetch('https://api.formsentry.ai/v1/verify', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
apiKey: process.env.FORMSENTRY_API_KEY,
formId: 'YOUR_FORM_ID', // From the dashboard
payload: { name, email, message }
})
});