Submission API

Send form data into DropForm using a single POST endpoint. Supports HTML forms (redirect flow), JSON requests, and multipart file uploads.

Introduction

The Submission API is DropForm’s ingestion endpoint. It is designed for public form submissions: your website (or app) sends data to one URL, and DropForm validates, stores, and processes the submission.

The endpoint supports three request formats:

  • application/x-www-form-urlencoded (classic HTML forms)
  • application/json (API-style submissions)
  • multipart/form-data (file uploads)

Depending on the request format, DropForm will return either a redirect (browser-friendly) or a JSON response (API-friendly).

Endpoint

POST https://api.dropform.app/s/{uid}

The {uid} identifies the form. You can use this endpoint from:

  • plain HTML forms
  • frontend apps (JavaScript fetch)
  • server-side integrations

HTML form submit (redirect flow)

Use this when you want a standard browser form submit. The request is sent as application/x-www-form-urlencoded and DropForm responds with a redirect.

Consumes: application/x-www-form-urlencoded

Response: 303 See Other with Location header

Example

This flow is ideal for static sites and avoids CORS issues because it’s not an AJAX request.

JSON submit (API flow)

Use this when you want a programmatic submission and a JSON response (for SPAs, custom UIs, or server-to-server calls).

Consumes: application/json

Response: 200 OK (success) or 400 Bad Request (validation error)

Example request

Example response (success)

Example response (validation error)

Multipart (file upload)

File uploads use multipart/form-data. DropForm supports two modes:

  • Redirect mode (classic HTML file upload form)
  • JSON mode (API clients) — enabled when a data part exists with Content-Type: application/json

Consumes: multipart/form-data

HTML upload form (redirect mode)

API upload (JSON mode)

To force JSON mode, include a multipart field named data whose content-type is application/json. All files should use field names that match your form field names.

Responses

Redirect response

In redirect mode (HTML forms and some multipart submissions), DropForm returns:

  • 303 See Other
  • Location: <redirectUrl>

JSON response

In JSON mode (application/json and multipart JSON mode), DropForm returns a JSON body describing the result.

Status codes

  • 200 - OK (JSON mode success)
  • 303 - See Other (redirect mode success)
  • 400 - Bad Request (JSON mode validation error)

Tips & gotchas

  • Use name attributes: Only fields with a name are included in HTML form submissions.
  • Prefer redirect mode for static sites: It avoids CORS and provides a smooth UX.
  • Use JSON mode for SPAs: You can display inline success/errors without leaving the page.
  • Multipart JSON mode trigger: include a data part with Content-Type: application/json.
  • File field names: use the same field names as your form schema.

Learn more