A mock REST API that remembers what you write
Relmock stores every create, update and delete in a database, and keeps foreign keys valid the way Postgres would. Build your frontend against an API that behaves like the real one, before the real one exists.
stateful
Writes are stored. Reads return them.
Most mock servers answer every call with the same canned JSON. In Relmock a table is a table: what you POST is there on the next GET, from any browser or device, until you change it.
- Real recordsEach project keeps its rows in Postgres. Integer keys count up, other keys get a UUID.
- Every write method
PUTreplaces a record,PATCHmerges fields,DELETEremoves it and applies your delete rules. - Reset when you likeRegenerate a table, or reset the project to the data it was generated with.
→ {"title": "Shipping the checkout page", "body": "Draft", "userId": 2} {"id": 11, "title": "Shipping the checkout page", "body": "Draft", "published": false, "userId": 2, "createdAt": "2026-10-18T00:20:06"}
→ {"published": true} {"id": 11, "title": "Shipping the checkout page", "published": true, …}
[{"id": 11, "title": "Shipping the checkout page", "published": true, "userId": 2, …}]
{"error": "Not Found", "message": "Record not found."}
Responses copied from a real project; long bodies shortened with …
relations
Foreign keys that behave like a database
Draw relations between tables, or import them. Relmock checks them on every write, so your app meets the same errors it will meet in production.
- Checked on create and updateA key that points nowhere answers
422. Set a relation towarnoroffwhen you need looser data. - Delete rules
block,cascadeorset_null, per relation. The response says what changed. - Generated data that links upFake data follows your field rules and relations, and stays linked when you regenerate a table.
→ {"postId": 9999, "userId": 1, "body": "Nice!"} {"error": "Unprocessable Entity", "message": "postId=9999 does not match any record in 'posts'.", "field": "postId"}
X-Mock-Cascade: comments: 3 deleted; posts: 3 deleted
reference
What a project gives you
One base URL per project. Everything below works from the browser, a mobile app or a test runner.
| Table routes | GET POST /{table} and GET PUT PATCH DELETE /{table}/{id} for every table |
|---|---|
| Queries | Filters ?status=active, _ne _gt _gte _lt _lte _like, sorting _sort _order, paging _page _limit |
| Custom endpoints | Any path and method, with templated responses for what tables don't cover |
| Failure modes | Flaky, outage or corrupted responses per project; _delay and _status on any call |
| Access | Optional X-API-Key, and a mock login so your app's sign-in flow runs against mock users |
| Time | A mock clock you can move forward to test expiry and scheduled changes |
| Import | OpenAPI, Prisma, GraphQL, pg_dump, mysqldump, JSON and CSV, with a preview first |
| Export | OpenAPI, SQL (Postgres, MySQL, SQLite), Prisma, TypeScript, Postman, JSON and CSV |
| Docs | A shareable API reference with code snippets and a Try it console, optionally behind a passcode |
| Request log | Every call with headers, bodies and timing, filterable by status and method |
faq
Questions
Is the data really saved?
Yes. Every create, update and delete is written to a database, so later reads return it, from any device or browser, until you change it, regenerate the table or reset to the seed.
Is Relmock free?
Yes. Every account is free, with a monthly allowance of mock requests and limits on projects and records per table.
Can I import an existing schema?
Yes. Relmock imports OpenAPI, Prisma, GraphQL, pg_dump and mysqldump files, JSON and CSV, and shows a preview before anything is created.
Can I call it from the browser?
Yes. Mock URLs answer CORS requests from any origin, with or without credentials, so fetch and axios work directly.
Start with your schema
Import one or draw it, generate data, and call your API in a few minutes.