> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.useroot.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.useroot.com/_mcp/server.

# Move funds between subaccounts

POST https://api.useroot.com/api/subaccounts/move
Content-Type: application/json

Creates a move to transfer funds between two subaccounts within the same root entity.

**Request Headers**

| Header | Type | Required | Description |
|--------|------|----------|-------------|
| `Idempotency-Key` | String | No | Unique key to prevent duplicate move requests. If provided, the same key cannot be used for another move. |

**Request Body**

| Field                | Type | Required | Default | Description | Validation Rules |
|----------------------|------|----------|---------|-------------|-----------------|
| `from_subaccount_id` | UUID | Yes | — | ID of the subaccount to move funds from. | Must be a valid UUID for an existing subaccount owned by your root entity |
| `to_subaccount_id`   | UUID | Yes | — | ID of the subaccount to move funds to. | Must be a valid UUID for an existing subaccount owned by your root entity, different from `from_subaccount_id` |
| `amount_in_minor_units` | Integer | Yes | — | Amount to move in the smallest unit of the currency. For USD, this is cents (100 = $1.00). | Must be a positive whole number. |
| `auto_approve` | Boolean | No | `true` | Whether to automatically approve and settle the move. When `false`, the move is created in `created` status and must be approved separately. | — |
| `client_metadata` | Object | No | — | Optional client key-value metadata to store with the move for your own reference. | Must be an object with string keys and string values. Maximum 50 keys, each key max 40 characters, each value max 500 characters, total size max 16KB. |

**Examples:**
- For USD, `amount_in_minor_units: 1000` is 1000 cents = $10.00
- For USD, `amount_in_minor_units: 1250` is 1250 cents = $12.50

**Approval flow**

When `auto_approve` is `true` (default), the move is created, approved, and settled in one request — the response has `status: "settled"`.

When `auto_approve` is `false`, the move is created in `created` status. Use **`POST /api/subaccounts/move/{move_id}/approve`** to approve and settle it, or **`DELETE /api/subaccounts/move/{move_id}`** to cancel it.

Moves do not enforce a minimum source balance — a subaccount may show a negative available balance after settlement.

**Response Body**

| Field | Type | Description |
|-------|------|-------------|
| `id` | UUID | Unique identifier for the move. |
| `from_subaccount_id` | UUID | ID of the subaccount funds were moved from. |
| `to_subaccount_id` | UUID | ID of the subaccount funds were moved to. |
| `amount_in_minor_units` | Integer | The move amount in the smallest unit of the currency. For USD, cents (100 = $1.00). |
| `status` | String | Current status of the move (`created`, `approved`, `settled`, `canceled`). |
| `status_recorded_at` | DateTime | Timestamp of the latest status change. |
| `client_metadata` | Object | Arbitrary metadata as key-value pairs that were provided when creating the move |
| `created_at` | DateTime | Timestamp when the move was created. |
| `updated_at` | DateTime | Timestamp when the move was last updated. |

**Idempotency Key**

You can include an `Idempotency-Key` header to ensure that duplicate requests are handled safely. When you retry a request with the same idempotency key:

- **200 OK**: If a move with the same idempotency key already exists, the existing move is returned. This allows you to recover the move ID after transient errors (e.g., 500 Internal Server Error).
- **201 Created**: If no move exists with the provided idempotency key, a new move is created.

**Success Responses**

| Status Code | Description |
|-------------|-------------|
| 200 | OK — An existing move with the provided idempotency key was found and returned (idempotency retry scenario). |
| 201 | Created — The move was successfully created (and settled, if `auto_approve` is `true`). |
| 207 | Multi-Status — The move was created and `auto_approve` was requested, but approval or settlement encountered an error. See `warning` in the response body. |

**Error Responses**

| Status Code | Error Code | Description |
|-------------|------------|-------------|
| 400 | VALIDATION_ERROR | The provided data failed validation (e.g., invalid UUIDs, same from/to subaccount, negative amount). |
| 401 | AUTHENTICATION_ERROR | Authentication credentials are invalid or missing. |
| 403 | AUTHORIZATION_ERROR | You do not have permission to perform this action. |
| 404 | NOT_FOUND | One or both subaccounts were not found. |

