POST
/
v1
/
ledger
/
{ledger_key}
/
account
curl --request POST \
  --url https://api.sandbox.nxos.io/v1/ledger/{ledger_key}/account \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: application/json' \
  --data '{
  "account_ref": "<string>",
  "default_asset_code": "<string>",
  "enabled_assets": [
    {
      "asset_code": "<string>",
      "min_balance": 123,
      "max_balance": 123
    }
  ],
  "metadata": {}
}'
{
  "account_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "account_ref": "<string>",
  "status": "ACTIVE",
  "default_asset_code": "<string>",
  "enabled_assets": [
    {
      "asset_code": "<string>",
      "min_balance": "<string>",
      "max_balance": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z"
    }
  ],
  "metadata": {},
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Headers

Authorization
string
required

The Basic Authentication header. Format: "Basic {base64(orgID:apiKey)}"

Path Parameters

ledger_key
string
required

The key of the ledger. Examples:

  • "123e4567-e89b-12d3-a456-426614174000"
  • "id:123e4567-e89b-12d3-a456-426614174000"
  • "ref:ledger:customer_a"

Body

application/json
account_ref
string
required

The externally defined reference of the accoun. Generally speaking this reference can be in the format of your choice. We recommend either using a UUID that can be mapped internally, or a unique reference that acts like an address, such as internal:revenue:fx, or internal:exchange

Minimum length: 1
default_asset_code
string
required

The default asset for the account. A fallback asset for an account against which accounts can be reconciled

Minimum length: 1
enabled_assets
object[]

The enabled assets for the account, in addition to the default asset

metadata
object

Additional, optional, metadata for the account, such as internal references, user-mappings or other data

Response

200 - application/json
The request has succeeded.
account_id
string
required

The unique identifier of the account

account_ref
string
required

The externally defined reference of the account

Minimum length: 1
default_asset_code
string
required

The default asset for the account

Minimum length: 1
enabled_assets
object[]
required

The enabled assets for the account with asset rules such as min/max balances

created_at
string
required
updated_at
string
required
status
enum<string>

The status of the account, defaults to ACTIVE

Available options:
ACTIVE,
INACTIVE,
INACTIVE
metadata
object

Additional, optional, metadata for the account