Introduction
The FastForms API enables you to programmatically generate forms, manage submissions, and export response data. All endpoints use standard HTTP methods and return JSON responses.Base URL
Authentication
Most endpoints require authentication using Clerk session cookies. Requests must be made from an authenticated browser session or with valid Clerk session tokens. Protected Endpoints:- POST
/forms/generate- Requires authentication - GET
/getAllForms- Requires authentication - DELETE
/forms/[id]- Requires authentication (must own the form) - PATCH
/forms/[id]- Requires authentication (must own the form) - GET
/forms/[id]/responses- Requires authentication (must own the form) - GET
/forms/[id]/export- Requires authentication (must own the form)
- GET
/forms/[id]- No authentication required (can use ID or slug) - POST
/forms/submit- No authentication required
Available Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /forms/generate | Generate a new form using AI |
| GET | /getAllForms | Get all forms for the authenticated user |
| GET | /forms/[id] | Get a specific form by ID or slug |
| DELETE | /forms/[id] | Delete a form |
| PATCH | /forms/[id] | Toggle form publish status |
| POST | /forms/submit | Submit a response to a form |
| GET | /forms/[id]/responses | Get all responses for a form |
| GET | /forms/[id]/export | Export form responses as CSV |
Error Response Format
All errors follow a consistent JSON structure:Common HTTP Status Codes
200- Success201- Created successfully400- Bad request (validation error)401- Unauthorized (authentication required)404- Resource not found500- Internal server error