> 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.

# Transfer responses

POST https://api.getpostman.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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Postman API
  version: 1.0.0
paths:
  /collection-responses-transfers:
    post:
      operationId: transferCollectionResponses
      summary: Transfer responses
      description: Copies or moves responses into a request.
      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/transferCollectionItemsResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetail'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/TransferCollectionResponsesRequestInternalServerError
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/transferCollectionItems'
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:
    TransferCollectionItemsMode:
      type: string
      enum:
        - copy
        - move
      description: The transfer operation to perform.
      title: TransferCollectionItemsMode
    TransferCollectionItemsTargetModel:
      type: string
      enum:
        - collection
        - folder
        - request
      description: >-
        The collection, folder, or request that the items will be transferred
        to. For response transfers, use the `request` value.
      title: TransferCollectionItemsTargetModel
    TransferCollectionItemsTarget:
      type: object
      properties:
        id:
          type: string
          format: uid
          description: The UID of the destination collection, folder, or request.
        model:
          $ref: '#/components/schemas/TransferCollectionItemsTargetModel'
          description: >-
            The collection, folder, or request that the items will be
            transferred to. For response transfers, use the `request` value.
      required:
        - id
        - model
      description: Information about the item transfer's destination location.
      title: TransferCollectionItemsTarget
    TransferCollectionItemsLocationPosition:
      type: string
      enum:
        - start
        - end
        - before
        - after
      default: end
      description: The transferred item's position within the destination object.
      title: TransferCollectionItemsLocationPosition
    TransferCollectionItemsLocation:
      type: object
      properties:
        id:
          type:
            - string
            - 'null'
          format: uid
          description: For `before` or `after` positions, the model's UID.
        model:
          type:
            - string
            - 'null'
          description: >
            For `before` or `after` positions, the type of item (model) that the
            transferred item will be positioned by. One of: `folder`, `request`,
            or `response.`
        position:
          $ref: '#/components/schemas/TransferCollectionItemsLocationPosition'
          description: The transferred item's position within the destination object.
      required:
        - position
      description: |
        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.
      title: TransferCollectionItemsLocation
    transferCollectionItems:
      type: object
      properties:
        ids:
          type: array
          items:
            type: string
            format: uid
          description: A list of collection request, response, or folder UIDs to transfer.
        mode:
          $ref: '#/components/schemas/TransferCollectionItemsMode'
          description: The transfer operation to perform.
        target:
          $ref: '#/components/schemas/TransferCollectionItemsTarget'
          description: Information about the item transfer's destination location.
        location:
          $ref: '#/components/schemas/TransferCollectionItemsLocation'
          description: |
            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.
      required:
        - ids
        - mode
        - target
        - location
      title: transferCollectionItems
    transferCollectionItemsResponse:
      type: object
      properties:
        ids:
          type: array
          items:
            type: string
            format: uid
          description: >-
            A list of the transferred collection request, response, or folder
            UIDs.
      title: transferCollectionItemsResponse
    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
    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
    TransferCollectionResponsesRequestInternalServerError:
      oneOf:
        - $ref: '#/components/schemas/commonErrorTypeTitleDetail'
        - $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        - $ref: '#/components/schemas/commonErrorNameMessage'
      title: TransferCollectionResponsesRequestInternalServerError
  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
{
  "ids": [
    "12345678-a9b481c1-3e78-4af7-8db0-dce3f3f3c105"
  ]
}
```

**SDK Code**

```python Successful Response
import requests

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

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

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

