Forms API
Create, read, update, and delete forms programmatically.
GET
/api/formsList all forms
Returns a list of all forms for the authenticated user.
Response
JSON
{
"forms": [
{
"id": "form_abc123",
"title": "Contact Form",
"status": "published",
"created_at": "2025-01-15T10:30:00Z",
"response_count": 42
}
],
"total": 1
}POST
/api/formsCreate a form
Creates a new form with the specified configuration.
Request body
JSON
{
"title": "Contact Form",
"description": "Get in touch with us",
"questions": [
{
"type": "text",
"title": "Your name",
"required": true
},
{
"type": "email",
"title": "Email address",
"required": true
}
]
}Response
JSON
{
"id": "form_abc123",
"title": "Contact Form",
"status": "draft",
"created_at": "2025-01-15T10:30:00Z"
}GET
/api/forms/:idGet a form
Returns the full form configuration including all questions.
Response
JSON
{
"id": "form_abc123",
"title": "Contact Form",
"description": "Get in touch with us",
"status": "published",
"questions": [...],
"theme": {...},
"settings": {...}
}DELETE
/api/forms/:idDelete a form
Permanently deletes a form and all its responses.
Response
JSON
{
"success": true
}