> This page is for Postman API Docs.

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://learning.postman.com/llms.txt.

# Transfer responses

POST https://api.postman.com/collection-responses-transfers
Content-Type: application/json

Copies or moves responses into a request.

Reference: https://learning.postman.com/api-docs/api-reference/collections/transfer-collection-responses

## Authentication

- `x-api-key` header (required) — API Key authentication via header

## Servers

- `https://api.postman.com` (https://api.postman.com, default)
- `https://api.eu.postman.com` (https://api.eu.postman.com)

## Request

### Body (application/json)

This endpoint expects a transferCollectionItems.

- `ids` (list of string, required) — A list of collection request, response, or folder UIDs to transfer.
- `mode` (enum, required) — The transfer operation to perform.
  - Allowed values: `copy`, `move`
- `target` (TransferCollectionItemsTarget, required) — Information about the item transfer's destination location.
- `location` (TransferCollectionItemsLocation, required) — The transferred items' placement in the target destination: - For `start` or `end` — Do not include the `model` and `id` values. - For `before` or `after` — Include the `model` and `id` properties.

## Response

### 200

Successful Response

- `ids` (list of string, optional) — A list of the transferred collection request, response, or folder UIDs.

## Errors

### 400 Bad Request Error

Bad Request

- `type` (string, optional) — The type of error.
- `title` (string, optional) — A short summary of the problem.
- `detail` (CommonErrorTypeTitleDetailDetail, optional) — Information about the error.

### 500 Internal Server Error

Internal Server Error

- `TransferCollectionResponsesRequestInternalServerError`
  - Error (Type, Title, Detail): commonErrorTypeTitleDetail
  - Error (Type, Title, Detail, Status): commonErrorTypeTitleDetailStatus
  - Error (Name, Message): commonErrorNameMessage

## Types

### TransferCollectionItemsTarget

Information about the item transfer's destination location.

- `id` (string, required) — The UID of the destination collection, folder, or request.
- `model` (enum, required) — The collection, folder, or request that the items will be transferred to. For response transfers, use the `request` value.
  - Allowed values: `collection`, `folder`, `request`

### TransferCollectionItemsLocation

The transferred items' placement in the target destination: - For `start` or `end` — Do not include the `model` and `id` values. - For `before` or `after` — Include the `model` and `id` properties.

- `position` (enum, required, default: end) — The transferred item's position within the destination object.
  - Allowed values: `start`, `end`, `before`, `after`
- `id` (string, optional, nullable) — For `before` or `after` positions, the model's UID.
- `model` (string, optional, nullable) — For `before` or `after` positions, the type of item (model) that the transferred item will be positioned by. One of: `folder`, `request`, or `response.`

### CommonErrorTypeTitleDetailDetail

Information about the error.

- string
- map from string to any

### commonErrorTypeTitleDetail

- `type` (string, optional) — The type of error.
- `title` (string, optional) — A short summary of the problem.
- `detail` (CommonErrorTypeTitleDetailDetail, optional) — Information about the error.

### commonErrorTypeTitleDetailStatus

- `type` (CommonErrorTypeTitleDetailStatusType, optional) — The type of error.
- `title` (string, optional) — A short summary of the problem.
- `detail` (string, optional) — Information about the error.
- `status` (integer, optional) — The error's HTTP status code.

### commonErrorNameMessage

- `error` (CommonErrorNameMessageError, optional) — Information about the error.

### CommonErrorTypeTitleDetailStatusType

The type of error.

- string
- string

### CommonErrorNameMessageError

Information about the error.

- `name` (string, optional) — The error name.
- `message` (string, optional) — The error message.

## Examples

### Copy Response to Request

**Request**

```json
{
  "ids": [
    "12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc"
  ],
  "mode": "copy",
  "target": {
    "id": "12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8",
    "model": "request"
  },
  "location": {
    "position": "start",
    "id": null,
    "model": null
  }
}
```

**Response**

```json
{
  "ids": [
    "12345678-a9b481c1-3e78-4af7-8db0-dce3f3f3c105"
  ]
}
```

**SDK Code**

```python Copy Response to Request
import requests

url = "https://api.postman.com/collection-responses-transfers"

payload = {
    "ids": ["12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc"],
    "mode": "copy",
    "target": {
        "id": "12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8",
        "model": "request"
    },
    "location": {
        "position": "start",
        "id": None,
        "model": None
    }
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Copy Response to Request
const url = 'https://api.postman.com/collection-responses-transfers';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"ids":["12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc"],"mode":"copy","target":{"id":"12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8","model":"request"},"location":{"position":"start","id":null,"model":null}}'
};

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

```go Copy Response to Request
package main

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

func main() {

	url := "https://api.postman.com/collection-responses-transfers"

	payload := strings.NewReader("{\n  \"ids\": [\n    \"12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc\"\n  ],\n  \"mode\": \"copy\",\n  \"target\": {\n    \"id\": \"12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8\",\n    \"model\": \"request\"\n  },\n  \"location\": {\n    \"position\": \"start\",\n    \"id\": null,\n    \"model\": null\n  }\n}")

	req, _ := http.NewRequest("POST", 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 Copy Response to Request
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/collection-responses-transfers")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"ids\": [\n    \"12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc\"\n  ],\n  \"mode\": \"copy\",\n  \"target\": {\n    \"id\": \"12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8\",\n    \"model\": \"request\"\n  },\n  \"location\": {\n    \"position\": \"start\",\n    \"id\": null,\n    \"model\": null\n  }\n}"

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

```java Copy Response to Request
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.postman.com/collection-responses-transfers")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"ids\": [\n    \"12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc\"\n  ],\n  \"mode\": \"copy\",\n  \"target\": {\n    \"id\": \"12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8\",\n    \"model\": \"request\"\n  },\n  \"location\": {\n    \"position\": \"start\",\n    \"id\": null,\n    \"model\": null\n  }\n}")
  .asString();
```

```php Copy Response to Request
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.postman.com/collection-responses-transfers', [
  'body' => '{
  "ids": [
    "12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc"
  ],
  "mode": "copy",
  "target": {
    "id": "12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8",
    "model": "request"
  },
  "location": {
    "position": "start",
    "id": null,
    "model": null
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Copy Response to Request
using RestSharp;

var client = new RestClient("https://api.postman.com/collection-responses-transfers");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"ids\": [\n    \"12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc\"\n  ],\n  \"mode\": \"copy\",\n  \"target\": {\n    \"id\": \"12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8\",\n    \"model\": \"request\"\n  },\n  \"location\": {\n    \"position\": \"start\",\n    \"id\": null,\n    \"model\": null\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Copy Response to Request
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "ids": ["12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc"],
  "mode": "copy",
  "target": [
    "id": "12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8",
    "model": "request"
  ],
  "location": [
    "position": "start",
    "id": ,
    "model": 
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/collection-responses-transfers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```

### Move Response to Request

**Request**

```json
{
  "ids": [
    "12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc"
  ],
  "mode": "move",
  "target": {
    "id": "12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8",
    "model": "request"
  },
  "location": {
    "position": "end",
    "id": null,
    "model": null
  }
}
```

**Response**

```json
{
  "ids": [
    "12345678-a9b481c1-3e78-4af7-8db0-dce3f3f3c105"
  ]
}
```

**SDK Code**

```python Move Response to Request
import requests

url = "https://api.postman.com/collection-responses-transfers"

payload = {
    "ids": ["12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc"],
    "mode": "move",
    "target": {
        "id": "12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8",
        "model": "request"
    },
    "location": {
        "position": "end",
        "id": None,
        "model": None
    }
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Move Response to Request
const url = 'https://api.postman.com/collection-responses-transfers';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"ids":["12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc"],"mode":"move","target":{"id":"12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8","model":"request"},"location":{"position":"end","id":null,"model":null}}'
};

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

```go Move Response to Request
package main

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

func main() {

	url := "https://api.postman.com/collection-responses-transfers"

	payload := strings.NewReader("{\n  \"ids\": [\n    \"12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc\"\n  ],\n  \"mode\": \"move\",\n  \"target\": {\n    \"id\": \"12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8\",\n    \"model\": \"request\"\n  },\n  \"location\": {\n    \"position\": \"end\",\n    \"id\": null,\n    \"model\": null\n  }\n}")

	req, _ := http.NewRequest("POST", 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 Move Response to Request
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/collection-responses-transfers")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"ids\": [\n    \"12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc\"\n  ],\n  \"mode\": \"move\",\n  \"target\": {\n    \"id\": \"12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8\",\n    \"model\": \"request\"\n  },\n  \"location\": {\n    \"position\": \"end\",\n    \"id\": null,\n    \"model\": null\n  }\n}"

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

```java Move Response to Request
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.postman.com/collection-responses-transfers")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"ids\": [\n    \"12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc\"\n  ],\n  \"mode\": \"move\",\n  \"target\": {\n    \"id\": \"12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8\",\n    \"model\": \"request\"\n  },\n  \"location\": {\n    \"position\": \"end\",\n    \"id\": null,\n    \"model\": null\n  }\n}")
  .asString();
```

```php Move Response to Request
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.postman.com/collection-responses-transfers', [
  'body' => '{
  "ids": [
    "12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc"
  ],
  "mode": "move",
  "target": {
    "id": "12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8",
    "model": "request"
  },
  "location": {
    "position": "end",
    "id": null,
    "model": null
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Move Response to Request
using RestSharp;

var client = new RestClient("https://api.postman.com/collection-responses-transfers");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"ids\": [\n    \"12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc\"\n  ],\n  \"mode\": \"move\",\n  \"target\": {\n    \"id\": \"12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8\",\n    \"model\": \"request\"\n  },\n  \"location\": {\n    \"position\": \"end\",\n    \"id\": null,\n    \"model\": null\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Move Response to Request
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "ids": ["12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc"],
  "mode": "move",
  "target": [
    "id": "12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8",
    "model": "request"
  ],
  "location": [
    "position": "end",
    "id": ,
    "model": 
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/collection-responses-transfers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```

### Move Response Before Another Response

**Request**

```json
{
  "ids": [
    "12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc"
  ],
  "mode": "move",
  "target": {
    "id": "12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8",
    "model": "request"
  },
  "location": {
    "position": "before",
    "id": "12345678-80812b16-ac27-45b3-b3eb-793f78530d32",
    "model": "response"
  }
}
```

**Response**

```json
{
  "ids": [
    "12345678-a9b481c1-3e78-4af7-8db0-dce3f3f3c105"
  ]
}
```

**SDK Code**

```python Move Response Before Another Response
import requests

url = "https://api.postman.com/collection-responses-transfers"

payload = {
    "ids": ["12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc"],
    "mode": "move",
    "target": {
        "id": "12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8",
        "model": "request"
    },
    "location": {
        "position": "before",
        "id": "12345678-80812b16-ac27-45b3-b3eb-793f78530d32",
        "model": "response"
    }
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Move Response Before Another Response
const url = 'https://api.postman.com/collection-responses-transfers';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"ids":["12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc"],"mode":"move","target":{"id":"12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8","model":"request"},"location":{"position":"before","id":"12345678-80812b16-ac27-45b3-b3eb-793f78530d32","model":"response"}}'
};

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

```go Move Response Before Another Response
package main

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

func main() {

	url := "https://api.postman.com/collection-responses-transfers"

	payload := strings.NewReader("{\n  \"ids\": [\n    \"12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc\"\n  ],\n  \"mode\": \"move\",\n  \"target\": {\n    \"id\": \"12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8\",\n    \"model\": \"request\"\n  },\n  \"location\": {\n    \"position\": \"before\",\n    \"id\": \"12345678-80812b16-ac27-45b3-b3eb-793f78530d32\",\n    \"model\": \"response\"\n  }\n}")

	req, _ := http.NewRequest("POST", 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 Move Response Before Another Response
require 'uri'
require 'net/http'

url = URI("https://api.postman.com/collection-responses-transfers")

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

request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"ids\": [\n    \"12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc\"\n  ],\n  \"mode\": \"move\",\n  \"target\": {\n    \"id\": \"12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8\",\n    \"model\": \"request\"\n  },\n  \"location\": {\n    \"position\": \"before\",\n    \"id\": \"12345678-80812b16-ac27-45b3-b3eb-793f78530d32\",\n    \"model\": \"response\"\n  }\n}"

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

```java Move Response Before Another Response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.postman.com/collection-responses-transfers")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"ids\": [\n    \"12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc\"\n  ],\n  \"mode\": \"move\",\n  \"target\": {\n    \"id\": \"12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8\",\n    \"model\": \"request\"\n  },\n  \"location\": {\n    \"position\": \"before\",\n    \"id\": \"12345678-80812b16-ac27-45b3-b3eb-793f78530d32\",\n    \"model\": \"response\"\n  }\n}")
  .asString();
```

```php Move Response Before Another Response
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.postman.com/collection-responses-transfers', [
  'body' => '{
  "ids": [
    "12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc"
  ],
  "mode": "move",
  "target": {
    "id": "12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8",
    "model": "request"
  },
  "location": {
    "position": "before",
    "id": "12345678-80812b16-ac27-45b3-b3eb-793f78530d32",
    "model": "response"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Move Response Before Another Response
using RestSharp;

var client = new RestClient("https://api.postman.com/collection-responses-transfers");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"ids\": [\n    \"12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc\"\n  ],\n  \"mode\": \"move\",\n  \"target\": {\n    \"id\": \"12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8\",\n    \"model\": \"request\"\n  },\n  \"location\": {\n    \"position\": \"before\",\n    \"id\": \"12345678-80812b16-ac27-45b3-b3eb-793f78530d32\",\n    \"model\": \"response\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Move Response Before Another Response
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "ids": ["12345678-4b81b7c8-62c0-4cb0-b69d-0f256f1baddc"],
  "mode": "move",
  "target": [
    "id": "12345678-bcb5648b-eecb-4468-ade7-4efb38431bb8",
    "model": "request"
  ],
  "location": [
    "position": "before",
    "id": "12345678-80812b16-ac27-45b3-b3eb-793f78530d32",
    "model": "response"
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.postman.com/collection-responses-transfers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```