> This page is for Taurus PROTECT, version v3.50.
> For other versions, use one of these documentation indexes:
> - v3.58 (default): https://taurushq.ferndocs.com/protect-capital/v3.58/llms.txt
> - v3.56: https://taurushq.ferndocs.com/protect-capital/v3.56/llms.txt
> - v3.54: https://taurushq.ferndocs.com/protect-capital/v3.54/llms.txt
> - v3.52: https://taurushq.ferndocs.com/protect-capital/v3.52/llms.txt
> - v3.50: https://taurushq.ferndocs.com/protect-capital/v3.50/llms.txt
> - v3.48: https://taurushq.ferndocs.com/protect-capital/v3.48/llms.txt
> - v3.46: https://taurushq.ferndocs.com/protect-capital/v3.46/llms.txt
> - v3.44: https://taurushq.ferndocs.com/protect-capital/v3.44/llms.txt
> - v3.42: https://taurushq.ferndocs.com/protect-capital/v3.42/llms.txt
> - v3.40: https://taurushq.ferndocs.com/protect-capital/v3.40/llms.txt
> - v3.38: https://taurushq.ferndocs.com/protect-capital/v3.38/llms.txt

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

# Create a batch of addresses

POST https://your-protect-instance.example.com/api/rest/v1/addresses/batch
Content-Type: application/json

Required role: **AccountCreator**. 
 This endpoint creates a batch of addresses. 
 Address created from this endpoint will start with a **created** and will not be ready to use until the HSM process them. 

Reference: https://taurushq.ferndocs.com/protect-capital/reference/addresses/create-batch

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Body (application/json)

This endpoint expects a tgvalidatordCreateAddressesRequest.

- `addresses` (list of tgvalidatordCreateAddressRequest, optional)

## Response

### 200

A successful response.

- `result` (list of tgvalidatordLightAddressInfo, optional)

## Errors

### 400 Bad Request Error

Bad Request: indicates that the server cannot or will not process the request due to something that is perceived to be a client error (for example, malformed request syntax, invalid request message framing, or deceptive request routing)

- `any`

### 401 Unauthorized Error

Unauthorized: indicates that the client request has not been completed because it lacks valid authentication credentials for the requested resource

- `any`

### 403 Forbidden Error

Forbidden: indicates that the server understands the request but refuses to authorize it

- `any`

### 404 Not Found Error

Not Found: indicates that the server cannot find the requested resource

- `any`

### 500 Internal Server Error

Internal Server Error: indicates that the server encountered an unexpected condition that prevented it from fulfilling the request

- `any`

### 503 Service Unavailable Error

Service Unavailable: indicates that the server is not ready to handle the request.

- `any`

## Types

### tgvalidatordCreateAddressRequest

- `walletId` (string, required) — Unique identifier for the wallet in which the address will be created. Must be an existing wallet ID. In Protect, a wallet represents a logical collection of addresses.
- `label` (string, required) — A human-readable label for the address. Displayed as `Name` in the UI.
- `comment` (string, optional) — Optional comment for additional information about the address.
- `customerId` (string, optional) — ID of the customer that owns the address. Automatically set if address belongs to an omnibus (shared) wallet.
- `nonHardenedDerivation` (boolean, optional) — Indicates whether non-hardened derivation should be used for address creation. Default (recommended value) is false.
- `workchainId` (integer, optional) — Workchain identifier. Used for smart contracts on blockchains like TON.
- `type` (string, optional) — Address type, specific to the blockchain being used. For BTC & LTC, valid values are ``p2pkh``, ``p2sh_p2wpkh``, or ``p2wpkh``. Defaults to ``p2sh_p2wpkh`` if empty. For DOGE, value must be ``p2pkh``. Will default to ``p2pkh`` if empty. For all other blockchains, this field must be empty.
- `externalAddressId` (string, optional) — Identifier for the address in the user's system. This must be unique. Attempting to create an address with an existing externalAddressId will return the originally created address instead of creating a new one.

### tgvalidatordLightAddressInfo

- `id` (string, optional) — Unique identifier for the address.
- `walletId` (string, optional) — Unique identifier for the wallet associated with the address (parent wallet)
- `address` (string, optional) — The actual address generated for the wallet.
- `customerId` (string, optional) — Identifier for the customer associated with the address.
- `network` (string, optional) — Network associated with the address (e.g., mainnet, testnet).
- `label` (string, optional) — A user-friendly label for the address (e.g., 'Deposit Address'). Displayed as `Name` in the UI.
- `comment` (string, optional) — An optional comment associated with the address.
- `addressPath` (string, optional) — The derivation path for the address, used to generate the address from the seed.
- `status` (string, optional) — Status of address creation. Creating status is used for asynchronous address creation. Value is one of `created`, `creating, `signed`, `observed`, or `confirmed`.
- `currencyId` (string, optional) — Currency associated with the address (e.g., ETH, BTC). For a list of enabled currencies, query the [currencies endpoint](https://docs.taurushq.com/protect-capital/reference/walletservice_getcurrencies).
- `creationDate` (datetime, optional)
- `updateDate` (datetime, optional)
- `externalAddressId` (string, optional) — An optional external identifier for the address.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "result": [
    {
      "id": "string",
      "walletId": "string",
      "address": "string",
      "customerId": "string",
      "network": "string",
      "label": "string",
      "comment": "string",
      "addressPath": "string",
      "status": "string",
      "currencyId": "string",
      "creationDate": "2024-01-15T09:30:00Z",
      "updateDate": "2024-01-15T09:30:00Z",
      "externalAddressId": "string"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://your-protect-instance.example.com/api/rest/v1/addresses/batch"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://your-protect-instance.example.com/api/rest/v1/addresses/batch';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

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

```go
package main

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

func main() {

	url := "https://your-protect-instance.example.com/api/rest/v1/addresses/batch"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	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
require 'uri'
require 'net/http'

url = URI("https://your-protect-instance.example.com/api/rest/v1/addresses/batch")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

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

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

HttpResponse<String> response = Unirest.post("https://your-protect-instance.example.com/api/rest/v1/addresses/batch")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://your-protect-instance.example.com/api/rest/v1/addresses/batch', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://your-protect-instance.example.com/api/rest/v1/addresses/batch");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://your-protect-instance.example.com/api/rest/v1/addresses/batch")! 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()
```