Submissions
Overview
The Submissions API handles form submissions, response retrieval, and export functionality. Submissions can be made publicly (without authentication) or via authenticated API requests.
Endpoints
Submit Form
Submit a response to a form.
Endpoint: POST /forms/{id}/submit
Authentication: Optional (API key recommended for server-side, publishable key for client-side)
Path Parameters:
id(required): Form ID
Request Body:
{
"answers": {
"name": "John Doe",
"email": "john@example.com",
"message": "Hello world"
},
"sessionId": "session_123",
"recaptchaToken": "token_from_recaptcha"
}Response: 201 Created
Error Responses:
400: Invalid request (missing required fields, validation errors)404: Form not found429: Rate limit exceeded or quota exceeded
Rate Limiting:
Public submissions: Rate limited by IP address
Authenticated submissions: Rate limited by user
Retry-Afterheader indicates when to retry
Spam Protection:
Honeypot fields (if configured)
reCAPTCHA validation (if configured)
Custom spam rules (if configured)
List Responses
List form responses with pagination.
Endpoint: GET /responses?form_id={formId}&environment={environment}
Authentication: Required (Session token)
Query Parameters:
form_id(required): Form IDenvironment(required): Workspace environmentlimit(optional): Items per page (default: 50, max: 100)cursor(optional): Pagination cursorfrom(optional): Start date (ISO 8601)to(optional): End date (ISO 8601)
Response: 200 OK
Error Responses:
400: Missing required parameters401: Unauthorized403: Forbidden (not form owner)404: Form not found
Export Responses
Export form responses as CSV.
Endpoint: GET /responses?form_id={formId}&environment={environment}&format=csv
Authentication: Required (Session token)
Query Parameters:
form_id(required): Form IDenvironment(required): Workspace environmentformat(required): Must becsv
Response: 200 OK
Error Responses:
400: Missing required parameters401: Unauthorized404: Form not found
Get Submission
Retrieve a specific submission by ID.
Endpoint: GET /responses/{submissionId}?form_id={formId}&environment={environment}
Authentication: Required (Session token)
Path Parameters:
submissionId(required): Submission ID
Query Parameters:
form_id(required): Form IDenvironment(required): Workspace environment
Response: 200 OK
Read Submission
Mark a submission as read.
Endpoint: POST /responses/{submissionId}/read
Authentication: Required (Session token)
Response: 200 OK
Star Submission
Star or unstar a submission.
Endpoint: POST /responses/{submissionId}/star
Authentication: Required (Session token)
Request Body:
Response: 200 OK
Add Note
Add a note to a submission.
Endpoint: POST /responses/{submissionId}/notes
Authentication: Required (Session token)
Request Body:
Response: 200 OK
Reply to Submission
Send a reply to a submission (email).
Endpoint: POST /responses/{submissionId}/reply
Authentication: Required (Session token)
Request Body:
Response: 200 OK
Submission Processing
Validation
Submissions are validated against the form schema:
Required Fields: All required fields must be present
Field Types: Values must match field types (text, email, number, etc.)
Validation Rules: Min/max length, patterns, ranges are enforced
Conditional Logic: Only visible fields are accepted
Spam Protection
If spam protection is enabled:
Honeypot: Hidden fields that should remain empty
reCAPTCHA: Token validation (if configured)
Custom Rules: Field-based spam detection
Actions:
reject,flag, orquarantine
Rate Limiting
IP-based: Public submissions rate limited by IP
User-based: Authenticated submissions rate limited by user
Quota: Monthly submission quotas per user/environment
PII Handling
PII fields are handled according to form configuration:
Plain: Stored as-is
Masked: Partially masked in responses
Hashed: SHA-256 hashed
Encrypted: KMS-encrypted
Dropped: Not stored
Response Metadata
Responses include metadata for management:
Examples
Submit a Form (Public)
Submit a Form (Authenticated)
List Responses
Export Responses as CSV
Next Steps
API Reference - API overview
Forms API - Form management
Analytics API - Analytics and reporting
Last updated