Create Form

Create a new form with fields, settings, theme, and conditions.

forms.create
POST/v1/forms

Request Body

ParameterTypeDescription
name*stringForm name (max 255 chars)
siteId*stringUUID of the site this form belongs to
titlestringPublic-facing form title
descriptionstringForm description
fieldsarrayArray of field objects (see below)
conditionsarrayConditional logic rules
settingsobjectForm settings (submit button text, success action, etc.)
themeobjectVisual theme overrides (colors, fonts, spacing)

Field Object

Each field in the fields array requires:

ParameterTypeDescription
key*stringUnique field identifier
type*stringField type: text, textarea, email, phone, select, multiselect, radio, checkbox, date, time, file, hidden, name, company, address, heading, paragraph, divider
label*stringField label shown to user
required*booleanWhether field is required
width*stringLayout width: full, half, or third
order*integerDisplay order (0-based)
placeholderstringPlaceholder text
helpTextstringHelp text shown below field
defaultValuestringPre-filled value
optionsarrayFor select/radio/checkbox: [{label, value}]
validationobjectValidation 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.