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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.magicapi.com/fundamentals/convert-postman-collection-to-openapi-yaml.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
