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

# Get available VRNs

GET https://api.useroot.com/api/subaccounts/available-vrns

Returns a list of JPM Virtual Routing Numbers (VRNs) that are currently available for subaccount assignment.

This endpoint is specifically for JPM bank configurations. It helps you identify which VRN account numbers from your configured pool are unassigned and ready to be used when creating new subaccounts.

**Use Cases**
- Check capacity before creating multiple subaccounts
- Identify specific VRNs for integration with payment processors
- Audit current VRN usage across your subaccounts

**Response Body**

| Field | Type | Description |
|-------|------|-------------|
| `data` | Array | Array of available VRN objects |
| `data[].account_number` | String | VRN account number available for assignment |

**Notes**

- Only available for entities with JPM bank configurations
- Returns an empty array if all VRNs are currently assigned
- VRN availability is checked in real-time against existing subaccounts
- No pagination needed - typical VRN pool sizes are small (10-50 VRNs)
- VRN availability can change between calling this endpoint and creating a subaccount if another client creates one

Reference: https://docs.useroot.com/api-reference/subaccounts-api/get-available-vrns

## 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/available-vrns:
    get:
      operationId: get-available-vrns
      summary: Get available VRNs
      description: >-
        Returns a list of JPM Virtual Routing Numbers (VRNs) that are currently
        available for subaccount assignment.


        This endpoint is specifically for JPM bank configurations. It helps you
        identify which VRN account numbers from your configured pool are
        unassigned and ready to be used when creating new subaccounts.


        **Use Cases**

        - Check capacity before creating multiple subaccounts

        - Identify specific VRNs for integration with payment processors

        - Audit current VRN usage across your subaccounts


        **Response Body**


        | Field | Type | Description |

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

        | `data` | Array | Array of available VRN objects |

        | `data[].account_number` | String | VRN account number available for
        assignment |


        **Notes**


        - Only available for entities with JPM bank configurations

        - Returns an empty array if all VRNs are currently assigned

        - VRN availability is checked in real-time against existing subaccounts

        - No pagination needed - typical VRN pool sizes are small (10-50 VRNs)

        - VRN availability can change between calling this endpoint and creating
        a subaccount if another client creates one
      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
      responses:
        '200':
          description: Available VRNs retrieved successfully
          content:
            application/json:
              schema:
                description: Any type
servers:
  - url: https://api.useroot.com
    description: Production
components:
  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



**Response**

```json
{
  "data": [
    {
      "account_number": "20000045899488"
    },
    {
      "account_number": "20000045899489"
    }
  ]
}
```

**SDK Code**

```python Subaccounts API_getAvailableVrns_example
import requests

url = "https://api.useroot.com/api/subaccounts/available-vrns"

headers = {"x-api-key": "<apiKey>"}

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

print(response.json())
```

```javascript Subaccounts API_getAvailableVrns_example
const url = 'https://api.useroot.com/api/subaccounts/available-vrns';
const options = {method: 'GET', headers: {'x-api-key': '<apiKey>'}};

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

```go Subaccounts API_getAvailableVrns_example
package main

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

func main() {

	url := "https://api.useroot.com/api/subaccounts/available-vrns"

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

	req.Header.Add("x-api-key", "<apiKey>")

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

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

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

}
```

```ruby Subaccounts API_getAvailableVrns_example
require 'uri'
require 'net/http'

url = URI("https://api.useroot.com/api/subaccounts/available-vrns")

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

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'

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

```java Subaccounts API_getAvailableVrns_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.useroot.com/api/subaccounts/available-vrns")
  .header("x-api-key", "<apiKey>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.useroot.com/api/subaccounts/available-vrns', [
  'headers' => [
    'x-api-key' => '<apiKey>',
  ],
]);

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

```csharp Subaccounts API_getAvailableVrns_example
using RestSharp;

var client = new RestClient("https://api.useroot.com/api/subaccounts/available-vrns");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
IRestResponse response = client.Execute(request);
```

```swift Subaccounts API_getAvailableVrns_example
import Foundation

let headers = ["x-api-key": "<apiKey>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.useroot.com/api/subaccounts/available-vrns")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
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()
```