Reference: https://docs.useroot.com/api-reference/subaccounts-api/move-between-subaccounts

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: '[Code Generated] Root - Instant Account to Account Money Movement'
  version: 1.0.0
paths:
  /api/subaccounts/move:
    post:
      operationId: move-between-subaccounts
      summary: Move funds between subaccounts
      description: >-
        Creates a move to transfer funds between two subaccounts within the same
        root entity.


        **Request Headers**


        | Header | Type | Required | Description |

        |--------|------|----------|-------------|

        | `Idempotency-Key` | String | No | Unique key to prevent duplicate move
        requests. If provided, the same key cannot be used for another move. |


        **Request Body**


        | Field                | Type | Required | Default | Description |
        Validation Rules |

        |----------------------|------|----------|---------|-------------|-----------------|

        | `from_subaccount_id` | UUID | Yes | — | ID of the subaccount to move
        funds from. | Must be a valid UUID for an existing subaccount owned by
        your root entity |

        | `to_subaccount_id`   | UUID | Yes | — | ID of the subaccount to move
        funds to. | Must be a valid UUID for an existing subaccount owned by
        your root entity, different from `from_subaccount_id` |

        | `amount_in_minor_units` | Integer | Yes | — | Amount to move in the
        smallest unit of the currency. For USD, this is cents (100 = $1.00). |
        Must be a positive whole number. |

        | `auto_approve` | Boolean | No | `true` | Whether to automatically
        approve and settle the move. When `false`, the move is created in
        `created` status and must be approved separately. | — |

        | `client_metadata` | Object | No | — | Optional client key-value
        metadata to store with the move for your own reference. | Must be an
        object with string keys and string values. Maximum 50 keys, each key max
        40 characters, each value max 500 characters, total size max 16KB. |


        **Examples:**

        - For USD, `amount_in_minor_units: 1000` is 1000 cents = $10.00

        - For USD, `amount_in_minor_units: 1250` is 1250 cents = $12.50


        **Approval flow**


        When `auto_approve` is `true` (default), the move is created, approved,
        and settled in one request — the response has `status: "settled"`.


        When `auto_approve` is `false`, the move is created in `created` status.
        Use **`POST /api/subaccounts/move/{move_id}/approve`** to approve and
        settle it, or **`DELETE /api/subaccounts/move/{move_id}`** to cancel it.


        Moves do not enforce a minimum source balance — a subaccount may show a
        negative available balance after settlement.


        **Response Body**


        | Field | Type | Description |

        |-------|------|-------------|

        | `id` | UUID | Unique identifier for the move. |

        | `from_subaccount_id` | UUID | ID of the subaccount funds were moved
        from. |

        | `to_subaccount_id` | UUID | ID of the subaccount funds were moved to.
        |

        | `amount_in_minor_units` | Integer | The move amount in the smallest
        unit of the currency. For USD, cents (100 = $1.00). |

        | `status` | String | Current status of the move (`created`, `approved`,
        `settled`, `canceled`). |

        | `status_recorded_at` | DateTime | Timestamp of the latest status
        change. |

        | `client_metadata` | Object | Arbitrary metadata as key-value pairs
        that were provided when creating the move |

        | `created_at` | DateTime | Timestamp when the move was created. |

        | `updated_at` | DateTime | Timestamp when the move was last updated. |


        **Idempotency Key**


        You can include an `Idempotency-Key` header to ensure that duplicate
        requests are handled safely. When you retry a request with the same
        idempotency key:


        - **200 OK**: If a move with the same idempotency key already exists,
        the existing move is returned. This allows you to recover the move ID
        after transient errors (e.g., 500 Internal Server Error).

        - **201 Created**: If no move exists with the provided idempotency key,
        a new move is created.


        **Success Responses**


        | Status Code | Description |

        |-------------|-------------|

        | 200 | OK — An existing move with the provided idempotency key was
        found and returned (idempotency retry scenario). |

        | 201 | Created — The move was successfully created (and settled, if
        `auto_approve` is `true`). |

        | 207 | Multi-Status — The move was created and `auto_approve` was
        requested, but approval or settlement encountered an error. See
        `warning` in the response body. |


        **Error Responses**


        | Status Code | Error Code | Description |

        |-------------|------------|-------------|

        | 400 | VALIDATION_ERROR | The provided data failed validation (e.g.,
        invalid UUIDs, same from/to subaccount, negative amount). |

        | 401 | AUTHENTICATION_ERROR | Authentication credentials are invalid or
        missing. |

        | 403 | AUTHORIZATION_ERROR | You do not have permission to perform this
        action. |

        | 404 | NOT_FOUND | One or both subaccounts were not found. |
      tags:
        - subaccountsApi
      parameters:
        - name: x-api-key
          in: header
          description: >-
            RootPay API key sent in the x-api-key header. Keys are
            environment-scoped: live_* for production, test_* for sandbox.
          required: true
          schema:
            type: string
        - name: Idempotency-Key
          in: header
          description: Unique key to prevent duplicate requests
          required: false
          schema:
            type:
              - string
              - 'null'
      responses:
        '200':
          description: Move retrieved successfully (idempotency retry)
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Subaccounts
                  API_moveBetweenSubaccounts_Response_200
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MoveRequest'
servers:
  - url: https://api.useroot.com
    description: Production
