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

SourceDescription
Postman Collection JSONA file exported from Postman by a colleague
OpenAPI (Swagger)A formal API description in YAML or JSON
cURL commandA one-line terminal command copied from documentation
Raw textPasted JSON or YAML content
LinkA URL that points to a collection or specification file
GraphQL schemaA schema file that describes a GraphQL API

Import a Collection File

  1. Click Import at the top of the sidebar.
  2. Drag the file into the window or click Files to browse.
  3. Review the preview that Postman displays.
  4. 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 /orders

Choose 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

  1. Hover over the collection name and click the three-dot menu.
  2. Select Export.
  3. Choose the recommended collection format.
  4. 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, JavaScript

Key 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.