Build
Import and export
Start from the schema you already have, and take your mock's contract back out as OpenAPI, SQL, Prisma, TypeScript or a Postman collection.
Import

- Open Import & exportIt is the arrows icon in the left rail.
- Upload or pasteDrop a file (up to 2 MB) or switch to Paste. The format is detected.
- ReviewPreview import lists every table with its fields, keys, rules and records, plus relations and endpoints. Untick what you don't want, and choose what happens to tables that already exist: keep, import under a new name, or replace.
- ImportNothing is saved before this step.
| Format | What comes in |
|---|---|
| SQL | CREATE TABLE scripts, pg_dump and mysqldump files, with their data. Keys, NOT NULL, UNIQUE, CHECK, enums, lengths and ON DELETE rules become field rules and delete rules. |
| OpenAPI | OpenAPI 3 or Swagger 2, JSON or YAML. Models become tables; operations that tables don't cover become custom endpoints. |
| Prisma | schema.prisma models, enums and relations. |
| GraphQL | SDL type definitions. |
| JSON | An array of records, or { "users": [...], "posts": [...] } as in json-server's db.json. |
| CSV | One table per file, or a .zip of CSV files. |
| Postman | A collection's requests and saved responses become custom endpoints. |
Tip
Imported records become the table's seed: Reset every table to seed on the Tables page brings them back after your tests change them.
Export
Choose Export in the side panel, pick a format and options, check the preview, then copy or download.
| Format | Good for |
|---|---|
| OpenAPI 3 | Sharing the API contract with backend developers, or generating a client. JSON or YAML, with examples from your records. |
| TypeScript | An interface per table and a typed client for your mock, ready to paste into your frontend. |
| SQL | PostgreSQL, MySQL or SQLite tables with foreign keys, and optionally the records. |
| Prisma | Starting the real backend with the same models. |
| Postman | A collection with a request for every route and every custom endpoint. |
| JSON, CSV | All records, in db.json layout or one CSV per table. |
Exports from Relmock import back unchanged, so they also work as a backup of a project.