components:
  schemas:
    MoveRequest:
      type: object
      properties:
        from_subaccount_id:
          type: string
          description: ID of the subaccount to move funds from
        to_subaccount_id:
          type: string
          description: ID of the subaccount to move funds to
        amount_in_cents:
          type:
            - integer
            - 'null'
          description: >-
            Deprecated. Use amount_in_minor_units instead. Still accepted and
            returned for backward compatibility.
        amount_in_minor_units:
          type:
            - integer
            - 'null'
          description: >-
            Amount to move in the account currency's minor units (e.g. cents for
            USD).
        auto_approve:
          type: boolean
          default: true
          description: >-
            Whether to automatically approve and settle the move. When false,
            the move is created in CREATED status and must be approved
            separately.
        client_metadata:
          type:
            - object
            - 'null'
          additionalProperties:
            type: string
          description: Optional client key-value metadata stored as client_metadata.
      required:
        - from_subaccount_id
        - to_subaccount_id
      description: Request to move funds between subaccounts.
      title: MoveRequest
    Subaccounts API_moveBetweenSubaccounts_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: Subaccounts API_moveBetweenSubaccounts_Response_200
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        RootPay API key sent in the x-api-key header. Keys are
        environment-scoped: live_* for production, test_* for sandbox.

```

## Examples

### Auto-approved move (default)



**Request**

```json
{
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "client_metadata": {
    "reference_id": "move_2024_01_15_001",
    "source": "web_portal"
  }
}
```

**Response**

```json
{
  "data": {
    "id": "move_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
    "amount_in_cents": 5000,
    "amount_in_minor_units": 5000,
    "status": "settled",
    "status_recorded_at": "2024-01-15T10:30:00Z",
    "client_metadata": {
      "reference_id": "move_2024_01_15_001",
      "source": "web_portal"
    },
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
```

**SDK Code**

```python Auto-approved move (default)
import requests

url = "https://api.useroot.com/api/subaccounts/move"

payload = {
    "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
    "amount_in_minor_units": 5000,
    "client_metadata": {
        "reference_id": "move_2024_01_15_001",
        "source": "web_portal"
    }
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Auto-approved move (default)
const url = 'https://api.useroot.com/api/subaccounts/move';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"from_subaccount_id":"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890","to_subaccount_id":"sub_b2c3d4e5-f678-90ab-cdef-123456789012","amount_in_minor_units":5000,"client_metadata":{"reference_id":"move_2024_01_15_001","source":"web_portal"}}'
};

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

```go Auto-approved move (default)
package main

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

func main() {

	url := "https://api.useroot.com/api/subaccounts/move"

	payload := strings.NewReader("{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_001\",\n    \"source\": \"web_portal\"\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 Auto-approved move (default)
require 'uri'
require 'net/http'

url = URI("https://api.useroot.com/api/subaccounts/move")

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  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_001\",\n    \"source\": \"web_portal\"\n  }\n}"

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

```java Auto-approved move (default)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.useroot.com/api/subaccounts/move")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_001\",\n    \"source\": \"web_portal\"\n  }\n}")
  .asString();
