GuidesGenerate addresses

Generate addresses

Create addresses from static segments, generate a batch by auto-incrementing the dynamic segment, and group them into a folder.

Once your Vault's schema is ready (Create a Vault), creating an address means choosing values for the static segments; the platform assigns the dynamic segment's index for you. By repeating the request, you get a batch of addresses in the same subtree. For the address model, see Addresses, folders, and access.

Prerequisites

  • A Vault with a derivation schema. See Create a Vault. The examples use acme-otc.
  • An access token (see Authentication) and, if address creation is gated, the canCreateAddress permission.
  • Any HTTP client.

Step 1. Create a single address

Send POST /api/v1/vaults/{code}/addresses with the network code (networkCode) and the static segment values (staticSegments). The dynamic segment's index is assigned automatically.

curl -X POST "[BASE_URL]/api/v1/vaults/acme-otc/addresses" \
  -H "Authorization: Bearer $V3_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "networkCode": "tron_network",
    "staticSegments": { "purpose": "invoices", "asset": "usdt" }
  }'
{
  "id": "cmr3f41z20001psp7phmyapw3",
  "address": "TQ5kohbBSdorGoDBmCGUmDL7RUvNr75mBC",
  "network": "tron",
  "derivationPath": "m/44/195/0/0/1"
}

Under the hood, the platform calculates the next free index for this combination of segments, builds the canonical path, and runs the creation through the Policy Engine (action=create_address).

The address is ready to use immediately. No activation or prefunding is needed, since Gas Station covers the fees.

Step 2. Generate a batch

There's no separate batch endpoint; you get a batch through repeated calls. Each call with the same combination of static segments gets the next free index of the dynamic segment, so N requests produce N addresses in the same subtree.

for i in $(seq 1 5); do
  curl -sS -X POST "[BASE_URL]/api/v1/vaults/acme-otc/addresses" \
    -H "Authorization: Bearer $V3_TOKEN" \
    -H "Content-Type: application/json" \
    -d '{ "networkCode": "tron_network", "staticSegments": { "purpose": "invoices", "asset": "usdt" } }'
done

Index calculation is race-safe (SQL MAX with a retry on conflict), so concurrent requests can't claim the same path.

If creation requires approval

If a policy gates address creation, POST /addresses returns 202 with an approval request id instead of an address, so handle both cases. Then:

  • check the request status: GET /api/v1/vaults/{code}/approval-requests/{id};
  • the address appears once the request reaches its threshold (APPROVED).

For more on approval requests, see Approvals.

Step 3. Find the created addresses

Check that the addresses have appeared:

curl "[BASE_URL]/api/v1/vaults/acme-otc/addresses?token=usdt" \
  -H "Authorization: Bearer $V3_TOKEN"

GET /api/v1/vaults/{code}/addresses supports the search, token, and access=shared filters.

Step 4. Group addresses into a folder (optional)

If you need to manage and share addresses together, put them in a folder: a single folder grant covers all of its addresses, including ones added later.

# create a folder
curl -X POST "[BASE_URL]/api/v1/vaults/acme-otc/address-folders" \
  -H "Authorization: Bearer $V3_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "name": "Invoices — USDT" }'

# add an address to it
curl -X POST "[BASE_URL]/api/v1/vaults/acme-otc/address-folders/FOLDER_ID/members" \
  -H "Authorization: Bearer $V3_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "addressId": "ADDRESS_ID" }'

The body field names (name, addressId) are for illustration only. Check the exact schemas for folders and their members in the API Reference.

Common mistakes

SymptomCause
networkCode not recognizedthe network isn't connected to the Vault, or the code is wrong
segment value rejectedthe static option doesn't exist in the schema or is disabled
403 on creationmissing canCreateAddress permission, or forbidden by a policy
got 202 instead of an addresscreation is gated and awaiting approval (see above)

You're done when

  • the new addresses are visible in GET /api/v1/vaults/{code}/addresses;
  • the derivationPath matches your schema (m/44/{coinType}/...);
  • (optional) the addresses are grouped into a folder.

Next steps