API Reference
Form Submission
POST /submit/{site_id}
Submit form data to Airtable.
Request:
| Header | Required | Description |
|---|---|---|
Content-Type | Yes | application/x-www-form-urlencoded or application/json |
Accept | No | Set to application/json for JSON response; otherwise returns redirect |
Origin | Yes | Must match a domain configured for the site |
Body:
Key-value pairs where keys match your Airtable column names.
URL-encoded example:
Name=Jane+Doe&Email=jane%40example.com&Message=Hello
JSON example:
{
"Name": "Jane Doe",
"Email": "jane@example.com",
"Message": "Hello"
}
Success Response (200):
JSON (when Accept: application/json):
{
"success": true,
"submission_id": 42
}
Redirect (default): 302 to your configured redirect URL with ?airform_status=success.
Error Responses:
| Status | Meaning |
|---|---|
| 400 | Bad request — missing or invalid form data |
| 403 | Forbidden — origin domain not allowed for this site |
| 404 | Not found — site ID doesn't exist |
| 429 | Too many requests — rate limit exceeded |
| 500 | Server error — Airtable API failure or internal error |
Error JSON body:
{
"success": false,
"error": "forbidden",
"message": "Origin not allowed for this site"
}
Rate Limits
The submission endpoint is rate-limited per IP address. If you exceed the limit, you'll receive a 429 Too Many Requests response. Wait and retry.
CORS
The /submit/{site_id} endpoint supports CORS. Preflight OPTIONS requests are handled automatically. The Access-Control-Allow-Origin header is set to the requesting origin if it matches a configured domain for the site.