Submit Form Response
Submit a response to a specific form with optional respondent tracking data.
Endpoint
POST https://api.poketto.dev/api/v1/forms/{formId}/submit-response
Authentication
Include your API key in the request header:
- Recommended:
X-API-Key: YOUR_API_KEY
- Alternative:
Authorization: Bearer YOUR_API_KEY
(deprecated)
Request Body
Basic Example
{
"respondent": {
"email": "user@example.com",
"name": "John Doe",
"browser": "Chrome",
"os": "Windows",
"source": "website"
},
"field_responses": [
{
"field_id": "38261edc-8bff-4b7e-9f15-1ea11a839927",
"value": "5"
},
{
"field_id": "1138820b-716f-4705-b43e-7553f82187f6",
"value": "The service was excellent!"
}
]
}
Complete Example – Optional Respondent Data
{
"respondent": {
"email": "httptest1@poketto.dev",
"name": "Test Doe",
"browser": "Chrome",
"browser_version": "120.0.6099.109",
"os": "macOS",
"os_version": "14.2.1",
"device_type": "Desktop",
"device_model": "MacBook Pro",
"screen_resolution": "1920x1080",
"source": "google",
"medium": "organic",
"campaign": "holiday_2024",
"utm_source": "google",
"utm_medium": "cpc",
"utm_campaign": "winter_sale",
"utm_term": "best_products",
"utm_content": "ad_variant_a",
"referrer_url": "https://www.google.com/search?q=best+products",
"country": "United States",
"region": "California",
"city": "San Francisco",
"ip_address": "192.168.1.100",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36",
"language": "en-US",
"timezone": "America/New_York"
},
"field_responses": [
{
"field_id": "38261edc-8bff-4b7e-9f15-1ea11a839927",
"value": "5"
},
{
"field_id": "1138820b-716f-4705-b43e-7553f82187f6",
"value": "The service was excellent and exceeded my expectations!"
}
]
}
Validation Rules
- Email addresses must follow standard email format
- URLs must be valid HTTP/HTTPS URLs
- IP addresses support both IPv4 and IPv6 formats
- Screen resolution must be in "WIDTHxHEIGHT" format
- Language codes must follow ISO 639-1 standard
- All text fields are sanitized to remove potentially dangerous characters
- Field response values are limited to 4000 characters each