Import & Export
Migrate from other tools easily. Import from 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:
.httpfiles for each request- Folders matching your Insomnia groups
.envfiles for environments

What Gets Imported
| Insomnia Item | Mercury Equivalent |
|---|---|
| Requests | .http files |
| Request Groups | Folders |
| Environments | .env.{name} files |
| Headers | Headers in .http file |
| Body | Body in .http 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.http
│ └── list-users.http
└── products/
└── create-product.http
Import from Postman
Coming soon! For now, you can:
- Export from Postman as cURL commands
- Import each cURL command in Mercury
Or manually create .http files — they're just text!
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 |
-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"
Variable Substitution
When exporting, Mercury substitutes environment variables with their current values.
File-Based Portability
Since Mercury uses plain .http files, you can also:
Share via Email/Slack
Just send the .http 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/*.http project-b/users/
Related Features
- Collections — Organizing imported requests
- Environments — Setting up imported environments
- File Format — The
.httpfile specification