API Reference

Form Submission

POST /submit/{site_id}

Submit form data to Airtable.

Request:

HeaderRequiredDescription
Content-TypeYesapplication/x-www-form-urlencoded or application/json
AcceptNoSet to application/json for JSON response; otherwise returns redirect
OriginYesMust 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:

StatusMeaning
400Bad request — missing or invalid form data
403Forbidden — origin domain not allowed for this site
404Not found — site ID doesn't exist
429Too many requests — rate limit exceeded
500Server 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.