The Forms API provides endpoints for creating, reading, updating, and deleting forms. Forms are the central entity in the system and define the structure, validation, and behavior of data collection.
Create a new form in a specified environment.
Endpoint : POST /forms
Authentication : Required (Session token)
Request Body :
Copy {
" title " : " Contact Form " ,
" environment " : " development " ,
" status " : " draft " ,
" fields " : [
{
" id " : " name " ,
" type " : " text " ,
" label " : " Your Name " ,
" required " : true
},
{
" id " : " email " ,
" type " : " email " ,
" label " : " Email Address " ,
" required " : true ,
" pii " : true
}
],
" ui " : {
" theme " : " auto " ,
" progress " : " steps " ,
" layout " : " one-by-one "
},
" storage " : {
" mode " : " owner "
}
} Response : 201 Created
Error Responses :
400: Invalid environment name or missing required fields
404: Environment does not exist
List all forms for the authenticated user in a specified environment.
Endpoint : GET /forms?environment={environment}
Authentication : Optional (public access if not authenticated)
Query Parameters :
environment (required): Environment name
Response : 200 OK
Error Responses :
400: Environment parameter missing or invalid
Retrieve a specific form by ID.
Endpoint : GET /forms/{id}?environment={environment}
Authentication : Optional (public access for live forms)
Path Parameters :
Query Parameters :
environment (optional): Environment name for validation
Response : 200 OK
Response Headers :
ETag: Form version (for caching)
Error Responses :
400: Invalid environment name
403: Forbidden (form not in specified environment)
Retrieve a form schema for public embedding (no authentication required).
Endpoint : GET /v1/forms/{formId}/public
Authentication : Not required
Path Parameters :
formId (required): Form ID
Response : 200 OK
Note : Only returns forms with status: "live"
Update an existing form. Creates a new version automatically.
Endpoint : PUT /forms/{id}?environment={environment}
Authentication : Required (Session token)
Path Parameters :
Query Parameters :
environment (optional): Environment name for validation
Request Body :
Response : 200 OK
Error Responses :
400: Invalid environment name or request body
403: Forbidden (not form owner)
Note :
Version is automatically incremented
Cannot change userId or environment
updatedAt is automatically set
Delete a form.
Endpoint : DELETE /forms/{id}?environment={environment}
Authentication : Required (Session token)
Path Parameters :
Query Parameters :
environment (optional): Environment name for validation
Response : 204 No Content
Error Responses :
400: Invalid environment name
403: Forbidden (not form owner)
Required Fields
title: Form title (string)
environment: Workspace environment (string)
fields: Array of form fields (array)
Optional Fields
id: Form ID (auto-generated if not provided)
status: Form status (draft, live, archived, active, disabled)
ui: UI configuration object
storage: Storage configuration object
logic: Conditional logic rules
retention: Data retention policy
webhooks: Webhook configurations
notifications: Email notification settings
autoResponse: Auto-response configuration
spamProtection: Spam protection settings
text: Single-line text input
email: Email input with validation
textarea: Multi-line text input
select: Dropdown selection
Field Configuration
API Reference - API overview
Submissions API - Submit forms and retrieve responses
Dashboard Guide - Use the dashboard
Last updated 2 months ago