Access Postman data programmatically

The Postman API enables you to programmatically access data stored in your Postman account. You can use the API to perform actions such as managing your collections, APIs, workspaces, and more.

The access rate limits for your Postman account depend on your Postman plan. For more information, see Postman API rate limits.

This tutorial shows you how to make your first call to the Postman API. You can also learn more about the Postman API by reading the Postman API documentation. There you will find information to help you get started and information about each endpoint and operation.

Get your API key

Before you can use the Postman API, you’ll need an API key. An API key is a way to identify who you are when you make a request to the Postman API endpoints. It also lets the system know what you can do with the Postman API. For more details, see the Generate a Postman API key.

Store your API key

After you create your API key, store it as an environment variable or vault secret named postman-api-key, enabling you to store the value for later use to make requests.

You can store your API key in an environment as an environment variable. Make sure you follow these security best practices:

You can also store your API key in your Postman Vault as a vault secret, and you can reuse it in your local instance of Postman. Only you can access and use your vault secrets, and they aren't synced to the Postman cloud.

Make your first request

For your first request, use the /me endpoint. This is a basic GET endpoint that does not change any data. It returns information about the user that owns the API key that is being used to authenticate the call.

Fork the Postman API collection

Before you call the /me endpoint, fork the Postman API collection. Forking creates a copy of the collection that you can change but does not affect the parent element.

  1. In the Postman API collection you can find the Fork option in the overview tab. Select Fork icon Fork. You can also select the more actions icon More actions icon next to the collection's name, then Create a fork.

  2. Enter a label for your forked collection in the Fork label box. You’ll also need to select the workspace in which to create the forked collection in the Workspace box.

    Fork the Postman API collection
  3. Select Fork Collection to create the fork. Postman will redirect you to the workspace you selected to create the forked Postman API collection.

Make the API call

  1. In the forked Postman API collection, select the User folder. This folder contains the Get authenticated user (/me) endpoint.

    The Postman API collection's folders
  2. Select the Get authenticated user request, then Send.

    The Get authenticated user endpoint
  3. When you select Send, Postman returns an HTTP 401 Unauthorized response. This is because the endpoint requires authorization before it returns information about the API key's owner.

    The Invalid API Key authentication error
  4. Use the API key that you stored in your Postman environment. To do this, select the environment where you stored your API key.

    Select the Postman environment
  5. Select Send. Postman will return a successful response.

    A successful Get authenticated user endpoint response

Congratulations! You have made your first call to the Postman API.

Last modified: 2023/06/22