REST API · Version 1
API Reference
Programmatically create forms, retrieve responses, and generate fields with AI. All from a single, consistent REST API.
Base URLhttps://www.formzen.in/api
Get your API keyAuthentication
All API requests (except submitting responses) require your API key in the Authorization header. Generate a key from Settings → API Keys.
Keep your key secret
Never expose it in client-side JavaScript, git repos, or browser requests. Use environment variables.
bash
# Add to every request header Authorization: Bearer fc_live_your_key_here # Example curl https://formzen.in/api/forms \ -H "Authorization: Bearer fc_live_your_key_here"
Rate limits
Rate limits apply per API key per rolling 60-second window. Every response includes rate limit headers.
Free
—
No API access
Pro
120
requests / minute
Teams
600
requests / minute
http
X-RateLimit-Limit: 120 X-RateLimit-Remaining: 87 X-RateLimit-Reset: 1721234567 # On 429 Too Many Requests: Retry-After: 12
Errors
All errors return JSON with an error string and optional code.
| Status | Meaning |
|---|---|
| 400 | Bad request — missing or invalid fields |
| 401 | Unauthorized — missing, invalid, or expired API key |
| 403 | Forbidden — plan doesn't include this feature, or form/response limit reached |
| 404 | Not found — form or resource doesn't exist |
| 409 | Conflict — e.g. form not published |
| 429 | Rate limited — too many requests, see Retry-After header |
| 500 | Server error — retry with exponential backoff |
json
{
"error": "Form limit reached (50 on pro plan). Archive old forms or upgrade.",
"code": "form_limit_reached",
"docs": "https://api.formzen.in/docs"
}Forms
Responses
AI Generation
Field schema
Every field in the fields array follows this structure:
| Property | Type | Description |
|---|---|---|
idrequired | string | Unique within the form. e.g. "field_1" |
typerequired | string | text | email | phone | number | textarea | select | radio | checkbox | date | rating | scale | nps | heading | paragraph |
labelrequired | string | The visible question label |
orderrequired | integer | Display order, 0-indexed |
pageIndex | integer | Which page (default: 0) |
description | string | Help text shown below the label |
placeholder | string | Placeholder for text inputs |
options | array | Required for select/radio/checkbox. Each: { id, label, value } |
validation | object | { required, minLength, maxLength, min, max } |
properties | object | Type-specific: { maxRating } for rating, { minLabel, maxLabel } for scale/nps |