- Instant help with your Developer coding problems

Save request to a file in Postman

Question:
How to save request to a file in Postman?
Answer:
1. Move the request into a collection
2. Select Export from the collection's context menu
Description:

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:

Export using a collection

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:

  1. Create a new collection and create a copy of the related requests in the new collection.
  2. Select the collection and open the context menu
  3. Scroll down in the menu and select the Export option

    Export collection in Postman

  4. Select Export from the popup dialog

    Export request to file in Postman

 

Export using a code snippet

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.

  1. Select the request you want to export
  2. Click on the Code icon to open Code snippet window
  3. Select cURL from to output type as this is the most common format.
  4. Copy the code and insert it into a file using any text editor.

Export request as code snippet

 

Share "How to save request to a file in Postman?"
Tags:
export, save, request, collection, postman, file
Technical term:
Save request to a file in Postman