Import from Postman
If you already have a Postman collection, Mock Studio can turn it into a mock. Each request becomes an endpoint, and the examples saved with the request become its responses.
Before you start
Export the collection from Postman as a .json file. In Postman, open the collection's menu, choose Export and pick Collection v2.1.
Mock Studio reads:
- collections in format v2.1, v2.0 and the older v1;
- a single request or a folder, copied as JSON;
- one file or several at once, or JSON pasted into the dialog.
The mock answers with what the collection contains. A request that has saved examples in Postman gets those as responses. A request with none gets a placeholder 200 response, so save examples in Postman first if you want realistic replies.
Import a collection
Select Import in the rail, then From Postman collection.
Select Choose files and pick one or more collection
.jsonfiles. Or paste JSON into Or paste Postman JSON here and select Add.You can add several collections before importing. The box reads
Added:followed by their names.Read the preview: the number of endpoints, folders and saved examples, and any notes under them.
In Import into, choose where the endpoints go.
Select Import.

- 1Choose files — Pick collection files. Added collections are listed here.
- 2Add — Adds the JSON you pasted in the box.
- 3Preview — How many endpoints, folders and saved examples were found.
- 4Notes — Anything that did not convert cleanly.
- 5Import into — A new project or one of your existing projects.
- 6Import — Creates the endpoints.
A message confirms the result, such as Created "Shop API" with 4 endpoints.
Import into a new or an existing project
| Import into | Result |
|---|---|
| A new project | A project named after the collection, on the next free port. With several collections the choice reads New projects (one per collection). |
| Existing: a project name | The endpoints are added to that project. Existing endpoints are left as they are. |
When you import into an existing project, a checkbox offers to put the new endpoints in a folder named after the collection, or Put each collection in its own folder when there are several. Keep it ticked to hold the imported endpoints together in the list.

How a collection is converted
Requests become endpoints
| In Postman | In Mock Studio |
|---|---|
| Request name | Endpoint name |
| Method | Method. A method Mock Studio does not have is imported as ANY. |
| URL | Path. The host is dropped. |
| Description | Description / notes |
| Folder | Folder in the endpoints list, nested folders included |
The path keeps only the part after the host:
| Postman URL | Endpoint path |
|---|---|
https://api.example.com/users | /users |
{{baseUrl}}/users/:id | /users/:id |
{{baseUrl}}/users/{{userId}} | /users/:userId |
{{baseUrl}}/v{{version}}/users | /v2/users when the collection sets version to 2, otherwise /*/users |
Saved examples become responses
Each saved example becomes one response:
| In the example | In the response |
|---|---|
| Name | Label, or Example 1, Example 2 when it has no name |
| Status code | Status |
| Headers | Response headers. Transfer headers such as Content-Length and Date are left out. |
| Body | Body |
Body language or Content-Type | Body type: JSON, XML, HTML or Text; Empty when there is no body |
A request with no saved examples gets one response labelled Default, with status 200 and the body {"ok": true}.
Several examples become conditional rules
When a request has more than one example, the endpoint uses the Conditional rules strategy, so that every example can be reached:
- The first example with a
2xxstatus is moved to the top and has no conditions. It is the fallback, sent when nothing else matches. - Every other example gets a condition, chosen like this:
| The example's saved request | Condition added |
|---|---|
| Has a query parameter that the main request does not have, or with a different value | Query param name equals value |
| Has no such difference | Header x-mock-response-name equals the example's name |
The header rule is the same convention Postman's own mock servers use. To ask for a particular example, send its name in that header:
curl http://localhost:8080/orders/42 -H 'x-mock-response-name: Not found'Without the header, the endpoint sends the fallback. You can replace these conditions with ones that suit your tests; see Conditional rules.
Variables
| In Postman | What happens |
|---|---|
A collection variable with a value, such as {{baseUrl}} | Replaced with its value in bodies and headers |
A Postman dynamic variable, such as {{$guid}} | Replaced with the matching Mock Studio token |
| A variable with no value in the collection | Left as typed, and listed in the notes |
Environment and global variables are not part of a collection file, so they count as variables with no value. Replace them with fixed values or tokens after importing.
Dynamic variables that have a Mock Studio equivalent:
| Postman | Mock Studio |
|---|---|
{{$guid}}, {{$randomUUID}} | {{uuid}} |
{{$timestamp}} | {{timestamp}} |
{{$isoTimestamp}} | {{now}} |
{{$randomInt}} | {{randomInt(0,1000)}} |
{{$randomFullName}} | {{faker.name}} |
{{$randomFirstName}} | {{faker.firstName}} |
{{$randomLastName}} | {{faker.lastName}} |
{{$randomEmail}}, {{$randomExampleEmail}} | {{faker.email}} |
{{$randomCity}} | {{faker.city}} |
{{$randomCompanyName}} | {{faker.company}} |
{{$randomPhoneNumber}} | {{faker.phone}} |
{{$randomBoolean}} | {{faker.bool}} |
{{$randomWord}} | {{faker.word}} |
{{$randomHexColor}} | {{faker.color}} |
Auth
If a request uses auth in Postman, the endpoint gets Require an auth header turned on. Auth set on a folder or on the collection is inherited by the requests inside, as in Postman, and No Auth on a request turns it off.
| Postman auth | Required header |
|---|---|
Bearer token, Basic auth, OAuth and the other types sent in Authorization | Authorization |
| API key added to a header | The key's header name, or X-API-Key when the name is a variable |
| API key or token added to the query string | None. The mock can only require headers, so auth is not enforced. |
The mock checks that the header is present, not that the value is right. See Auth, CORS and project settings.
What is not imported
Request bodies, pre-request and test scripts, and tests are not used. A mock only needs the responses.
Notes in the preview
The preview lists anything that needs your attention. Each note starts with a count.
| Note says | What to do |
|---|---|
| Requests had no saved examples and got a default 200 response | Add examples in Postman and import again, or edit the responses here. |
| Requests used methods Mock Studio cannot match exactly and were imported as ANY | Check those endpoints. Add a rule on HTTP method if needed. |
| Requests send credentials as a query parameter, so auth is not enforced | Add a rule on Query param if you want to test the missing-key case. |
A variable such as {{baseUrl}} includes a path that is not part of the imported paths | Call the mock without that prefix, or add it to the endpoint paths. |
Path segments mixed text with variables and were turned into * | Check the path matches what your app calls. |
| Some Postman variables have no value and are returned as-is in responses | Replace them with fixed values or tokens such as {{params.id}}. |
| Endpoints repeat a method and path imported earlier | Only the first is reached. Merge the examples into one endpoint or change a path. |
If the file is rejected
| Message | Cause |
|---|---|
This file isn't valid JSON. | The file is not a Postman export. Export it again as Collection v2.1. |
This is a Postman environment (or globals) file | You picked an environment file. Export the collection itself. |
This looks like an OpenAPI document, not a Postman collection | Use Import OpenAPI or Swagger instead. |
This JSON isn't a Postman collection | The JSON has no requests in a format Mock Studio knows. |
No requests found in this collection. | The collection is empty. |
After importing
Select Start server.
Point your app at the mock's address in place of the real API's base URL.
Open Live to check that the app's calls match the imported endpoints. A no match tag points to a path that differs, often a prefix such as
/api/v1that was part of{{baseUrl}}.
Coming from Postman altogether? See Postman migration for moving requests and collections to ApiWorkbench.