POST /v1/forms
Creates a new form with the specified configuration.Body Parameters
Example Request
Copy
curl -X POST "https://api.example.com/v1/forms" \
-H "Authorization: Bearer <YOUR_API_KEY>" \
-H "Content-Type: application/json" \
-d '{
"name": "New Inquiry Form",
"title": "Submit an Inquiry",
"fields": [
{ "id": "name", "type": "text", "label": "Name", "required": true },
{ "id": "email", "type": "email", "label": "Email", "required": true }
]
}'
Example Response
Copy
{
"id": "form_456",
"name": "New Inquiry Form",
"slug": "new-inquiry-form",
"title": "Submit an Inquiry",
"description": null,
"status": "draft",
"fields": [
{ "id": "name", "type": "text", "label": "Name", "required": true },
{ "id": "email", "type": "email", "label": "Email", "required": true }
],
"settings": null,
"notification_emails": [],
"created_by": "user_123",
"created_at": "2023-01-02T00:00:00.000Z",
"updated_at": "2023-01-02T00:00:00.000Z"
}