Mock Data API Documentation This document provides instructions on how to use our AI-powered mock data generation API. Go back to the Mock API Playground to generate your endpoint.
API EndpointsGenerates random data from a JSON schema and returns a share link with a preview of the generated records.
Request Parameters Field Type Required Description jsonSchemaobject Yes The schema definition. Keys are field names, values are generators. recordsinteger No Number of records to generate. Default: 1
Request Example curl -X POST <YOUR_ENDPOINT_URL>/generate \
-H "Content-Type: application/json" \
-d '{
"jsonSchema": {
"id": "uuid",
"firstName": "firstName",
"lastName": "lastName",
"email": "email",
"phone": "phone",
"company": "company",
"price": "price",
"createdAt": "date"
},
"records": 2
}' 200 Success Response{
"apiUrl": "/mock-api/share/3d08bb76-0041-44dd-95bb-a19e9c173b29",
"preview": [
{
"id": "24059a6d-4370-4ea3-95fa-c89c1c4a289b",
"firstName": "Cody",
"lastName": "Abernathy",
"email": "[email protected] ",
"phone": "(335) 730-3808 x778",
"company": "Koepp, Hagenes and Stroman",
"price": "583.77",
"createdAt": "2025-12-21T20:06:46.652Z"
}
]
}
GET
/mock-api/share/:shareIdRetrieves the previously generated mock data using the share ID. This endpoint is ideal for embedding directly in your frontend application.
URL Parameters Field Type Required Description shareIdstring Yes The ID returned in apiUrl from POST /generate
Request Example curl -X GET <YOUR_ENDPOINT_URL>/mock-api/share/d6e6e81c-59f4-4b4f-a464-68e253a85328 200 Success Response{
"status": "success",
"data": [
{
"id": "24059a6d-4370-4ea3-95fa-c89c1c4a289b",
"firstName": "Cody",
"lastName": "Abernathy",
"email": "[email protected] ",
"phone": "(335) 730-3808 x778",
"company": "Koepp, Hagenes and Stroman",
"price": "583.77",
"createdAt": "2025-12-21T20:06:46.652Z"
}
]
}
Error Responses400 Bad Request {
"status": "error",
"message": "Invalid schema format"
}404 Not Found {
"status": "error",
"message": "Share ID not found"
}
Supported Schema PropertiesUse the following property keys in jsonSchema. Each key maps to a generator powered by faker.js.
Identity / User Property Type Example Notes firstNamestring Sourav Random first name lastNamestring Halder Random last name middleNamestring James Random middle name fullNamestring John James Doe Full name (first + middle + last) genderstring Male Returns "male" or "female" jobTitlestring Software Engineer Random professional title jobTypestring Full-time Job type (Full-time, Contract, etc.) biostring Passionate developer... Short biography text
Address / Location Property Type Example Notes streetstring 42 Street Street address secondaryAddressstring Apt. 12BDX Apartment, suite, etc. buildingNumberstring 221B Building/house number citystring Kolkata Random city name statestring West Bengal Full state/region name stateAbbrstring WB Abbreviated state code countrystring India Random country countryCodestring IN ISO 2-letter country code zipstring 700001 Postal/ZIP code coordinatesobject { lat: -57.67, lng: 153.38 } Lat/lng coordinates timezonestring Asia/Kolkata IANA timezone string
Commerce / Business Property Type Example Notes productstring Shoes Simple product type productNamestring Ergonomic Wooden Chair Full product name productDescriptionstring Stylish chair with comfort Marketing description departmentstring Electronics Commerce department pricestring 199.99 Random price currencystring USD ISO 4217 currency code companystring Globex Corporation Company name catchPhrasestring Empowering next-gen solutions Company catch phrase
Tech / Internet Property Type Example Notes emailstring [email protected] Valid-looking email usernamestring johndoe92 Random username passwordstring passW0rd! Random password urlstring https://example.com Random URL domainstring example.org Domain name ipstring 192.168.1.10 IPv4 address ipv6string 2001:0db8:85a3... IPv6 address macstring 00:1B:44:11:3A:B7 MAC address
Date & Time Property Type Example Notes datestring (ISO) 2025-08-20T14:32:00.000Z Random date-time pastDatestring (ISO) 2021-05-14T09:22:00.000Z Date in the past futureDatestring (ISO) 2026-03-02T18:45:00.000Z Date in the future recentDatestring (ISO) 2025-08-18T07:12:00.000Z Recent past date birthdatestring (ISO) 1993-04-25T00:00:00.000Z Plausible birthdate monthstring August Month name weekdaystring Wednesday Day of the week
Text / Content Property Type Example Notes wordstring innovation Single random word wordsstring creative smart design Multiple random words sentencestring The quick brown fox jumps. Single sentence paragraphstring Lorem ipsum dolor sit amet... Single paragraph slugstring creative-design-ideas URL-friendly slug
System / Misc Property Type Example Notes uuidstring 7c9e6679-7425-40de... UUID v4 nanoidstring V1StGXR8_Z5jdHi6B-myT NanoID string fileNamestring document_report.pdf File name with extension mimeTypestring application/json MIME type colorstring orchid Color name hexstring #ff6347 Hex color code rgbstring rgb(255, 99, 71) RGB color string
Media Property Type Example Notes imageUrlstring (URL) https://loremflickr.com/640/480 Random image URL avatarstring (URL) https://avatars.github... Avatar image URL abstractImagestring (URL) https://loremflickr.com/.../abstract Abstract image URL
Numbers & Boolean Property Type Example Notes numberinteger 42 Random integer (1-100) floatfloat 57.34 Random float (1-100, 2 decimals) booleanboolean true Random true or false