> For the complete documentation index, see [llms.txt](https://docs.magicapi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.magicapi.com/fundamentals/convert-postman-collection-to-openapi-yaml.md).

# Convert Postman Collection to OpenAPI Yaml

Download this tool:

```
npm i postman-to-openapi -g
```

On Postman Click on Export and export the collections as JSON.

Then on CLI run:

```
p2o ./path/to/PostmantoCollection.json -f ./out_openapi_.yml
```

This will create the OpenAPI Schema at `out_openapi_.yml.`

Open this file in a text editor of your choice and update the basePathUrl and any other variables.
