DEV Community

Kai Alder
Kai Alder

Posted on

I just needed a quick mock API, not a whole setup

I needed a mock API last week. Not a full mock server setup — just a quick endpoint that returns some JSON so I could test my frontend without waiting on the backend team.

I tried the usual suspects. json-server needs a local setup. Mockoon is a desktop app. Beeceptor wants me to sign up. Mocky.io works but the responses are static — no faker data, no conditional logic.

So I built one into webtoolz.

What it does

You define endpoints (GET /users, POST /orders/:id, whatever), set up the response body with template variables, and get a live URL. That's it.

The response body supports faker.js placeholders:

{
  "id": "{{uuid}}",
  "name": "{{faker.person.fullName}}",
  "email": "{{faker.internet.email}}",
  "joined": "{{now}}"
}
Enter fullscreen mode Exit fullscreen mode

Every request generates fresh data. You also get access to path params, query strings, headers, and request body via {{params.id}}, {{query.page}}, etc.

The parts I actually use

Sequence mode — return a 500 on the first call, then 200 on retry. Great for testing error handling without manually toggling things.

Conditional responses — match on query params, headers, or body fields. So GET /users?status=active returns one response, anything else hits the fallback. Supports regex.

Shareable URLs — the entire config is encoded in the URL. No database, no account, no "please verify your email." Send the link to a teammate and they see exactly what you built. They can fork it and modify.

Auto-generated docs — click "Docs" and you get a Swagger-style page with a "Test Request" button. Handy when you want to share the mock API with someone who doesn't want to mess with curl.

What it doesn't do

No persistent storage (it's stateless). No WebSocket mocking. No rate limiting simulation. If you need those, Mockoon or WireMock are better fits.

But if you just need "give me a fake /users endpoint with realistic data in 30 seconds" — this does the job without installing anything.

Try it here — pick a template (REST CRUD, Auth, Health Check) or start from scratch.


Curious what mock API setup you all use? I've been on a json-server → Beeceptor → this pipeline and wondering if there's something obvious I'm missing.

Top comments (2)

Collapse
 
theminimalcreator profile image
Guilherme Zaia

Solid execution on the stateless approach. One critique: faker.js in prod URLs is a security surface (DoS via regex in conditionals, predictable UUIDs). For throwaway mocks, fine. For shared team APIs, consider rate-limiting the URL generator or sandboxing eval contexts. Otherwise, clean solve for the "I just need /users NOW" problem.

Collapse
 
iceonfire profile image
Matteo Antony Mistretta

Really cool! I also love the ending 'z' in the service name, it resonates with my software house Inglorious Coderz ^_^