Form API: build and publish forms from code
Need a signup form, an order form or an application form generated from your own system? The SpaceForms Form API creates hosted, mobile-friendly forms from JSON and hands you the submissions.
Hosted forms, no front-end work
Send a list of fields, get back a public link. SpaceForms hosts the form, handles mobile layout, validation and storage.
curl -X POST https://spaceforms.io/api/v1/forms \
-H "Authorization: Bearer $SPACEFORMS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Customer feedback",
"published": true,
"fields": [
{ "id": "q1", "type": "rating", "label": "How satisfied are you?", "required": true },
{ "id": "q2", "type": "long_text", "label": "What could we do better?" }
]
}'
Read submissions
Fetch submissions as JSON for your database or as a CSV file for spreadsheets.
curl https://spaceforms.io/api/v1/forms/FORM_ID/responses \
-H "Authorization: Bearer $SPACEFORMS_API_KEY"
curl https://spaceforms.io/api/v1/forms/FORM_ID/responses.csv \
-H "Authorization: Bearer $SPACEFORMS_API_KEY" -o answers.csv
Endpoints
GET /forms
POST /forms
GET /forms/{id}
PATCH /forms/{id}
DELETE /forms/{id}
GET /forms/{id}/responses
GET /forms/{id}/responses.csv
GET /forms/{id}/stats
GET /account
Frequently asked questions
- How do I get an API key?
- Sign in, open Settings → API keys (spaceforms.io/settings/api-keys), name the key and press Create. The key starts with sf_live_ and is shown once. You can revoke it at any time.
- What does it cost?
- API access is included on every account, including free. Free accounts can create unlimited forms and collect unlimited responses, and see the 10 most recent answers per form. Pro (from $14/month) shows every answer on every form.
- Can I embed the forms on my site?
- Yes. Every published form has a public link and can be embedded on any website.