> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt. For full content including API reference and SDK examples, see https://learning.postman.com/llms-full.txt.

# Merge or pull changes into a collection fork

PUT https://api.getpostman.com/collection-merges
Content-Type: application/json

[Merges](https://learning.postman.com/docs/collaborating-in-postman/using-version-control/forking-elements/#merge-changes-from-a-fork) a forked (source) collection and its parent (destination) collection asynchronously. To pull changes into a fork, pass the forked collection's ID as the `destination` value and the parent collection ID as the `source` value.

The response returns a task `id` value, which you can use to track the merge's status with the GET `/collection-merges-tasks/{taskId}` endpoint.


Reference: https://learning.postman.com/api-docs/api-reference/collections/async-merge-pull-collection-fork

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Postman API
  version: 1.0.0
paths:
  /collection-merges:
    put:
      operationId: asyncMergePullCollectionFork
      summary: Merge or pull changes into a collection fork
      description: >
        [Merges](https://learning.postman.com/docs/collaborating-in-postman/using-version-control/forking-elements/#merge-changes-from-a-fork)
        a forked (source) collection and its parent (destination) collection
        asynchronously. To pull changes into a fork, pass the forked
        collection's ID as the `destination` value and the parent collection ID
        as the `source` value.


        The response returns a task `id` value, which you can use to track the
        merge's status with the GET `/collection-merges-tasks/{taskId}`
        endpoint.
      tags:
        - collections
      parameters:
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/asyncMergeCollectionFork'
        '400':
          description: Malformed Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/AsyncMergePullCollectionForkRequestUnauthorizedError
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/AsyncMergePullCollectionForkRequestInternalServerError
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/asyncCollectionForkMerge'
servers:
  - url: https://api.getpostman.com
    description: https://api.getpostman.com
  - url: https://api.eu.postman.com
    description: https://api.eu.postman.com
components:
  schemas:
    AsyncCollectionForkMergeStrategy:
      type: string
      enum:
        - default
        - updateSourceWithDestination
        - deleteSource
      description: >
        The fork's merge strategy:

        - `default` — Make no changes to the fork. You must have **Editor**
        access to the destination collection.

        - `updateSourceWithDestination` — Merge changes and apply any
        differences in the destination collection to the source. You must have
        **Editor** access to both the source and destination collection.

        - `deleteSource` — Merge the changes and delete the fork. You must have
        **Editor** access to both the source and destination collection.
      title: AsyncCollectionForkMergeStrategy
    asyncCollectionForkMerge:
      type: object
      properties:
        strategy:
          $ref: '#/components/schemas/AsyncCollectionForkMergeStrategy'
          description: >
            The fork's merge strategy:

            - `default` — Make no changes to the fork. You must have **Editor**
            access to the destination collection.

            - `updateSourceWithDestination` — Merge changes and apply any
            differences in the destination collection to the source. You must
            have **Editor** access to both the source and destination
            collection.

            - `deleteSource` — Merge the changes and delete the fork. You must
            have **Editor** access to both the source and destination
            collection.
        source:
          type: string
          format: uid
          description: The source collection's unique ID.
        destination:
          type: string
          format: uid
          description: The destination collection's unique ID.
      required:
        - strategy
        - source
        - destination
      title: asyncCollectionForkMerge
    AsyncMergeCollectionForkTask:
      type: object
      properties:
        id:
          type: string
          description: The task's ID.
        status:
          type: string
          description: The task's status.
      description: Information about the merge task.
      title: AsyncMergeCollectionForkTask
    asyncMergeCollectionFork:
      type: object
      properties:
        task:
          $ref: '#/components/schemas/AsyncMergeCollectionForkTask'
          description: Information about the merge task.
      title: asyncMergeCollectionFork
    CommonErrorTypeTitleDetailStatusType:
      oneOf:
        - type: string
          format: uri-reference
        - type: string
      title: CommonErrorTypeTitleDetailStatusType
    commonErrorTypeTitleDetailStatus:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailStatusType'
        title:
          type: string
          description: A short summary of the problem.
        detail:
          type: string
          description: Information about the error.
        status:
          type: integer
          description: The error's HTTP status code.
      title: commonErrorTypeTitleDetailStatus
    CommonErrorNameMessageError:
      type: object
      properties:
        name:
          type: string
          description: The error name.
        message:
          type: string
          description: The error message.
      description: Information about the error.
      title: CommonErrorNameMessageError
    commonErrorNameMessage:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/CommonErrorNameMessageError'
          description: Information about the error.
      title: commonErrorNameMessage
    AsyncMergePullCollectionForkRequestUnauthorizedError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: AsyncMergePullCollectionForkRequestUnauthorizedError
    CommonErrorTypeTitleDetailDetail:
      oneOf:
        - type: string
        - type: object
          additionalProperties:
            description: Any type
      description: Information about the error.
      title: CommonErrorTypeTitleDetailDetail
    commonErrorTypeTitleDetail:
      type: object
      properties:
        type:
          type: string
          description: The type of error.
        title:
          type: string
          description: A short summary of the problem.
        detail:
          $ref: '#/components/schemas/CommonErrorTypeTitleDetailDetail'
          description: Information about the error.
      title: commonErrorTypeTitleDetail
    AsyncMergePullCollectionForkRequestInternalServerError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetail'
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: AsyncMergePullCollectionForkRequestInternalServerError
  securitySchemes:
    PostmanApiKey:
      type: apiKey
      in: header
      name: x-api-key
    scimApiKey:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        A valid [SCIM API
        key](https://learning.postman.com/docs/administration/scim-provisioning/scim-provisioning-overview/#generating-scim-api-key)
        for calls to SCIM endpoints.
    basicAuth:
      type: http
      scheme: basic

```

## Examples

### Successful Response



**Request**

```json
undefined
```

**Response**

```json
{
  "task": {
    "id": "pm~vc:merge-workflow~12345678-4824989b-cd77-4e2f-856c-1ff2a3e9aaca",
    "status": "in-progress"
  }
}
```

**SDK Code**

```python Successful Response
import requests

url = "https://api.getpostman.com/collection-merges"

headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, headers=headers)

print(response.json())
```

```javascript Successful Response
const url = 'https://api.getpostman.com/collection-merges';
const options = {
  method: 'PUT',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: undefined
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Successful Response
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/collection-merges"

	req, _ := http.NewRequest("PUT", url, nil)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Successful Response
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/collection-merges")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'

response = http.request(request)
puts response.read_body
```

```java Successful Response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.getpostman.com/collection-merges")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .asString();
```

```php Successful Response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.getpostman.com/collection-merges', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Successful Response
using RestSharp;

var client = new RestClient("https://api.getpostman.com/collection-merges");
var request = new RestRequest(Method.PUT);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
IRestResponse response = client.Execute(request);
```

```swift Successful Response
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/collection-merges")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Default



**Request**

```json
{
  "strategy": "default",
  "source": "12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3",
  "destination": "12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583"
}
```

**Response**

```json
{
  "task": {
    "id": "pm~vc:merge-workflow~12345678-4824989b-cd77-4e2f-856c-1ff2a3e9aaca",
    "status": "in-progress"
  }
}
```

**SDK Code**

```python Default
import requests

url = "https://api.getpostman.com/collection-merges"

payload = {
    "strategy": "default",
    "source": "12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3",
    "destination": "12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Default
const url = 'https://api.getpostman.com/collection-merges';
const options = {
  method: 'PUT',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"strategy":"default","source":"12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3","destination":"12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Default
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/collection-merges"

	payload := strings.NewReader("{\n  \"strategy\": \"default\",\n  \"source\": \"12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3\",\n  \"destination\": \"12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583\"\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Default
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/collection-merges")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"strategy\": \"default\",\n  \"source\": \"12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3\",\n  \"destination\": \"12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583\"\n}"

response = http.request(request)
puts response.read_body
```

```java Default
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.getpostman.com/collection-merges")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"strategy\": \"default\",\n  \"source\": \"12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3\",\n  \"destination\": \"12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583\"\n}")
  .asString();
```

```php Default
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.getpostman.com/collection-merges', [
  'body' => '{
  "strategy": "default",
  "source": "12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3",
  "destination": "12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Default
using RestSharp;

var client = new RestClient("https://api.getpostman.com/collection-merges");
var request = new RestRequest(Method.PUT);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"strategy\": \"default\",\n  \"source\": \"12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3\",\n  \"destination\": \"12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Default
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "strategy": "default",
  "source": "12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3",
  "destination": "12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/collection-merges")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Update Source with Destination



**Request**

```json
{
  "strategy": "updateSourceWithDestination",
  "source": "12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3",
  "destination": "12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583"
}
```

**Response**

```json
{
  "task": {
    "id": "pm~vc:merge-workflow~12345678-4824989b-cd77-4e2f-856c-1ff2a3e9aaca",
    "status": "in-progress"
  }
}
```

**SDK Code**

```python Update Source with Destination
import requests

url = "https://api.getpostman.com/collection-merges"

payload = {
    "strategy": "updateSourceWithDestination",
    "source": "12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3",
    "destination": "12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Update Source with Destination
const url = 'https://api.getpostman.com/collection-merges';
const options = {
  method: 'PUT',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"strategy":"updateSourceWithDestination","source":"12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3","destination":"12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Update Source with Destination
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/collection-merges"

	payload := strings.NewReader("{\n  \"strategy\": \"updateSourceWithDestination\",\n  \"source\": \"12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3\",\n  \"destination\": \"12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583\"\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Update Source with Destination
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/collection-merges")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"strategy\": \"updateSourceWithDestination\",\n  \"source\": \"12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3\",\n  \"destination\": \"12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583\"\n}"

response = http.request(request)
puts response.read_body
```

```java Update Source with Destination
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.getpostman.com/collection-merges")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"strategy\": \"updateSourceWithDestination\",\n  \"source\": \"12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3\",\n  \"destination\": \"12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583\"\n}")
  .asString();
```

```php Update Source with Destination
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.getpostman.com/collection-merges', [
  'body' => '{
  "strategy": "updateSourceWithDestination",
  "source": "12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3",
  "destination": "12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Update Source with Destination
using RestSharp;

var client = new RestClient("https://api.getpostman.com/collection-merges");
var request = new RestRequest(Method.PUT);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"strategy\": \"updateSourceWithDestination\",\n  \"source\": \"12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3\",\n  \"destination\": \"12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Update Source with Destination
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "strategy": "updateSourceWithDestination",
  "source": "12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3",
  "destination": "12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/collection-merges")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Delete Source



**Request**

```json
{
  "strategy": "deleteSource",
  "source": "12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3",
  "destination": "12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583"
}
```

**Response**

```json
{
  "task": {
    "id": "pm~vc:merge-workflow~12345678-4824989b-cd77-4e2f-856c-1ff2a3e9aaca",
    "status": "in-progress"
  }
}
```

**SDK Code**

```python Delete Source
import requests

url = "https://api.getpostman.com/collection-merges"

payload = {
    "strategy": "deleteSource",
    "source": "12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3",
    "destination": "12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.json())
```

```javascript Delete Source
const url = 'https://api.getpostman.com/collection-merges';
const options = {
  method: 'PUT',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"strategy":"deleteSource","source":"12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3","destination":"12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Delete Source
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.getpostman.com/collection-merges"

	payload := strings.NewReader("{\n  \"strategy\": \"deleteSource\",\n  \"source\": \"12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3\",\n  \"destination\": \"12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583\"\n}")

	req, _ := http.NewRequest("PUT", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Delete Source
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/collection-merges")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"strategy\": \"deleteSource\",\n  \"source\": \"12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3\",\n  \"destination\": \"12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583\"\n}"

response = http.request(request)
puts response.read_body
```

```java Delete Source
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.put("https://api.getpostman.com/collection-merges")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"strategy\": \"deleteSource\",\n  \"source\": \"12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3\",\n  \"destination\": \"12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583\"\n}")
  .asString();
```

```php Delete Source
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('PUT', 'https://api.getpostman.com/collection-merges', [
  'body' => '{
  "strategy": "deleteSource",
  "source": "12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3",
  "destination": "12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp Delete Source
using RestSharp;

var client = new RestClient("https://api.getpostman.com/collection-merges");
var request = new RestRequest(Method.PUT);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"strategy\": \"deleteSource\",\n  \"source\": \"12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3\",\n  \"destination\": \"12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Delete Source
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "strategy": "deleteSource",
  "source": "12345678-5a027c05-056b-49f5-ac9d-37c29f2d91c3",
  "destination": "12345678-b04fa319-3e7e-4fa3-b6a2-f5b29ad67583"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/collection-merges")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "PUT"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```