1. Move the request into a collection 2. Select Export from the collection's context menu
Saving an API request to a file in Postman is a bit more complicated than it should be. You can not simply export a request with a single click, but you can use one of the following options:
Unfortunately, it is not possible to simply export an API request as there is no save or export option on the request level. However, you can export a collection. If you want to export only specific request(s) do the following:
- Create a new collection and create a copy of the related requests in the new collection.
- Select the collection and open the context menu
- Scroll down in the menu and select the Export option
- Select Export from the popup dialog
An alternative way to export an API request is using code snippets. Postman can convert any request to various code snippets and these snippets can be copied into a file.
- Select the request you want to export
- Click on the Code icon to open Code snippet window
- Select cURL from to output type as this is the most common format.
- Copy the code and insert it into a file using any text editor.