Skip to main content

Fake Form Submission API

MOCK DATA

Generate coherent fake contact, signup, survey and application submissions with exact validation, attachment, spam and processing states.

Generated test data for fixtures and development

Base URL
/api/form-submissions
Capabilities
1 route Seedable
Last updated
July 29, 2026

GET /api/form-submissions

Live requestRuns against the public API
No key required
GET/api/form-submissions?form=signup&status=invalid&errorCount=3&asOf=2026-07-10T12%3A00%3A00.000Z&count=8&seed=42

Request parameters

Pin the payload shape, or allow any supported form.

Pin valid, invalid, pending or spam processing state, or allow any.

Exact validation errors; only valid for invalid status. With status=any it selects invalid.

Exact safe attachment metadata records per submission.

Elapsed days before asOf that may contain submission timestamps.

Replay anchor; defaults to the request clock and is always echoed.

Advanced response options7 options

How many records to generate (1–100).

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

Return all fields except these (comma-separated).

Response format: json envelope, ndjson (one record per line) or csv.

Pretty-print the JSON response.

Drop the envelope: return the raw array/object without data/meta wrapper.

Response

Example parameters are ready. Send the request to inspect the live response.

Route reference

Code samples Ready-to-copy requests in 4 languages
Choose a code sample language
curl "https://randomapi.dev/api/form-submissions?form=signup&status=invalid&errorCount=3&count=8&seed=42&asOf=2026-07-10T12%3A00%3A00.000Z"
const res = await fetch("https://randomapi.dev/api/form-submissions?form=signup&status=invalid&errorCount=3&count=8&seed=42&asOf=2026-07-10T12%3A00%3A00.000Z");
const { data, meta } = await res.json();
import requests

data = requests.get("https://randomapi.dev/api/form-submissions?form=signup&status=invalid&errorCount=3&count=8&seed=42&asOf=2026-07-10T12%3A00%3A00.000Z").json()["data"]
$json = json_decode(file_get_contents(
  "https://randomapi.dev/api/form-submissions?form=signup&status=invalid&errorCount=3&count=8&seed=42&asOf=2026-07-10T12%3A00%3A00.000Z"
), true);
$data = $json["data"];
Parameters Route-specific request inputs 6
form enum

Pin the payload shape, or allow any supported form.

default: any
allowed: contact | signup | survey | application | any
example: form=signup
status enum

Pin valid, invalid, pending or spam processing state, or allow any.

default: any
allowed: valid | invalid | pending | spam | any
example: status=invalid
errorCount int

Exact validation errors; only valid for invalid status. With status=any it selects invalid.

allowed: 1 – 5
example: errorCount=3
attachmentCount int

Exact safe attachment metadata records per submission.

default: 0
allowed: 0 – 2
example: attachmentCount=2
windowDays int

Elapsed days before asOf that may contain submission timestamps.

default: 30
allowed: 1 – 90
example: windowDays=14
asOf date

Replay anchor; defaults to the request clock and is always echoed.

example: asOf=2026-07-10T12:00:00.000Z
Universal parameters Shared response and formatting options 7
count int

How many records to generate (1–100).

default: 10
allowed: 1 – 100
example: count=3
seed int

Deterministic output: the same seed always returns the same records. Omit for random (the used seed is echoed in meta.seed).

example: seed=42
fields list

Return only these fields (comma-separated). Mutually exclusive with 'exclude'.

example: fields=id,form
exclude list

Return all fields except these (comma-separated).

example: exclude=accepted
format enum

Response format: json envelope, ndjson (one record per line) or csv.

default: json
allowed: json | ndjson | csv
example: format=csv
pretty boolean

Pretty-print the JSON response.

default: false
example: pretty=true
unwrap boolean

Drop the envelope: return the raw array/object without data/meta wrapper.

default: false
example: unwrap=true
Response schema Fields returned in each record 10
id string

Distinct fictional submission ID.

example: submission_fixture_0_a12b34c56d78ef

form string

contact | signup | survey | application.

example: signup

status string

valid | invalid | pending | spam.

example: invalid

payload object

Bounded form-specific fictional values.

example: {"name":"Avery Jensen","email":"submitter-a1b2c3d4@example.org","username":"fixture_1234abcd","password":"not-a-secret-1234","acceptedTerms":true,"marketingOptIn":false}

errors object[]

Field-addressable required, format or type errors; nonempty only for invalid status. Each rejectedValue exactly matches the deliberately invalid value retained in payload.

example: [{"field":"email","code":"invalid_format","message":"The fictional email value has an invalid format.","rejectedValue":"not-an-email"}]

attachments object[]

Zero to two safe metadata-only attachments with coherent MIME type.

example: [{"id":"att_fixture_1","fileName":"fixture-1.pdf","mimeType":"application/pdf","sizeBytes":42000,"url":"https://uploads.example/files/att_fixture_1"}]

submittedAt string (ISO 8601)

Submission time inside the resolved window.

example: 2026-07-09T10:00:00.000Z

processedAt string (ISO 8601) nullable

Ordered processing time; null only while pending.

example: 2026-07-09T10:01:00.000Z

spam object nullable

Threshold-consistent spam score/reason for spam status only.

example: null

accepted boolean

True exactly for valid submissions.

example: false

Documented examples

