Creating Run in Postman buttons
One way to share your Postman Collections is to create a stand-alone Run in Postman button. The new Run in Postman button allows you to fork the collections. You can embed the button in your website or a README to let developers interact with your API more quickly.
Being a user, you can still create the Run in Postman button from API specification formats like OpenAPI and RAML. To create a button for the standard you use, first convert the file to a collection by importing it into Postman or by authoring your specification in Postman to generate a collection.
Make sure you're signed in to your Postman account, and that you have a collection in a public workspace to share.
Note: If the collection is present in a public workpspace, you can directly embed the copied code where you would like the button to be displayed. If the collection is present in a team or a personal workspace, share the collection to a public workspace to create the Run in Postman button.
In Postman, open the collection you want to share.
Next to the collection name, click ... to expand the collection details and select Share collection to open a modal.
Tab over to Via Run in Postman.
Choose a dynamic or static button:
To create a dynamic button, you need to share the collection to a public workspace. If you do not have a public workspace to share to, you can create a new one within the modal. For users on Enterprise plans, you need to have a community manager role to create a new public workspace.
- Static button: This button uses Markdown, so you can display it in a README, blog, or other Markdown document.
You can optionally include an environment to embed with your collection. On the left, click the Environment drop-down and choose the environment.
Click Copy Code.
Your embed code will include your collection's ID. In the examples below, :collection_id is a placeholder for that ID and :collection_url is a placeholder for url. If you choose to include an environment in your button, the code will also have the environment parameter.
Sample markdown snippet:
[![Run in Postman](https://run.pstmn.io/button.svg)](https://god.gw.postman.com/run-collection/:collection_id)
Sample HTML snippet:
- Embed the code where you would like the button to be displayed.
You can include an environment along with a collection in your Run in Postman button. The dynamic button gives you access to the Run in Postman API to create and modify environments.
Clicking Run in Postman button navigates to the page where you can fork the collection to your workspace. Forking the collection into your workspace will enable you to contribute to the source collection using pull requests. You can also view the collection in a public workspace if you like and even import a copy of the collection using the links present on the screen. All collections shared with the new Run in postman buttons come with Fork counts, that help you and your consumers understand how the API is being used.
Note: The live Run in Postman buttons automatically stay updated with changes in the original collection, so your consumers always get the most recent version of your collection without publishers having to manually update the collection's link.
Read more about the Run in Postman API and learn how to add and update environments with your button.