---
title: Notehub API Postman Collection
description: A Postman Collection that provides full access to the Notehub API
source_url: https://dev.blues.io/tools-and-sdks/notehub-sdks/notehub-api-postman-collection/
canonical_url: https://dev.blues.io/tools-and-sdks/notehub-sdks/notehub-api-postman-collection/
markdown_url: https://dev.blues.io/tools-and-sdks/notehub-sdks/notehub-api-postman-collection.md
---

# Notehub API Postman Collection

The Notehub API Postman Collection is a pre-built set of requests for the [Notehub API](https://dev.blues.io/api-reference/notehub-api.md), ready to use in the [Postman API platform](https://www.postman.com/). It covers the full set of Notehub API endpoints, making it easy to explore, test, and prototype API calls without writing any code.

In this article you'll learn how to download and import the collection, how to set up authentication, and then how to perform your first request.

## Using the Collection

The basic steps of getting up and running with the Notehub API Postman Collection is relatively straightforward.

1. If necessary, [download and install the Postman app](https://www.postman.com/downloads/).

2. Download our [Notehub API Postman Collection](https://dev.blues.io/postmanNotehubCollection.json) as a JSON file.

3. [Import the collection into Postman](https://learning.postman.com/docs/getting-started/importing-and-exporting-data/#importing-data-into-postman). The easiest way to do this is to drag and drop the `.json` file into the Postman app.

## Set Up Authentication

With the collection imported, your next step is to set up the necessary authentication for accessing the Notehub API.

1. [Generate a Personal Access Token in Notehub](https://dev.blues.io/api-reference/notehub-api.md#authentication-with-personal-access-tokens) and copy the token itself to your clipboard.

2. In Postman, click the **Vault** icon (bottom-right corner), then create a new entry. Set the **Key** to `notehub_api_token`, and paste in the token from your clipboard as the **Value**. ![Creating an API token in the Postman vault](https://dev.blues.io/images/tools-and-sdks/postman/notehub-api-token.png?v=e7266410)

3. While still in Postman, open your Notehub API Collection by clicking the **Notehub API** folder.

4. Next, open the collection's **Scripts** tab, and then paste in the script below as a **Pre-request** script.

   ```js
   pm.vault.get("notehub_api_token")
     .then(token => {
       pm.variables.set("bearerToken", token);
   });
   ```

Here's what everything should look like when you're all set.

![Registering a pre-request script in Postman](https://dev.blues.io/images/tools-and-sdks/postman/pre-request-script.png?v=32b79272)

In Postman, pre-request scripts run before every request in a collection. In this case, the pre-request script takes the `notehub_api_token` value from your vault and sets it as a variable named `"bearerToken"`. All Notehub API requests use the `"bearerToken"` variable for authorization, so once you have this script in place you're ready to make your first request.

## Performing a Request

The Notehub API collection is organized by folders that match the URLs of the underlying requests. For example, the [Get Projects](https://dev.blues.io/api-reference/notehub-api/project-api.md#get-projects) request uses a URL of `/v1/projects`, and therefore its request in Postman is in a `Notehub API/v1/projects` folder.

Let's invoke this request so you can see how it all works.

1. Within Postman, select the Get Projects request. Look for it under `Notehub API/v1/projects/Get Projects` in your Notehub API collection (see screenshot below).

2. Invoke the request by clicking the blue **Send** button. If all went well, you should see the response at the bottom of the app in the **Body**. ![Invoking a request in Postman](https://dev.blues.io/images/tools-and-sdks/postman/postman-send-request.png?v=191118c0)

And that's it! The great thing about using the Postman collection is it prefills all available request arguments. When performing GET requests the arguments will be listed in the **Query Params**.

![List of request arguments in Postman](https://dev.blues.io/images/tools-and-sdks/postman/request-arguments.png?v=0972585c)

And when performing PUT and POST requests the available arguments are prefilled in the request's **Body**.

![Prefilled data in the body in Postman](https://dev.blues.io/images/tools-and-sdks/postman/request-body.png?v=ae430402)
