Skip to main content

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

  1. In Insomnia, export your collection (File → Export Data)
  2. Choose JSON or YAML format
  3. In Mercury, click Import in the sidebar (or use the menu)
  4. Select your exported file
  5. Mercury creates:
    • .http files for each request
    • Folders matching your Insomnia groups
    • .env files for environments

Import Insomnia - Replace with: Screenshot showing import dialog with Insomnia file selected

What Gets Imported

Insomnia ItemMercury Equivalent
Requests.http files
Request GroupsFolders
Environments.env.{name} files
HeadersHeaders in .http file
BodyBody in .http file
AuthAuth 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:

  1. Export from Postman as cURL commands
  2. 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

  1. Copy a cURL command from your terminal, browser DevTools, or API docs
  2. In Mercury, press ⌘+V (Mac) or Ctrl+V (Windows/Linux) in the request panel
  3. 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

FlagSupport
-X, --request✅ Method
-H, --header✅ Headers
-d, --data✅ Body
--data-raw✅ Body
--data-binary✅ Body
-L, --locationIgnored (Mercury handles redirects)
-k, --insecureIgnored
-s, --silentIgnored
--compressedIgnored

Export as cURL

Convert any request to a cURL command for sharing or CLI use.

How to Export

  1. Open a request
  2. Right-click → Copy as cURL
  3. 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/