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.


Creating a Run in Postman button

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 workspace, 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, select Three dots icon 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:

    • Dynamic button: This button uses JavaScript, HTML and CSS, so you can customize the button for a website. You can also access the Run in Postman API to dynamically create and update environments.

    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.

How to create a run in postman

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](](

Sample HTML snippet:

<div class="postman-run-button"
<script type="text/javascript">
  (function (p,o,s,t,m,a,n) {
    !p[s] && (p[s] = function () { (p[t] || (p[t] = [])).push(arguments); });
    !o.getElementById(s+t) && o.getElementsByTagName("head")[0].appendChild((
      (n = o.createElement("script")),
      ( = s+t), (n.async = 1), (n.src = m), n
  }(window, document, "_pm", "PostmanRunObject", ""));
  • Embed the code where you would like the button to be displayed.

Run in postman

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.

Fork collection for run in postman

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.

Next steps

Read more about the Run in Postman API and learn how to add and update environments with your button.

Last modified: 2022/01/12