Postman Import and Export
Teams rarely start from a blank page. API owners publish specifications, colleagues share collections, and old tools hold saved requests. Postman imports many formats and exports your work in portable files, so knowledge moves between people and tools without retyping.
What You Can Import
| Source | Description |
|---|---|
| Postman Collection JSON | A file exported from Postman by a colleague |
| OpenAPI (Swagger) | A formal API description in YAML or JSON |
| cURL command | A one-line terminal command copied from documentation |
| Raw text | Pasted JSON or YAML content |
| Link | A URL that points to a collection or specification file |
| GraphQL schema | A schema file that describes a GraphQL API |
Import a Collection File
- Click Import at the top of the sidebar.
- Drag the file into the window or click Files to browse.
- Review the preview that Postman displays.
- Click Import to confirm.
The new collection appears in the sidebar with every folder, request, and example intact.
Import an OpenAPI Specification
An OpenAPI file lists every endpoint of an API. Postman reads it and builds a ready-made collection.
openapi.yaml
│
▼
Postman Import
│
▼
Collection created
├── Users folder
│ ├── GET /users
│ ├── POST /users
│ └── GET /users/{id}
└── Orders folder
├── GET /orders
└── POST /ordersChoose between generating a collection, an API definition, or both. A collection suits testing, and a definition suits design work.
Import a cURL Command
Documentation often shows examples as cURL commands. Copy one, click Import, paste the text, and press Enter. Postman converts the command into a request with the correct method, URL, headers, and body.
curl -X POST https://api.example.com/orders \
-H "Content-Type: application/json" \
-d '{"item":"book","qty":2}'The reverse works too. Open the Code icon beside the request and pick cURL to copy a command for the terminal.
Export Your Work
Export a Collection
- Hover over the collection name and click the three-dot menu.
- Select Export.
- Choose the recommended collection format.
- Save the JSON file.
Send the file to a teammate by email or store it in a code repository. The collection then travels with the project source code.
Export an Environment
Open the Environments tab, click the three-dot menu beside an environment, and select Export. The file holds variable names and values, so remove passwords and tokens before sharing.
Generate Code Snippets
Click the </> icon at the right of a request to produce client code. Postman supports JavaScript, Python, Java, C#, PHP, Go, and many more languages. Developers paste the snippet straight into an application.
Safe Sharing Checklist
- Delete real passwords, tokens, and API keys from exported files.
- Replace private server addresses with placeholder variables.
- Keep exports under version control to track changes over time.
- Re-import the file on a clean machine to confirm it works.
Round Trip Overview
Specification ──import──► POSTMAN ──export──► JSON file
cURL command ──import──► │
Old collection ─import──► └──code──► Python, Java, JavaScriptKey Points
- Postman imports collections, OpenAPI files, cURL commands, and raw text.
- Importing an OpenAPI file builds a full collection in seconds.
- Exports produce portable JSON files for sharing and version control.
- Code snippets turn any request into client code in many languages.
- Clean secrets from every file before sharing it.
