# Combine postman collections within the same workspace?

**URL:** <https://community.postman.com/t/combine-postman-collections-within-the-same-workspace/5313>\
**Category:** Help Hub\
**Tags:** collections\
**Created:** [May 7, 2019, 12:17am UTC](https://community.postman.com/t/combine-postman-collections-within-the-same-workspace/5313 "2019-05-07T00:17:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![shauwna](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@shauwna](https://community.postman.com/u/shauwna)\
**Post date:** [May 7, 2019, 12:17am UTC](https://community.postman.com/t/combine-postman-collections-within-the-same-workspace/5313/1 "2019-05-07T00:17:45Z")

</div>

I’m trying to find an easier way to combine 2 API collections in the same team workspace . I am the owner of one of the collection which I would want to put in another collection in the same workspace in Postman Pro.

---

<div class="post-metadata">

**Author:** ![Chris](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/chris/32/6637_2.png) [@Chris](https://community.postman.com/u/Chris)\
**Post date:** [May 7, 2019, 1:04am UTC](https://community.postman.com/t/combine-postman-collections-within-the-same-workspace/5313/2 "2019-05-07T01:04:40Z")

</div>

The `Share` action should allow you to share collections to different workspaces that are visible to you:

 ![share](https://us1.discourse-cdn.com/getpostman/original/2X/a/ae280c9a589e3931dc1e804f32b7393f55f9c4ba.png)

- **Sharing Collections** – [https://learning.getpostman.com/docs/postman/collections/sharing\_collections/](https://learning.getpostman.com/docs/postman/collections/sharing_collections/)

---

<div class="post-metadata">

**Author:** ![shauwna](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@shauwna](https://community.postman.com/u/shauwna)\
**Post date:** [May 7, 2019, 1:10am UTC](https://community.postman.com/t/combine-postman-collections-within-the-same-workspace/5313/3 "2019-05-07T01:10:36Z")

</div>

@Chris If my ask wasn’t clear- My API requests collection is already shared/part of team workspace. Now what I’m meaning to do is to combine this collection with another collection (which is in the same team workspace) so that all api requests are just part of 1 collection and not two separate ones. I do not want to share a collection in different workspace.

---

<div class="post-metadata">

**Author:** ![Chris](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/chris/32/6637_2.png) [@Chris](https://community.postman.com/u/Chris)\
**Post date:** [May 7, 2019, 5:54pm UTC](https://community.postman.com/t/combine-postman-collections-within-the-same-workspace/5313/4 "2019-05-07T17:54:36Z")

</div>

Ah, I see – totally misread that first post 😅. There are three ways (that I can think of) to go about combining two collections.

**Using the GUI**  
Individual requests and folders can be dragged and dropped into different collections within the same workspace. This is a _bit_ clunky if there are a lot of individual requests in a collection.

* * *

**Using the API**  
The Postman API is pretty great – you can update collections by sending a `PUT` request to the Update Collection endpoint with whatever information you’d like to update it within the request body. It’ll require some copy/pasting but here’s a generic overview of what the flow would look like:

1. Generate a Postman API key - [Postman](https://docs.api.getpostman.com/#authentication)

2. Retrieve all of your collections via the **GET All Collections** endpoint. Responses will look something like:

```auto
{
  "collections": [
    {
      "id": "dac5eac9-148d-a32e-b76b-3edee9da28f7",
      "name": "Cloud API",
      "owner": "631643",
      "uid": "631643-dac5eac9-148d-a32e-b76b-3edee9da28f7"
    },
    {
      "id": "f2e66c2e-5297-e4a5-739e-20cbb90900e3",
      "name": "Sample Collection",
      "owner": "631643",
      "uid": "631643-f2e66c2e-5297-e4a5-739e-20cbb90900e3"
    },
    {
      "id": "f695cab7-6878-eb55-7943-ad88e1ccfd65",
      "name": "Postman Echo",
      "owner": "631643",
      "uid": "631643-f695cab7-6878-eb55-7943-ad88e1ccfd65"
    }
  ]
}

```

1. Save the UIDs of the two collections you want to combine (not the `id`)

2. Retrieve the collection that’s to be combined into the main collection (let’s call it **C1** ) and save the response - the response will look something like:

```auto
{
  "collection": {
    "variables": [],
    "info": {
      "name": "Sample Collection",
      "_postman_id": "f2e66c2e-5297-e4a5-739e-20cbb90900e3",
      "description": "This is a sample collection that makes a tiny request to Postman Echo service to get the list of request headers sent by a HTTP client.",
      "schema": "https://schema.getpostman.com/json/collection/v2.0.0/collection.json"
    },
    "item": [
      {
        "id": "82ee981b-e19f-962a-401e-ea34ebfb4848",
        "name": "Request Headers",
        "event": [
          {
            "listen": "test",
            "script": {
              "type": "text/javascript",
              "exec": "var responseJSON;\ntry {\n tests[\"Body contains headers\"] = responseBody.has(\"headers\");\n responseJSON = JSON.parse(responseBody);\n tests[\"Header contains host\"] = \"host\" in responseJSON.headers;\n tests[\"Header contains test parameter sent as part of request header\"] = \"my-sample-header\" in responseJSON.headers;\n}\ncatch (e) { }\n\n\n\n"
            }
          }
        ],
        "request": {
          "url": "https://echo.getpostman.com/headers",
          "method": "GET",
          "header": [
            {
              "key": "my-sample-header",
              "value": "Lorem ipsum dolor sit amet",
              "description": ""
            }
          ],
          "body": {
            "mode": "formdata",
            "formdata": []
          },
          "description": ""
        },
        "response": []
      }
    ]
  }
}

```

1. Retrieve the collection you’d like to combine everything into (Let’s call it **C2)** using the `GET Single Collection` endpoint and save that response as well.

2. Create a `PUT` request to the [Update Collection](https://docs.api.getpostman.com/#aa3701e8-7f99-b421-7d74-0d571b051f3c) endpoint (this will update **C2** ). In the body of the request, add C2’s response and add all of the items you’d like from **C1** (Items are individual requests or folders).

* * *

**Stitch the JSON Together**  
Export the two collections from the app – they’ll be downloaded as JSON files. Inspect the two JSON files and copy/paste any of the `items` you want from one collection to the other and re-import back into the app. The important thing here is to make sure that you’re following the [schema](https://schema.getpostman.com/) for the particular collection version you’re using.

* * *

That’s a whole lotta information so feel free to send over any other questions you may have. The Postman API documentation page has a `Run in Postman` button on the top right that’ll allow you to import the API collection directly into the app to use.

---

<div class="post-metadata">

**Author:** ![shauwna](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@shauwna](https://community.postman.com/u/shauwna)\
**Post date:** [May 7, 2019, 8:06pm UTC](https://community.postman.com/t/combine-postman-collections-within-the-same-workspace/5313/5 "2019-05-07T20:06:08Z")

</div>

Thank you @Chris yea apparently I was struggling with moving/drag the folders from my collection to another because I was trying to move the parent/main collection. But it worked when individually moved inner folders in that collection one by one. Thanks!

---

<div class="post-metadata">

**Author:** ![betsypk01](https://avatars.discourse-cdn.com/v4/letter/b/4491bb/32.png) [@betsypk01](https://community.postman.com/u/betsypk01)\
**Post date:** [April 11, 2020, 1:26pm UTC](https://community.postman.com/t/combine-postman-collections-within-the-same-workspace/5313/6 "2020-04-11T13:26:01Z")

</div>

Thank you Chris. Your detailed explanation was very helpful

---

<div class="post-metadata">

**Author:** ![lakshmi.narayanan](https://avatars.discourse-cdn.com/v4/letter/l/5daacb/32.png) [@lakshmi.narayanan](https://community.postman.com/u/lakshmi.narayanan)\
**Post date:** [September 23, 2020, 11:25am UTC](https://community.postman.com/t/combine-postman-collections-within-the-same-workspace/5313/7 "2020-09-23T11:25:36Z")

</div>

Hi Chris,

is there any compare and merging kind of UI is available in postman?

like we have in intellij to compare and merge.

---

<div class="post-metadata">

**Author:** ![ile2807](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/ile2807/32/8681_2.png) [@ile2807](https://community.postman.com/u/ile2807)\
**Post date:** [May 21, 2021, 7:31am UTC](https://community.postman.com/t/combine-postman-collections-within-the-same-workspace/5313/8 "2021-05-21T07:31:06Z")

</div>

I have created a tool just for this purpose, it combines multiple collections into one, you can check it out here:

> **[jackal-postman-tools](https://www.npmjs.com/package/jackal-postman-tools)**
>
> Postman Collections manipulation tools

Its open source and I accept new feature requests

---

<div class="post-metadata">

**Author:** ![praveendvd](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/praveendvd/32/6796_2.png) [@praveendvd](https://community.postman.com/u/praveendvd)\
**Post date:** [May 21, 2021, 9:51am UTC](https://community.postman.com/t/combine-postman-collections-within-the-same-workspace/5313/9 "2021-05-21T09:51:28Z")

</div>

> **[Move multiple collections into a single collection](https://documenter.getpostman.com/view/8296678/TzXtGzRv)**
>
> !\[test\](https://cdn2.hubspot.net/hubfs/208250/Blog\_Images/postman.jpg)
> 
> \# Description
> 
> This collection helps in moving other collection under a single collection
> 
> Here we get full target collections using postman API
> 
> \*\*THIS WONT AFFECT THE ACTUAL...

That’s great 😍 , just to add to that . You can do it using this public collection too 🤩

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [February 6, 2024, 8:44am UTC](https://community.postman.com/t/combine-postman-collections-within-the-same-workspace/5313/11 "2024-02-06T08:44:35Z")

</div>

Closed on February 6, 2024, 8:44am UTC

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.
