> 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 element to a workspace

POST https://api.getpostman.com/workspaces/{workspaceId}/element-transfers
Content-Type: application/json

Transfers a [Postman element](https://learning.postman.com/docs/getting-started/basics/postman-elements/) from one workspace to another workspace. Supported elements include collections, environments, mocks, monitors, and Flows modules and actions.

When copying an element between workspaces, the [activity feed](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/workspace-activity/) for both workspaces update to reflect the change.

**Note:**

This endpoint does not support transferring elements from team workspaces to personal workspaces.


Reference: https://learning.postman.com/api-docs/api-reference/workspaces/transfer-workspace-element

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Postman API
  version: 1.0.0
paths:
  /workspaces/{workspaceId}/element-transfers:
    post:
      operationId: transferWorkspaceElement
      summary: Transfer element to a workspace
      description: >
        Transfers a [Postman
        element](https://learning.postman.com/docs/getting-started/basics/postman-elements/)
        from one workspace to another workspace. Supported elements include
        collections, environments, mocks, monitors, and Flows modules and
        actions.


        When copying an element between workspaces, the [activity
        feed](https://learning.postman.com/docs/collaborating-in-postman/using-workspaces/workspace-activity/)
        for both workspaces update to reflect the change.


        **Note:**


        This endpoint does not support transferring elements from team
        workspaces to personal workspaces.
      tags:
        - workspaces
      parameters:
        - name: workspaceId
          in: path
          description: The workspace's ID.
          required: true
          schema:
            $ref: '#/components/schemas/workspaceId'
        - name: x-api-key
          in: header
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/transferWorkspaceElementResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/commonErrorTypeTitleDetailStatus'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/transferWorkspaceElement'
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:
    workspaceId:
      type: string
      title: workspaceId
    TransferWorkspaceElementId:
      oneOf:
        - type: string
          format: uid
        - type: string
      description: The workspace element's ID.
      title: TransferWorkspaceElementId
    TransferWorkspaceElementType:
      type: string
      enum:
        - collection
        - environment
        - api
        - flow
        - mock
        - monitor
      description: The type of element to transfer.
      title: TransferWorkspaceElementType
    transferWorkspaceElement:
      type: object
      properties:
        id:
          $ref: '#/components/schemas/TransferWorkspaceElementId'
          description: The workspace element's ID.
        type:
          $ref: '#/components/schemas/TransferWorkspaceElementType'
          description: The type of element to transfer.
        to:
          type: string
          description: The workspace ID to transfer the element into.
      required:
        - id
        - type
        - to
      title: transferWorkspaceElement
    TransferWorkspaceElementResponseWorkspaceElementTransfers:
      type: object
      properties:
        type:
          type: string
          description: The type of element transferred.
        from:
          type: string
          description: The ID of the workspace the element was transferred from.
        id:
          type: string
          description: The element's ID.
        to:
          type: string
          description: The ID of the workspace the element was transferred to.
      description: Information about the element transfer.
      title: TransferWorkspaceElementResponseWorkspaceElementTransfers
    TransferWorkspaceElementResponseWorkspace:
      type: object
      properties:
        element-transfers:
          $ref: >-
            #/components/schemas/TransferWorkspaceElementResponseWorkspaceElementTransfers
          description: Information about the element transfer.
      title: TransferWorkspaceElementResponseWorkspace
    transferWorkspaceElementResponse:
      type: object
      properties:
        workspace:
          $ref: '#/components/schemas/TransferWorkspaceElementResponseWorkspace'
      title: transferWorkspaceElementResponse
    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
  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

### Transfer API



**Request**

```json
undefined
```

**Response**

```json
{
  "workspace": {
    "element-transfers": {
      "type": "api",
      "from": "1f0df51a-8658-4ee8-a2a1-d2567dfa09a9",
      "id": "8b6ea58b-fd33-4678-bdab-67734b3ed6b0",
      "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
    }
  }
}
```

**SDK Code**

```python Transfer API
import requests

url = "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers"

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

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

print(response.json())
```

```javascript Transfer API
const url = 'https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-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 Transfer API
package main

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

func main() {

	url := "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-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 Transfer API
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-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 Transfer API
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers', [
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Transfer API
using RestSharp;

var client = new RestClient("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-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 Transfer API
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-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



**Request**

```json
{
  "id": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
  "type": "collection",
  "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
}
```

**Response**

```json
{
  "workspace": {
    "element-transfers": {
      "type": "collection",
      "from": "1f0df51a-8658-4ee8-a2a1-d2567dfa09a9",
      "id": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
      "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
    }
  }
}
```

**SDK Code**

```python Transfer Collection
import requests

url = "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers"

payload = {
    "id": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
    "type": "collection",
    "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Transfer Collection
const url = 'https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"id":"12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2","type":"collection","to":"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"}'
};

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

```go Transfer Collection
package main

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

func main() {

	url := "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers"

	payload := strings.NewReader("{\n  \"id\": \"12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2\",\n  \"type\": \"collection\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\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
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-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  \"id\": \"12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2\",\n  \"type\": \"collection\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"id\": \"12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2\",\n  \"type\": \"collection\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers', [
  'body' => '{
  "id": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
  "type": "collection",
  "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Transfer Collection
using RestSharp;

var client = new RestClient("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"id\": \"12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2\",\n  \"type\": \"collection\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Transfer Collection
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "id": "12345678-12ece9e1-2abf-4edc-8e34-de66e74114d2",
  "type": "collection",
  "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-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()
```

### Transfer Flow



**Request**

```json
{
  "id": "68640e3433ea760031f7b16c",
  "type": "flow",
  "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
}
```

**Response**

```json
{
  "workspace": {
    "element-transfers": {
      "type": "flow",
      "from": "1f0df51a-8658-4ee8-a2a1-d2567dfa09a9",
      "id": "68640e3433ea760031f7b16c",
      "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
    }
  }
}
```

**SDK Code**

```python Transfer Flow
import requests

url = "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers"

payload = {
    "id": "68640e3433ea760031f7b16c",
    "type": "flow",
    "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Transfer Flow
const url = 'https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"id":"68640e3433ea760031f7b16c","type":"flow","to":"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"}'
};

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

```go Transfer Flow
package main

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

func main() {

	url := "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers"

	payload := strings.NewReader("{\n  \"id\": \"68640e3433ea760031f7b16c\",\n  \"type\": \"flow\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\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 Flow
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-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  \"id\": \"68640e3433ea760031f7b16c\",\n  \"type\": \"flow\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"id\": \"68640e3433ea760031f7b16c\",\n  \"type\": \"flow\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers', [
  'body' => '{
  "id": "68640e3433ea760031f7b16c",
  "type": "flow",
  "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Transfer Flow
using RestSharp;

var client = new RestClient("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"id\": \"68640e3433ea760031f7b16c\",\n  \"type\": \"flow\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Transfer Flow
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "id": "68640e3433ea760031f7b16c",
  "type": "flow",
  "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-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()
```

### Transfer Environment



**Request**

```json
{
  "id": "5daabc50-8451-43f6-922d-96b403b4f28e",
  "type": "environment",
  "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
}
```

**Response**

```json
{
  "workspace": {
    "element-transfers": {
      "type": "environment",
      "from": "1f0df51a-8658-4ee8-a2a1-d2567dfa09a9",
      "id": "5daabc50-8451-43f6-922d-96b403b4f28e",
      "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
    }
  }
}
```

**SDK Code**

```python Transfer Environment
import requests

url = "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers"

payload = {
    "id": "5daabc50-8451-43f6-922d-96b403b4f28e",
    "type": "environment",
    "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Transfer Environment
const url = 'https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"id":"5daabc50-8451-43f6-922d-96b403b4f28e","type":"environment","to":"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"}'
};

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

```go Transfer Environment
package main

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

func main() {

	url := "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers"

	payload := strings.NewReader("{\n  \"id\": \"5daabc50-8451-43f6-922d-96b403b4f28e\",\n  \"type\": \"environment\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\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 Environment
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-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  \"id\": \"5daabc50-8451-43f6-922d-96b403b4f28e\",\n  \"type\": \"environment\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"id\": \"5daabc50-8451-43f6-922d-96b403b4f28e\",\n  \"type\": \"environment\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers', [
  'body' => '{
  "id": "5daabc50-8451-43f6-922d-96b403b4f28e",
  "type": "environment",
  "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Transfer Environment
using RestSharp;

var client = new RestClient("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"id\": \"5daabc50-8451-43f6-922d-96b403b4f28e\",\n  \"type\": \"environment\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Transfer Environment
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "id": "5daabc50-8451-43f6-922d-96b403b4f28e",
  "type": "environment",
  "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-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()
```

### Transfer Mock



**Request**

```json
{
  "id": "e3d951bf-873f-49ac-a658-b2dcb91d3289",
  "type": "mock",
  "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
}
```

**Response**

```json
{
  "workspace": {
    "element-transfers": {
      "type": "mock",
      "from": "1f0df51a-8658-4ee8-a2a1-d2567dfa09a9",
      "id": "e3d951bf-873f-49ac-a658-b2dcb91d3289",
      "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
    }
  }
}
```

**SDK Code**

```python Transfer Mock
import requests

url = "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers"

payload = {
    "id": "e3d951bf-873f-49ac-a658-b2dcb91d3289",
    "type": "mock",
    "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Transfer Mock
const url = 'https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"id":"e3d951bf-873f-49ac-a658-b2dcb91d3289","type":"mock","to":"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"}'
};

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

```go Transfer Mock
package main

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

func main() {

	url := "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers"

	payload := strings.NewReader("{\n  \"id\": \"e3d951bf-873f-49ac-a658-b2dcb91d3289\",\n  \"type\": \"mock\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\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 Mock
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-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  \"id\": \"e3d951bf-873f-49ac-a658-b2dcb91d3289\",\n  \"type\": \"mock\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"id\": \"e3d951bf-873f-49ac-a658-b2dcb91d3289\",\n  \"type\": \"mock\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers', [
  'body' => '{
  "id": "e3d951bf-873f-49ac-a658-b2dcb91d3289",
  "type": "mock",
  "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Transfer Mock
using RestSharp;

var client = new RestClient("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"id\": \"e3d951bf-873f-49ac-a658-b2dcb91d3289\",\n  \"type\": \"mock\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Transfer Mock
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "id": "e3d951bf-873f-49ac-a658-b2dcb91d3289",
  "type": "mock",
  "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-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()
```

### Transfer Monitor



**Request**

```json
{
  "id": "1e6b6cc1-c760-48e0-968f-4bfaeeae9af1",
  "type": "monitor",
  "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
}
```

**Response**

```json
{
  "workspace": {
    "element-transfers": {
      "type": "monitor",
      "from": "1f0df51a-8658-4ee8-a2a1-d2567dfa09a9",
      "id": "1e6b6cc1-c760-48e0-968f-4bfaeeae9af1",
      "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
    }
  }
}
```

**SDK Code**

```python Transfer Monitor
import requests

url = "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers"

payload = {
    "id": "1e6b6cc1-c760-48e0-968f-4bfaeeae9af1",
    "type": "monitor",
    "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Transfer Monitor
const url = 'https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"id":"1e6b6cc1-c760-48e0-968f-4bfaeeae9af1","type":"monitor","to":"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"}'
};

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

```go Transfer Monitor
package main

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

func main() {

	url := "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers"

	payload := strings.NewReader("{\n  \"id\": \"1e6b6cc1-c760-48e0-968f-4bfaeeae9af1\",\n  \"type\": \"monitor\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\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 Monitor
require 'uri'
require 'net/http'

url = URI("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-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  \"id\": \"1e6b6cc1-c760-48e0-968f-4bfaeeae9af1\",\n  \"type\": \"monitor\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"id\": \"1e6b6cc1-c760-48e0-968f-4bfaeeae9af1\",\n  \"type\": \"monitor\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers', [
  'body' => '{
  "id": "1e6b6cc1-c760-48e0-968f-4bfaeeae9af1",
  "type": "monitor",
  "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Transfer Monitor
using RestSharp;

var client = new RestClient("https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-transfers");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"id\": \"1e6b6cc1-c760-48e0-968f-4bfaeeae9af1\",\n  \"type\": \"monitor\",\n  \"to\": \"d56bc95f-57c5-47cc-bd99-75c4ad96a6dd\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Transfer Monitor
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "id": "1e6b6cc1-c760-48e0-968f-4bfaeeae9af1",
  "type": "monitor",
  "to": "d56bc95f-57c5-47cc-bd99-75c4ad96a6dd"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.getpostman.com/workspaces/1f0df51a-8658-4ee8-a2a1-d2567dfa09a9/element-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()
```