Relmock

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.

GETPOSTPUTPATCHDELETE · stored in a database · free
The Requests page of a Relmock project: POST, PATCH, PUT and DELETE calls with their status codes, durations and sizes
The Requests page: every call your app makes, with status, timing and size.

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 methodPUT replaces a record, PATCH merges fields, DELETE removes it and applies your delete rules.
  • Reset when you likeRegenerate a table, or reset the project to the data it was generated with.
/mock/<project>recorded session
POST/posts201
→ {"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"}
PATCH/posts/11200
→ {"published": true}
{"id": 11, "title": "Shipping the checkout page", "published": true, …}
GET/posts?published=true&userId=2200
[{"id": 11, "title": "Shipping the checkout page", "published": true, "userId": 2, …}]
DELETE/posts/11204
GET/posts/11404
{"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 to warn or off when you need looser data.
  • Delete rulesblock, cascade or set_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.
/mock/<project>recorded session
POST/comments422
→ {"postId": 9999, "userId": 1, "body": "Nice!"}
{"error": "Unprocessable Entity",
 "message": "postId=9999 does not match any record in 'posts'.", "field": "postId"}
DELETE/users/4204
X-Mock-Cascade: comments: 3 deleted; posts: 3 deleted
The Schema page: users, posts and comments tables joined by foreign keys
The Schema page: drag a field onto another table to link them.

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 routesGET POST /{table} and GET PUT PATCH DELETE /{table}/{id} for every table
QueriesFilters ?status=active, _ne _gt _gte _lt _lte _like, sorting _sort _order, paging _page _limit
Custom endpointsAny path and method, with templated responses for what tables don't cover
Failure modesFlaky, outage or corrupted responses per project; _delay and _status on any call
AccessOptional X-API-Key, and a mock login so your app's sign-in flow runs against mock users
TimeA mock clock you can move forward to test expiry and scheduled changes
ImportOpenAPI, Prisma, GraphQL, pg_dump, mysqldump, JSON and CSV, with a preview first
ExportOpenAPI, SQL (Postgres, MySQL, SQLite), Prisma, TypeScript, Postman, JSON and CSV
DocsA shareable API reference with code snippets and a Try it console, optionally behind a passcode
Request logEvery 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.

Create a free account