Form Configuration
Each form in FormSentry has its own configuration that controls how submissions are classified and protected.
Creating a Form
Section titled “Creating a Form”- Go to Forms in your FormSentry dashboard
- Click Create Form
- Enter a name and description
- Configure fields, referrer restrictions, and rate limiting as needed
The number of forms you can create depends on your plan:
| Plan | Max Forms |
|---|---|
| Free | 1 |
| Pro | 10 |
| Scale | 50 |
Form Name and Description
Section titled “Form Name and Description”The form name and description are passed to the AI during classification. Be specific — this directly impacts accuracy.
Good:
Name: Bright Solutions Technical SupportDescription: Technical support requests for Bright Solutions software products.Too vague:
Name: Contact FormDescription: 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.
Fields
Section titled “Fields”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 } ]}Field Types
Section titled “Field Types”| Type | Description |
|---|---|
text | Single-line text input |
email | Email address |
phone | Phone number |
textarea | Multi-line text input |
number | Numeric input |
date | Date input |
select | Dropdown selection |
url | URL input |
checkbox | Checkbox |
radio | Radio button |
code | Single-line code input |
code-block | Multi-line code input |
Referrer Restrictions
Section titled “Referrer Restrictions”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.
Rate Limiting
Section titled “Rate Limiting”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:
| Setting | Default | Range | Description |
|---|---|---|---|
burst | 10 | 1—50 | Maximum number of requests allowed in a short burst |
refillWindow | 60s | 10s—24h | Time 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.
Using Your Form ID
Section titled “Using Your Form ID”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 } })});