Import & Export
Migrate from other tools easily. Import from Postman, Insomnia, or cURL, and export your requests as cURL commands.
Import from Insomnia​
Mercury can import Insomnia collections in JSON or YAML format.
How to Import​
- In Insomnia, export your collection (File → Export Data)
- Choose JSON or YAML format
- In Mercury, click Import in the sidebar (or use the menu)
- Select your exported file
- Mercury creates:
.jsonfiles for each request- Folders matching your Insomnia groups
.envfiles for environments

What Gets Imported​
| Insomnia Item | Mercury Equivalent |
|---|---|
| Requests | .json files |
| Request Groups | Folders |
| Environments | .env.{name} files |
| Headers | Headers in .json file |
| Body | Body in .json file |
| Auth | Auth headers |
File Structure After Import​
If you import an Insomnia collection with:
- Request group "Users" containing "Get User" and "List Users"
- Request group "Products" containing "Create Product"
- Environment "Development"
Mercury creates:
your-workspace/
├── .env.development
├── users/
│ ├── get-user.json
│ └── list-users.json
└── products/
└── create-product.json
Import from Postman​
Mercury can import Postman Collection v2.1 files (JSON format).
How to Import​
- In Postman, click Export on your collection (or go to File → Export Collection)
- Choose Collection v2.1 format
- Save as JSON file
- In Mercury, click Import Postman... in the Open menu
- Select your exported file
- Mercury creates:
.jsonfiles for each request- Folders matching your Postman folder structure
.env.{collection-name}file for collection variables
What Gets Imported​
| Postman Item | Mercury Equivalent |
|---|---|
| Requests | .json files |
| Folders | Directories |
| Collection Variables | .env.{name} file |
| Headers | Headers in .json file |
| Body (raw/JSON) | Body in .json file |
| Query Parameters | URL with query string |
File Structure After Import​
If you import a Postman collection named "My API" with:
- Folder "Auth" containing "Login" request
- Folder "Users" with subfolder "Admin" containing "List Admins"
- Top-level "Health Check" request
- Collection variables:
base_url,token
Mercury creates:
your-workspace/
├── .env.my-api # Collection variables
├── auth/
│ └── login.json
├── users/
│ └── admin/
│ └── list-admins.json
└── health-check.json
Postman variables like {{base_url}} are preserved in the .json files. Define them in your .env file to use them.
Import from cURL​
Paste a cURL command to create a request.
How to Import​
- Copy a cURL command from your terminal, browser DevTools, or API docs
- In Mercury, press
⌘+V(Mac) orCtrl+V(Windows/Linux) in the request panel - Mercury parses and fills in the request details
Example​
This cURL command:
curl -X POST https://api.example.com/users \
-H "Content-Type: application/json" \
-H "Authorization: Bearer token123" \
-d '{"name": "John"}'
Becomes:
POST https://api.example.com/users
Content-Type: application/json
Authorization: Bearer token123
{"name": "John"}
Supported cURL Flags​
| Flag | Support |
|---|---|
-X, --request | ✅ Method |
-H, --header | ✅ Headers |
-d, --data | ✅ Body |
--data-raw | ✅ Body |
--data-binary | ✅ Body |
--json | ✅ JSON body + Content-Type header |
-u, --user | ✅ Basic authentication |
-A, --user-agent | ✅ User-Agent header |
-b, --cookie | ✅ Cookie header |
-I, --head | ✅ HEAD request |
-G, --get | ✅ Force GET with data |
-L, --location | Ignored (Mercury handles redirects) |
-k, --insecure | Ignored |
-s, --silent | Ignored |
--compressed | Ignored |
Export as cURL​
Convert any request to a cURL command for sharing or CLI use.
How to Export​
- Open a request
- Right-click → Copy as cURL
- Or press
⌘+Shift+C(Mac) /Ctrl+Shift+C(Windows/Linux)
The cURL command is copied to your clipboard.
Example​
This request:
GET https://api.example.com/users
Authorization: Bearer {{API_TOKEN}}
Accept: application/json
Becomes (with variables substituted):
curl -X GET "https://api.example.com/users" \
-H "Authorization: Bearer your-substituted-token" \
-H "Accept: application/json"
When exporting, Mercury substitutes environment variables with their current values.
File-Based Portability​
Since Mercury uses plain .json files, you can also:
Share via Email/Slack​
Just send the .json file — anyone with Mercury can open it.
Commit to Git​
git add requests/
git commit -m "Add user API endpoints"
git push
Copy Between Projects​
cp project-a/users/*.json project-b/users/
Related Features​
- Collections — Organizing imported requests
- Environments — Setting up imported environments
- File Format — The
.jsonfile specification