```

```php Auto-approved move (default)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.useroot.com/api/subaccounts/move', [
  'body' => '{
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "client_metadata": {
    "reference_id": "move_2024_01_15_001",
    "source": "web_portal"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Auto-approved move (default)
using RestSharp;

var client = new RestClient("https://api.useroot.com/api/subaccounts/move");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_001\",\n    \"source\": \"web_portal\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Auto-approved move (default)
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "client_metadata": [
    "reference_id": "move_2024_01_15_001",
    "source": "web_portal"
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.useroot.com/api/subaccounts/move")! 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 without auto-approve



**Request**

```json
{
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "auto_approve": false
}
```

**Response**

```json
{
  "data": {
    "id": "move_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
    "amount_in_cents": 5000,
    "amount_in_minor_units": 5000,
    "status": "created",
    "status_recorded_at": "2024-01-15T10:30:00Z",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
```

**SDK Code**

```python Move without auto-approve
import requests

url = "https://api.useroot.com/api/subaccounts/move"

payload = {
    "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
    "amount_in_minor_units": 5000,
    "auto_approve": False
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Move without auto-approve
const url = 'https://api.useroot.com/api/subaccounts/move';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"from_subaccount_id":"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890","to_subaccount_id":"sub_b2c3d4e5-f678-90ab-cdef-123456789012","amount_in_minor_units":5000,"auto_approve":false}'
};

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

```go Move without auto-approve
package main

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

func main() {

	url := "https://api.useroot.com/api/subaccounts/move"

	payload := strings.NewReader("{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"auto_approve\": false\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 without auto-approve
require 'uri'
require 'net/http'

url = URI("https://api.useroot.com/api/subaccounts/move")

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  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"auto_approve\": false\n}"

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

```java Move without auto-approve
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.useroot.com/api/subaccounts/move")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"auto_approve\": false\n}")
  .asString();
```

```php Move without auto-approve
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.useroot.com/api/subaccounts/move', [
  'body' => '{
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "auto_approve": false
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Move without auto-approve
using RestSharp;

var client = new RestClient("https://api.useroot.com/api/subaccounts/move");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"auto_approve\": false\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Move without auto-approve
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "auto_approve": false
] as [String : Any]

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

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

### Auto-approved move (default)



**Request**

```json
{
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "client_metadata": {
    "reference_id": "move_2024_01_15_001",
    "source": "web_portal"
  }
}
```

**Response**

```json
{
  "data": {
    "id": "move_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
    "amount_in_cents": 5000,
    "amount_in_minor_units": 5000,
    "status": "settled",
    "status_recorded_at": "2024-01-15T10:30:00Z",
    "client_metadata": {
      "reference_id": "move_2024_01_15_001",
      "source": "web_portal"
    },
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
```

**SDK Code**

```python Auto-approved move (default)
import requests

url = "https://api.useroot.com/api/subaccounts/move"

payload = {
    "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
    "amount_in_minor_units": 5000,
    "client_metadata": {
        "reference_id": "move_2024_01_15_001",
        "source": "web_portal"
    }
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Auto-approved move (default)
const url = 'https://api.useroot.com/api/subaccounts/move';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"from_subaccount_id":"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890","to_subaccount_id":"sub_b2c3d4e5-f678-90ab-cdef-123456789012","amount_in_minor_units":5000,"client_metadata":{"reference_id":"move_2024_01_15_001","source":"web_portal"}}'
};

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

```go Auto-approved move (default)
package main

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

func main() {

	url := "https://api.useroot.com/api/subaccounts/move"

	payload := strings.NewReader("{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_001\",\n    \"source\": \"web_portal\"\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 Auto-approved move (default)
require 'uri'
require 'net/http'

url = URI("https://api.useroot.com/api/subaccounts/move")

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  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_001\",\n    \"source\": \"web_portal\"\n  }\n}"

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

```java Auto-approved move (default)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.useroot.com/api/subaccounts/move")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_001\",\n    \"source\": \"web_portal\"\n  }\n}")
  .asString();
```

```php Auto-approved move (default)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.useroot.com/api/subaccounts/move', [
  'body' => '{
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "client_metadata": {
    "reference_id": "move_2024_01_15_001",
    "source": "web_portal"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Auto-approved move (default)
using RestSharp;

var client = new RestClient("https://api.useroot.com/api/subaccounts/move");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_001\",\n    \"source\": \"web_portal\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Auto-approved move (default)
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "client_metadata": [
    "reference_id": "move_2024_01_15_001",
    "source": "web_portal"
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.useroot.com/api/subaccounts/move")! 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 without auto-approve



**Request**

```json
{
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "auto_approve": false
}
```

**Response**

```json
{
  "data": {
    "id": "move_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
    "amount_in_cents": 5000,
    "amount_in_minor_units": 5000,
    "status": "created",
    "status_recorded_at": "2024-01-15T10:30:00Z",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
```

**SDK Code**

```python Move without auto-approve
import requests

url = "https://api.useroot.com/api/subaccounts/move"

payload = {
    "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
    "amount_in_minor_units": 5000,
    "auto_approve": False
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Move without auto-approve
const url = 'https://api.useroot.com/api/subaccounts/move';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"from_subaccount_id":"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890","to_subaccount_id":"sub_b2c3d4e5-f678-90ab-cdef-123456789012","amount_in_minor_units":5000,"auto_approve":false}'
};

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

```go Move without auto-approve
package main

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

func main() {

	url := "https://api.useroot.com/api/subaccounts/move"

	payload := strings.NewReader("{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"auto_approve\": false\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 without auto-approve
require 'uri'
require 'net/http'

url = URI("https://api.useroot.com/api/subaccounts/move")

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  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"auto_approve\": false\n}"

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

```java Move without auto-approve
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.useroot.com/api/subaccounts/move")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"auto_approve\": false\n}")
  .asString();
```

```php Move without auto-approve
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.useroot.com/api/subaccounts/move', [
  'body' => '{
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "auto_approve": false
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Move without auto-approve
using RestSharp;

var client = new RestClient("https://api.useroot.com/api/subaccounts/move");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"auto_approve\": false\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Move without auto-approve
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "auto_approve": false
] as [String : Any]

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

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

### Auto-approved move (default)



**Request**

```json
{
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "client_metadata": {
    "reference_id": "move_2024_01_15_001",
    "source": "web_portal"
  }
}
```

**Response**

```json
{
  "data": {
    "id": "move_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
    "amount_in_cents": 5000,
    "amount_in_minor_units": 5000,
    "status": "settled",
    "status_recorded_at": "2024-01-15T10:30:00Z",
    "client_metadata": {
      "reference_id": "move_2024_01_15_001",
      "source": "web_portal"
    },
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
```

**SDK Code**

```python Auto-approved move (default)
import requests

url = "https://api.useroot.com/api/subaccounts/move"

payload = {
    "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
    "amount_in_minor_units": 5000,
    "client_metadata": {
        "reference_id": "move_2024_01_15_001",
        "source": "web_portal"
    }
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Auto-approved move (default)
const url = 'https://api.useroot.com/api/subaccounts/move';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"from_subaccount_id":"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890","to_subaccount_id":"sub_b2c3d4e5-f678-90ab-cdef-123456789012","amount_in_minor_units":5000,"client_metadata":{"reference_id":"move_2024_01_15_001","source":"web_portal"}}'
};

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

```go Auto-approved move (default)
package main

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

func main() {

	url := "https://api.useroot.com/api/subaccounts/move"

	payload := strings.NewReader("{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_001\",\n    \"source\": \"web_portal\"\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 Auto-approved move (default)
require 'uri'
require 'net/http'

url = URI("https://api.useroot.com/api/subaccounts/move")

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  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_001\",\n    \"source\": \"web_portal\"\n  }\n}"

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

```java Auto-approved move (default)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.useroot.com/api/subaccounts/move")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_001\",\n    \"source\": \"web_portal\"\n  }\n}")
  .asString();
```

```php Auto-approved move (default)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.useroot.com/api/subaccounts/move', [
  'body' => '{
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "client_metadata": {
    "reference_id": "move_2024_01_15_001",
    "source": "web_portal"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Auto-approved move (default)
using RestSharp;

var client = new RestClient("https://api.useroot.com/api/subaccounts/move");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_001\",\n    \"source\": \"web_portal\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Auto-approved move (default)
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "client_metadata": [
    "reference_id": "move_2024_01_15_001",
    "source": "web_portal"
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.useroot.com/api/subaccounts/move")! 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 without auto-approve



**Request**

```json
{
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "auto_approve": false
}
```

**Response**

```json
{
  "data": {
    "id": "move_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
    "amount_in_cents": 5000,
    "amount_in_minor_units": 5000,
    "status": "created",
    "status_recorded_at": "2024-01-15T10:30:00Z",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
```

**SDK Code**

```python Move without auto-approve
import requests

url = "https://api.useroot.com/api/subaccounts/move"

payload = {
    "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
    "amount_in_minor_units": 5000,
    "auto_approve": False
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Move without auto-approve
const url = 'https://api.useroot.com/api/subaccounts/move';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"from_subaccount_id":"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890","to_subaccount_id":"sub_b2c3d4e5-f678-90ab-cdef-123456789012","amount_in_minor_units":5000,"auto_approve":false}'
};

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

```go Move without auto-approve
package main

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

func main() {

	url := "https://api.useroot.com/api/subaccounts/move"

	payload := strings.NewReader("{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"auto_approve\": false\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 without auto-approve
require 'uri'
require 'net/http'

url = URI("https://api.useroot.com/api/subaccounts/move")

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  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"auto_approve\": false\n}"

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

```java Move without auto-approve
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.useroot.com/api/subaccounts/move")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"auto_approve\": false\n}")
  .asString();
```

```php Move without auto-approve
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.useroot.com/api/subaccounts/move', [
  'body' => '{
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "auto_approve": false
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Move without auto-approve
using RestSharp;

var client = new RestClient("https://api.useroot.com/api/subaccounts/move");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 5000,\n  \"auto_approve\": false\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Move without auto-approve
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 5000,
  "auto_approve": false
] as [String : Any]

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

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

### Small amount transfer



**Request**

```json
{
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 100,
  "client_metadata": {
    "reference_id": "move_2024_01_15_002",
    "source": "api"
  }
}
```

**Response**

```json
{
  "data": {
    "id": "move_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
    "amount_in_cents": 5000,
    "amount_in_minor_units": 5000,
    "status": "settled",
    "status_recorded_at": "2024-01-15T10:30:00Z",
    "client_metadata": {
      "reference_id": "move_2024_01_15_001",
      "source": "web_portal"
    },
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
```

**SDK Code**

```python Small amount transfer
import requests

url = "https://api.useroot.com/api/subaccounts/move"

payload = {
    "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
    "amount_in_minor_units": 100,
    "client_metadata": {
        "reference_id": "move_2024_01_15_002",
        "source": "api"
    }
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Small amount transfer
const url = 'https://api.useroot.com/api/subaccounts/move';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"from_subaccount_id":"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890","to_subaccount_id":"sub_b2c3d4e5-f678-90ab-cdef-123456789012","amount_in_minor_units":100,"client_metadata":{"reference_id":"move_2024_01_15_002","source":"api"}}'
};

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

```go Small amount transfer
package main

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

func main() {

	url := "https://api.useroot.com/api/subaccounts/move"

	payload := strings.NewReader("{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 100,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_002\",\n    \"source\": \"api\"\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 Small amount transfer
require 'uri'
require 'net/http'

url = URI("https://api.useroot.com/api/subaccounts/move")

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  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 100,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_002\",\n    \"source\": \"api\"\n  }\n}"

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

```java Small amount transfer
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.useroot.com/api/subaccounts/move")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 100,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_002\",\n    \"source\": \"api\"\n  }\n}")
  .asString();
```

```php Small amount transfer
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.useroot.com/api/subaccounts/move', [
  'body' => '{
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 100,
  "client_metadata": {
    "reference_id": "move_2024_01_15_002",
    "source": "api"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Small amount transfer
using RestSharp;

var client = new RestClient("https://api.useroot.com/api/subaccounts/move");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 100,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_002\",\n    \"source\": \"api\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Small amount transfer
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 100,
  "client_metadata": [
    "reference_id": "move_2024_01_15_002",
    "source": "api"
  ]
] as [String : Any]

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

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

### Large amount transfer



**Request**

```json
{
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 100000,
  "client_metadata": {
    "reference_id": "move_2024_01_15_003",
    "source": "api"
  }
}
```

**Response**

```json
{
  "data": {
    "id": "move_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
    "amount_in_cents": 5000,
    "amount_in_minor_units": 5000,
    "status": "settled",
    "status_recorded_at": "2024-01-15T10:30:00Z",
    "client_metadata": {
      "reference_id": "move_2024_01_15_001",
      "source": "web_portal"
    },
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
```

**SDK Code**

```python Large amount transfer
import requests

url = "https://api.useroot.com/api/subaccounts/move"

payload = {
    "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
    "amount_in_minor_units": 100000,
    "client_metadata": {
        "reference_id": "move_2024_01_15_003",
        "source": "api"
    }
}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Large amount transfer
const url = 'https://api.useroot.com/api/subaccounts/move';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"from_subaccount_id":"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890","to_subaccount_id":"sub_b2c3d4e5-f678-90ab-cdef-123456789012","amount_in_minor_units":100000,"client_metadata":{"reference_id":"move_2024_01_15_003","source":"api"}}'
};

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

```go Large amount transfer
package main

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

func main() {

	url := "https://api.useroot.com/api/subaccounts/move"

	payload := strings.NewReader("{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 100000,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_003\",\n    \"source\": \"api\"\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 Large amount transfer
require 'uri'
require 'net/http'

url = URI("https://api.useroot.com/api/subaccounts/move")

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  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 100000,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_003\",\n    \"source\": \"api\"\n  }\n}"

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

```java Large amount transfer
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.useroot.com/api/subaccounts/move")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 100000,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_003\",\n    \"source\": \"api\"\n  }\n}")
  .asString();
```

```php Large amount transfer
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.useroot.com/api/subaccounts/move', [
  'body' => '{
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 100000,
  "client_metadata": {
    "reference_id": "move_2024_01_15_003",
    "source": "api"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Large amount transfer
using RestSharp;

var client = new RestClient("https://api.useroot.com/api/subaccounts/move");
var request = new RestRequest(Method.POST);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"from_subaccount_id\": \"sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890\",\n  \"to_subaccount_id\": \"sub_b2c3d4e5-f678-90ab-cdef-123456789012\",\n  \"amount_in_minor_units\": 100000,\n  \"client_metadata\": {\n    \"reference_id\": \"move_2024_01_15_003\",\n    \"source\": \"api\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Large amount transfer
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "from_subaccount_id": "sub_a1b2c3d4-e5f6-7890-abcd-ef1234567890",
  "to_subaccount_id": "sub_b2c3d4e5-f678-90ab-cdef-123456789012",
  "amount_in_minor_units": 100000,
  "client_metadata": [
    "reference_id": "move_2024_01_15_003",
    "source": "api"
  ]
] as [String : Any]

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

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