print(response.json())
```

```javascript Successful Response
const url = 'https://api.getpostman.com/collection-responses-transfers';
const options = {
  method: 'POST',
  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-responses-transfers"

	req, _ := http.NewRequest("POST", 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-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'

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.post("https://api.getpostman.com/collection-responses-transfers")
  .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('POST', 'https://api.getpostman.com/collection-responses-transfers', [
  '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-responses-transfers");
var request = new RestRequest(Method.POST);
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-responses-transfers")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```

### Transfer Collection Items



**Request**

```json
{
  "ids": [
    "12345678-bcb5648b-eecb-4468-ade7-4efb38431bd1"
  ],
  "mode": "copy",
  "target": {
    "id": "12345678-2ba6b9c4-5327-4c46-9bf3-4ec84b74b720",
    "model": "collection"
  },
  "location": {
    "position": "end",
    "id": null,
    "model": null
  }
}
```

**Response**

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

**SDK Code**

```python Transfer Collection Items
import requests

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

payload = {
    "ids": ["12345678-bcb5648b-eecb-4468-ade7-4efb38431bd1"],
    "mode": "copy",
    "target": {
        "id": "12345678-2ba6b9c4-5327-4c46-9bf3-4ec84b74b720",
        "model": "collection"
    },
    "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 Transfer Collection Items
const url = 'https://api.getpostman.com/collection-responses-transfers';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"ids":["12345678-bcb5648b-eecb-4468-ade7-4efb38431bd1"],"mode":"copy","target":{"id":"12345678-2ba6b9c4-5327-4c46-9bf3-4ec84b74b720","model":"collection"},"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 Transfer Collection Items
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"ids\": [\n    \"12345678-bcb5648b-eecb-4468-ade7-4efb38431bd1\"\n  ],\n  \"mode\": \"copy\",\n  \"target\": {\n    \"id\": \"12345678-2ba6b9c4-5327-4c46-9bf3-4ec84b74b720\",\n    \"model\": \"collection\"\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 Transfer Collection Items
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.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-bcb5648b-eecb-4468-ade7-4efb38431bd1\"\n  ],\n  \"mode\": \"copy\",\n  \"target\": {\n    \"id\": \"12345678-2ba6b9c4-5327-4c46-9bf3-4ec84b74b720\",\n    \"model\": \"collection\"\n  },\n  \"location\": {\n    \"position\": \"end\",\n    \"id\": null,\n    \"model\": null\n  }\n}"

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

```java Transfer Collection Items
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/collection-responses-transfers")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"ids\": [\n    \"12345678-bcb5648b-eecb-4468-ade7-4efb38431bd1\"\n  ],\n  \"mode\": \"copy\",\n  \"target\": {\n    \"id\": \"12345678-2ba6b9c4-5327-4c46-9bf3-4ec84b74b720\",\n    \"model\": \"collection\"\n  },\n  \"location\": {\n    \"position\": \"end\",\n    \"id\": null,\n    \"model\": null\n  }\n}")
  .asString();
```

```php Transfer Collection Items
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/collection-responses-transfers', [
  'body' => '{
  "ids": [
    "12345678-bcb5648b-eecb-4468-ade7-4efb38431bd1"
  ],
  "mode": "copy",
  "target": {
    "id": "12345678-2ba6b9c4-5327-4c46-9bf3-4ec84b74b720",
    "model": "collection"
  },
  "location": {
    "position": "end",
    "id": null,
    "model": null
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Transfer Collection Items
using RestSharp;

var client = new RestClient("https://api.getpostman.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-bcb5648b-eecb-4468-ade7-4efb38431bd1\"\n  ],\n  \"mode\": \"copy\",\n  \"target\": {\n    \"id\": \"12345678-2ba6b9c4-5327-4c46-9bf3-4ec84b74b720\",\n    \"model\": \"collection\"\n  },\n  \"location\": {\n    \"position\": \"end\",\n    \"id\": null,\n    \"model\": null\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Transfer Collection Items
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "ids": ["12345678-bcb5648b-eecb-4468-ade7-4efb38431bd1"],
  "mode": "copy",
  "target": [
    "id": "12345678-2ba6b9c4-5327-4c46-9bf3-4ec84b74b720",
    "model": "collection"
  ],
  "location": [
    "position": "end",
    "id": ,
    "model": 
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.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()
```