Complete developer documentation for integrating JSONPost headless form backend into your frontend applications. Get started in minutes with our simple API.
Get your form backend up and running in 3 simple steps.
Sign up for JSONPost and create your first project to get your unique endpoint URL.
Set up your form endpoint with email notifications, webhooks, and custom settings.
Point your forms to your JSONPost endpoint and start collecting submissions instantly.
Here's how simple it is to submit data to JSONPost:
JSONPost provides flexible authentication options to match your security needs. Choose between public endpoints for simple forms or API key authentication for secure applications.
JSONPost supports both public endpoints and secure API key authentication depending on your security requirements.
For simple contact forms and public submissions, no API key is required. Your project ID and endpoint path provide basic access control.
Enable API key authentication for sensitive forms or when you need to restrict access to authorized applications only.
Security Note: You can configure each endpoint individually to require API key authentication through your dashboard.
Every endpoint follows a consistent URL pattern for easy integration.
Complete reference for the JSONPost submission API.
Submit form data to your JSONPost endpoint
application/json
application/x-www-form-urlencoded
multipart/form-data
JSONPost supports cross-origin requests from any domain
Full CORS Support: All JSONPost endpoints include proper CORS headers, allowing requests from any origin. Perfect for frontend applications, static sites, and SPAs.
The simplest way to integrate JSONPost with traditional HTML forms.
A simple contact form that submits directly to JSONPost
Form with hidden fields and custom redirect handling
name
attributesModern JavaScript and React examples for dynamic form handling.
Handle form submissions with modern JavaScript
Custom React hook for JSONPost integration
Integration examples for popular web frameworks and libraries.
Using JSONPost with Vue.js and the Composition API
Using JSONPost with Next.js Server Actions
Integrate JSONPost with Astro for both static sites and server-side rendering.
Configure your Astro project for optimal JSONPost integration
Accept file uploads alongside your form data with automatic storage and management.
Configure your endpoints to accept file uploads in your JSONPost dashboard
Navigate to endpoint settings
Go to your project dashboard and select the endpoint you want to configure.
Enable file uploads
Toggle the "File Uploads" option to allow file attachments.
Configure limits
Set maximum file size and allowed file types for security.
Understanding file size and type restrictions
Up to 10MB per file (Free tier)
Up to 50MB per file (Pro tier)
Up to 100MB per file (Enterprise tier)
Images: JPG, PNG, GIF, WebP
Documents: PDF, DOC, DOCX, TXT
Archives: ZIP, RAR
And many more...
Create a form that accepts both data and file uploads
Upload files programmatically using JavaScript and FormData
A complete React component for handling file uploads
Tips for secure and efficient file uploads
Validate File Types
Always specify accepted file types using the `accept` attribute to prevent unwanted uploads.
Show Upload Progress
Provide visual feedback during uploads, especially for large files.
Handle Errors Gracefully
Implement proper error handling for file size limits, network issues, and unsupported formats.
Security Considerations
JSONPost automatically scans uploaded files for malware and enforces file type restrictions.
Receive real-time notifications when forms are submitted to your endpoints.
Set up webhooks in your JSONPost dashboard to receive instant notifications
Navigate to your project dashboard
Go to your project settings and find the webhook configuration section.
Add your webhook URL
Enter the URL where you want to receive webhook notifications.
Test your webhook
Use the test feature to ensure your webhook endpoint is working correctly.
Example of the JSON payload sent to your webhook endpoint
Verify webhook authenticity with signature validation
Automatically send email notifications when forms are submitted.
Set up email notifications in your JSONPost dashboard
Pro Tip: Use template variables like {name} and {email}to personalize your email notifications with form data.
Available variables for customizing your email templates
Validate form submissions against custom JSON schemas to ensure data integrity and consistency.
JSONPost uses AJV (Another JSON Schema Validator) to validate incoming form submissions
When JSON validation is enabled for an endpoint, all incoming submissions are validated against your custom JSON schema before being stored. Invalid submissions are rejected with detailed error messages.
Example schema for a contact form with validation rules
Understanding validation error responses and how to handle them
When validation fails, JSONPost returns a 400 Bad Request response with detailed error information:
Frontend Handling: Parse the error details to show user-friendly validation messages in your form UI.
Tips for effective JSON schema validation
Schema Testing: Use online JSON schema validators to test your schemas before deploying them to production endpoints.
Keep your forms secure with JSONPost's built-in security features.
JSONPost includes comprehensive security measures by default
Recommendations for secure form implementation
Restrict form submissions to specific domains for enhanced security
Configure allowed domains to prevent unauthorized cross-origin requests to your endpoints.
https://example.com
- Specific domain*.example.com
- All subdomains*
- All domains (not recommended)Smart CORS Handling: Browser requests return the actual origin, while requests without an Origin header (like Postman or server-to-server calls) receive the first configured domain for security.
Best Practice: Always specify exact domains or use subdomain wildcards instead of allowing all origins.
Add an extra layer of security with API key verification
Enable API key authentication to ensure only authorized applications can submit to your endpoints.
Security Note: Keep your API keys secure and regenerate them regularly. Never expose them in client-side code.
Examples of implementing security features in your frontend code
Understanding JSONPost's usage limits and billing tiers
Usage Tracking: Your submission count is tracked monthly and resets at the beginning of each billing cycle. Upgrade your plan to increase your limits.
Create your free JSONPost account and start collecting form submissions in minutes.