POST/smart-forms

Create Smart Form

Create a new AI-powered conversational smart form

Scope: SMART_FORMS_WRITE

Overview

Creates a new smart form with the provided configuration. The AI dynamically generates interview questions at runtime based on the purpose field — no static schema is required. The form is created in DRAFT status; use the Publish Smart Form endpoint to start collecting sessions.

Request

POST/smart-forms

Headers

HeaderValue
AuthorizationBearer fxk_live_<your-api-key>
Content-Typeapplication/json

Request Body

Language Detection

When languages is empty or contains multiple entries, the respondent's browser language is detected via the Accept-Language header and matched against the allowed set. When languages contains exactly one entry, all sessions are conducted in that language regardless of browser settings.

Example Request

curl -X POST "https://api.formfex.com/api/v1/public/smart-forms" \
  -H "Authorization: Bearer $FORMFEX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "purpose": "Evaluate customer satisfaction during hotel checkout process",
    "title": "Hotel Checkout Survey",
    "description": "Share your experience to help us improve our service.",
    "targetAudience": "Business travelers",
    "languages": ["en", "tr"],
    "maxQuestions": 8,
    "isPrivate": false
  }'

Response

Error Cases

StatusDescription
400Validation error — missing purpose, value out of range, or maxQuestions outside 5–15
401Invalid or missing API key
403Smart Forms feature not available on the current plan
429Monthly smart form creation limit reached for the current plan

Next Step

After creating a smart form, use the Publish Smart Form endpoint to generate a public share URL and start accepting sessions.

n8n

In n8n, this operation is available as Create under the Smart Form resource in the Formfex node.