Create Form
Create a new form with fields, settings, theme, and conditions.
forms.create
POST
/v1/formsRequest Body
| Parameter | Type | Description |
|---|---|---|
| name* | string | Form name (max 255 chars) |
| siteId* | string | UUID of the site this form belongs to |
| title | string | Public-facing form title |
| description | string | Form description |
| fields | array | Array of field objects (see below) |
| conditions | array | Conditional logic rules |
| settings | object | Form settings (submit button text, success action, etc.) |
| theme | object | Visual theme overrides (colors, fonts, spacing) |
Field Object
Each field in the fields array requires:
| Parameter | Type | Description |
|---|---|---|
| key* | string | Unique field identifier |
| type* | string | Field type: text, textarea, email, phone, select, multiselect, radio, checkbox, date, time, file, hidden, name, company, address, heading, paragraph, divider |
| label* | string | Field label shown to user |
| required* | boolean | Whether field is required |
| width* | string | Layout width: full, half, or third |
| order* | integer | Display order (0-based) |
| placeholder | string | Placeholder text |
| helpText | string | Help text shown below field |
| defaultValue | string | Pre-filled value |
| options | array | For select/radio/checkbox: [{label, value}] |
| validation | object | Validation rules (minLength, maxLength, pattern, etc.) |
Example Request
curl
curl -X POST "https://proforms.io/api/v1/forms" \
-H "Authorization: Bearer pf_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"name": "Contact Form",
"siteId": "s_xyz789",
"title": "Get in Touch",
"fields": [
{
"key": "name",
"type": "name",
"label": "Your Name",
"required": true,
"width": "full",
"order": 0
},
{
"key": "email",
"type": "email",
"label": "Email Address",
"required": true,
"width": "half",
"order": 1,
"placeholder": "you@example.com"
},
{
"key": "phone",
"type": "phone",
"label": "Phone Number",
"required": false,
"width": "half",
"order": 2
},
{
"key": "message",
"type": "textarea",
"label": "Message",
"required": true,
"width": "full",
"order": 3,
"placeholder": "How can we help?"
},
{
"key": "service",
"type": "select",
"label": "Service Needed",
"required": false,
"width": "full",
"order": 4,
"options": [
{ "label": "Web Design", "value": "web-design" },
{ "label": "SEO", "value": "seo" },
{ "label": "Other", "value": "other" }
]
}
]
}'Response
200 OK
{
"success": true,
"data": {
"id": "f_abc123",
"name": "Contact Form",
"title": "Get in Touch",
"status": "draft",
"createdAt": "2026-02-17T10:00:00.000Z"
}
}💡
Forms are created as draft by default. Use the Publish endpoint to make them live.