# Form submit API

The MuxForms API accepts POST JSON at /api/v1/forms/{formId}/submit (per-form ingest secret) and GET /api/v1/forms/{formId}/submissions (personal API key from My account). Browser embeds use submit tokens from GET schema instead of secrets.

## API basics

| Item | Value |
| --- | --- |
| Submit | POST /api/v1/forms/{id}/submit |
| List submissions | GET /api/v1/forms/{id}/submissions |
| Auth (submit) | ingsec_… ingest secret |
| Auth (list) | mfk_… personal API key |
| Max body (submit) | 64 KB |

## Endpoint

```http
POST https://www.muxforms.com/api/v1/forms/{formId}/submit
Content-Type: application/json
Authorization: Bearer ingsec_xxxxxxxx
X-MuxForms-Ingest-Secret: ingsec_xxxxxxxx

{
  "email": "lead@example.com",
  "message": "Need a demo next week"
}
```

Field names must match the form schema. Include the honeypot field as empty if you render it. `OPTIONS` is supported for browser CORS.

## Responses

- **200** — submission accepted
- **403** — missing ingest secret, invalid submit token, failed Turnstile, or origin not allowlisted
- **413** — JSON body over 64 KB
- **422** — validation failed (default 5,000 characters per field)
- **429** — rate limited

## Public schema (GET)

```http
GET https://www.muxforms.com/api/v1/forms/{formId}
```

Returns the public schema, a `submitToken` for embeds, and optional Turnstile site key.

## List submissions (personal API key)

Create a key in the dashboard (prefix `mfk_`).

```http
GET https://www.muxforms.com/api/v1/forms/{formId}/submissions?limit=50
Authorization: Bearer mfk_xxxxxxxx
```

Paginate with `before` (ISO timestamp) and `sid` (submission UUID) from `nextCursor`.

## FAQ

### What is the GET endpoint for?

Returns public schema, embed submit token, and optional Turnstile site key.

### What status code is validation failure?

422 with field-level errors; 403 for auth, origin, or Turnstile failures.

### Is OPTIONS supported?

Yes, for CORS preflight from allowed browser origins.

### Must I send the honeypot field?

If it exists in the schema, send it empty or omit it on trusted native clients per docs.

### Where do I get a personal API key?

Dashboard → My account → Personal API keys. Keys are shown once at creation.

### How does submission pagination work?

Pass nextCursor.before and nextCursor.sid as the before and sid query parameters until hasMore is false.

---

HTML version: https://www.muxforms.com/docs/api
Source: MuxForms (https://www.muxforms.com)
