Skip to main content

API Overview

The GeniusForms API is a REST API that allows you to programmatically create forms, manage fields, and retrieve responses.

Base URL

https://geniusforms.ai/api/v1
For local development:
http://localhost:8000/api/v1

Authentication

All endpoints require an API key passed in the X-API-Key header. See Authentication for details.

Content Type

All requests with a body should use Content-Type: application/json.

Field Types

GeniusForms supports 15+ field types:
TypeDescriptionRequires Options
textShort text inputNo
textareaLong text inputNo
emailEmail address with validationNo
numberNumeric inputNo
phonePhone numberNo
urlURL with validationNo
dateDate pickerNo
timeTime pickerNo
selectDropdown selectionYes
multi_selectCheckbox selectionYes
ratingStar rating (1-5)No
sliderRange sliderYes (sliderConfig)
yes_noBoolean toggleNo
file_uploadFile uploadNo
currencyCurrency inputOptional (currencyConfig)

Options Examples

Select/Multi-select:
{
  "type": "select",
  "question": "Favorite color",
  "options": ["Red", "Green", "Blue"]
}
Slider:
{
  "type": "slider",
  "question": "How likely to recommend?",
  "sliderConfig": {
    "min": 0,
    "max": 10,
    "step": 1
  }
}
Currency:
{
  "type": "currency",
  "question": "Budget",
  "currencyConfig": {
    "currency": "USD",
    "min": 0,
    "max": 10000
  }
}

Display Modes

Forms support two display modes:
ModeDescription
single-pageAll questions on one page (default)
multi-stepOne question per step

Common Patterns

Create → Publish → Share

# 1. Create form
FORM=$(curl -s -X POST https://geniusforms.ai/api/v1/forms \
  -H "X-API-Key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title": "Feedback", "questions": [...]}')

FORM_ID=$(echo $FORM | jq -r '.id')

# 2. Publish
curl -X POST "https://geniusforms.ai/api/v1/forms/$FORM_ID/publish" \
  -H "X-API-Key: $API_KEY"

# 3. Share URL is now live
echo "Form URL: https://geniusforms.ai/f/$(echo $FORM | jq -r '.shareUrl')"

Paginate Responses

# Get first page
curl "https://geniusforms.ai/api/v1/forms/$FORM_ID/responses?limit=50&offset=0" \
  -H "X-API-Key: $API_KEY"

# Get next page
curl "https://geniusforms.ai/api/v1/forms/$FORM_ID/responses?limit=50&offset=50" \
  -H "X-API-Key: $API_KEY"

SDKs

Official SDKs coming soon. For now, use any HTTP client:
import requests

API_KEY = "your_api_key"
BASE_URL = "https://geniusforms.ai/api/v1"

headers = {"X-API-Key": API_KEY}

# List forms
response = requests.get(f"{BASE_URL}/forms", headers=headers)
forms = response.json()["forms"]