Build-generated requests and complete responses
3
Invalid signup submissions
GET /api/form-submissions?form=signup&status=invalid&errorCount=3&count=8&seed=42&asOf=2026-07-10T12%3A00%3A00.000Z
{
  "data": [
    {
      "id": "submission_fixture_0_15863c1d1cff87",
      "form": "signup",
      "status": "invalid",
      "payload": {
        "name": 12345,
        "email": "submitter-7a958016@example.org",
        "username": "fixture_cfb6a5c8",
        "password": null,
        "acceptedTerms": "not-a-boolean",
        "marketingOptIn": true
      },
      "errors": [
        {
          "field": "acceptedTerms",
          "code": "invalid_type",
          "message": "The fictional acceptedTerms value has an invalid type.",
          "rejectedValue": "not-a-boolean"
        },
        {
          "field": "password",
          "code": "required",
          "message": "The fictional password field is required.",
          "rejectedValue": null
        },
        {
          "field": "name",
          "code": "invalid_type",
          "message": "The fictional name value has an invalid type.",
          "rejectedValue": 12345
        }
      ],
      "attachments": [],
      "submittedAt": "2026-07-08T18:09:40.151Z",
      "processedAt": "2026-07-08T19:37:25.771Z",
      "spam": null,
      "accepted": false
    },
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Pending applications with attachments
GET /api/form-submissions?form=application&status=pending&attachmentCount=2&count=5&seed=9&asOf=2026-07-10T12%3A00%3A00.000Z
{
  "data": [
    {
      "id": "submission_fixture_0_b31b86a1a956a6",
      "form": "application",
      "status": "pending",
      "payload": {
        "name": "Christian Lebsack",
        "email": "submitter-51f328b2@example.org",
        "role": "engineer",
        "experienceYears": 6,
        "portfolioUrl": "https://portfolio.example/73e779f6",
        "coverNote": "This synthetic application demonstrates a bounded form payload."
      },
      "errors": [],
      "attachments": [
        {
          "id": "att_fixture_0_1_e4850cde",
          "fileName": "fixture-1-1.pdf",
          "mimeType": "application/pdf",
          "sizeBytes": 358312,
          "url": "https://uploads.example/files/att_fixture_0_1_e4850cde"
        },
        {
          "id": "att_fixture_0_2_2308cd05",
          "fileName": "fixture-1-2.txt",
          "mimeType": "text/plain",
          "sizeBytes": 41449,
          "url": "https://uploads.example/files/att_fixture_0_2_2308cd05"
        }
      ],
      "submittedAt": "2026-06-17T01:49:55.259Z",
      "processedAt": null,
      "spam": null,
      "accepted": false
    },
    {
      "id": "submission_fixture_1_b1fafad2aede49",
      "form": "application",
      "status": "pending",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}
Spam contact queue
GET /api/form-submissions?form=contact&status=spam&count=6&seed=17&asOf=2026-07-10T12%3A00%3A00.000Z
{
  "data": [
    {
      "id": "submission_fixture_0_252bc1d3605563",
      "form": "contact",
      "status": "spam",
      "payload": {
        "name": "Mary Welch",
        "email": "submitter-88755abf@example.org",
        "subject": "Question about a fictional account",
        "message": "This is synthetic form content for testing a contact workflow.",
        "category": "account",
        "consent": true
      },
      "errors": [],
      "attachments": [],
      "submittedAt": "2026-06-18T05:51:29.526Z",
      "processedAt": "2026-06-18T07:49:33.146Z",
      "spam": {
        "score": 0.947,
        "reason": "repeated_links"
      },
      "accepted": false
    },
    {
      "id": "submission_fixture_1_1a411bb239200a",
      "form": "contact",
      "status": "spam",
      "payload": {
        "name": "Erick Heller",
        "email": "submitter-c1cb87ee@example.org",
        "subject": "Question about a fictional account",
        "message": "This is synthetic form content for testing a contact workflow.",
        "category": "billing",
        "consent": true
      },
      "errors": [],
      "attachments": [],
      "submittedAt": "2026-06-12T19:20:22.897Z",
      "processedAt": "2026-06-12T21:05:11.271Z",
    …
    "generatedAt": "2026-07-29T08:13:22.000Z"
  }
}

About this API

Coverage & behavior

Generates bounded fictional form submissions for inboxes, moderation queues and validation-error interfaces. Four form shapes—contact, signup, survey and application—return realistic but safe payloads using reserved domains and obviously synthetic content.

Status controls every dependent field. Valid submissions are accepted with no validation errors; invalid submissions contain an exact requested number of errors and every error points to a field that exists in the payload; pending submissions have no processing timestamp; spam submissions carry a threshold-consistent score and reason. Attachments have extension/MIME agreement and safe .example URLs.

Omitted asOf resolves from the request clock and is echoed with windowDays, so the same seed can be replayed explicitly. Payload, error and attachment arrays are deliberately capped to keep count=100 responses within the release budget.

Use it for

  • Populate form-inbox, moderation and submission-detail interfaces
  • Test client and server validation against field-addressable errors
  • Exercise pending, accepted and spam-processing states with safe attachments

Frequently asked questions

Do validation errors reference real payload fields?

Yes. Every error names a field present in the returned payload and includes a stable code, message and rejected fixture value.

Can I request an exact number of errors?

Yes. Use status=invalid&errorCount=3; incompatible status/error combinations return a clear 400.

Are attachment URLs or emails real?

No. Emails use reserved example domains and attachment links use the non-resolving .example namespace.

Standards & references