API Reference
Submit data programmatically from your own applications or use our drop-in HTML scripts. Every form you create in Inletbase automatically generates a secure, CORS-enabled submission endpoint.
Via Header or Query Parameter.
Plus 120 / min per API key.
Zero-Code HTML Embed
The easiest way to integrate a static HTML site. Drop our script into your site's <footer> or <head> and add data attributes to your form. We handle the fetch() request and UI loading states automatically.
<!-- 1. Add the script (requires your API key) --> <script src="https://inletbase.com/inletbase.js" data-api-key="YOUR_API_KEY"></script> <!-- 2. Build your form (add data-inletbase-form with your form slug) --> <form data-inletbase-form="your-form-slug" data-inletbase-loading="Sending..." data-inletbase-success="Thanks!"> <input type="email" name="email" required /> <button type="submit">Submit</button> </form>
Attributes: Use data-inletbase-loading to customize the loading text on the submit button and data-inletbase-success to customize the success message shown after submission.
REST Endpoint
Authentication
You must authenticate your requests using your API Key. This can be done in two ways:
1. Bearer Token (Recommended for backends)
Include the API Key in the Authorization header.
Authorization: Bearer YOUR_API_KEY2. Magic URL (For Webflow, Framer, and No-Code)
Append the API Key directly to the endpoint URL as a query parameter. This is required for platforms like Webflow and Framer that do not allow custom headers in their form actions.
https://inletbase.com/api/v1/forms/{slug}/submit?apikey=YOUR_API_KEYPayload Structure
Send a JSON object where keys match the form fields defined in your Inletbase dashboard.
{
"email": "user@example.com",
"full_name": "John Doe",
"message": "Hello from API"
}Note: Any extra fields sent in the JSON payload that are not explicitly defined in your form will still be accepted and stored as metadata.
Response Format
Success (200 OK)
{
"success": true,
"submissionId": "abc123",
"message": "Form submitted successfully",
"status": 200
}Error Responses
If validation fails, the API returns a 400 with the fields that need fixing:
{
"success": false,
"message": "Validation failed",
"details": {
"email": "Invalid email address format."
},
"status": 400
}Authentication and lookup errors return a simpler shape with the matching HTTP status, for example401 when the API key is missing, 403 when it is invalid, and 404 when the form is not found:
{
"error": "Invalid API Key"
}