# Create account

Creates an account on the xCurrent ledger. An account stores balances and enables transfers between accounts on the ledger.

Endpoint: POST /config/accounts
Version: 4.0.0
Security: Bearer

## Request fields (application/json):

  - `name` (string, required)
    Provide the name of the account. This value must be unique within the xCurrent instance.
    Example: "conct_usd_sf"

  - `owner` (string, required)
    Provide the RippleNet address of the owner of the account.
    Example: "rn.us.ca.san_francisco"

  - `currency` (string, required)
    Provide the currency of the account. Ripple recommends using [ISO-4217](https://www.iso.org/iso-4217-currency-codes.html) currency codes, although no formal constraint is enforced.
    Example: "USD"

  - `core_ledger_ref` (string)
    Core ledger reference key. This could be a bank account number for fiat, exchange name for exchange accounts, or a ledger reference for digital accounts. This field is required for exchange accounts
    Example: "bitso"

  - `rounding_mode` (string)
    Set to determine whether calculations for this account should be rounded up or down to maintain precision.
    Enum: "HALF_UP", "HALF_DOWN", "DOWN"

  - `scale` (integer)
    Set to the number of decimal places to be used when calculating rounding for this account. The allowable range is 0-9.

  - `low_liquidity_threshold` (number)
    If the balance of a sender account meets or goes below this low_liquidity_threshold value after settlement execution, a low-liquidity message is logged at the INFO level.
    Example: 1000

  - `minimum_allowed_balance` (number)
    Set to the minimum balance allowed for the account.

  - `maximum_allowed_balance` (number)
    Set to the maximum balance allowed for the account.

  - `platform_account_id` (string)
    Platform account ID associated with this RippleNet account.

  - `external_account_id` (string)
    Used to link a customer’s account ID on their systems to their RippleNet account.

  - `account_description` (string)
    Description associated with this RippleNet account.

## Response 200 fields (application/json):

  - `name` (string, required)
    Account name and unique identifier on RippleNet.
    Example: "conct_usd_sf"

  - `balance` (number, required)
    Balance available in the account.

  - `owner` (string, required)
    RippleNet address of the owner of the account.
    Example: "rn.us.ca.san_francisco"

  - `currency` (string, required)
    Currency supported by the account.
    Example: "USD"

  - `disabled` (boolean, required)
    Indicates whether the account is disabled (true) or active (false).

  - `minimum_allowed_balance` (number, required)
    Minimum balance allowed for the account. For nostro accounts, RippleNet Server uses the greater of this value and the owner_min_allowed_balance to set the account balance minimum.
    Example: -1000000

  - `maximum_allowed_balance` (number, required)
    Maximum balance allowed for the account. For nostro accounts, RippleNet Server uses the lesser of this value and the owner_max_allowed_balance to set the account balance maximum.
    Example: 9999999999999900000

  - `core_ledger_ref` (string)
    Core ledger reference key. This could be a bank account number for fiat, exchange name for exchange accounts, or a ledger reference for digital accounts. This field is required for exchange accounts
    Example: "bitso"

  - `rounding_mode` (string, required)
    Determines whether calculations for this account are rounded up or down to maintain precision.
    Enum: "HALF_UP", "HALF_DOWN", "DOWN"

  - `scale` (integer, required)
    Number of decimal places used when calculating rounding for this account.
    Example: 2

  - `low_liquidity_threshold` (number, required)
    When the sender's account balance is less than or equal to this amount, after payment settlement execution, a low-liquidity message is logged at the INFO level.
    Example: 1000

  - `owner_min_allowed_balance` (number, required)
    Minimum balance allowed by the owner of a nostro account. RippleNet Server uses the greater of this value and the minimum_allowed_balance to set the account balance minimum.
    Example: -100000

  - `owner_max_allowed_balance` (number, required)
    Maximum balance allowed by the owner of a nostro account. RippleNet Server uses the lesser of this value and the maximum_allowed_balance to set the account balance maximum.
    Example: 72036854775

  - `platform_account_id` (string)
    Platform account ID associated with this RippleNet account.

  - `external_account_id` (string)
    Customer's account ID on their systems associated with this RippleNet account.

  - `account_description` (string)
    Description associated with this RippleNet account.

## Response 400 fields (application/json):

  - `type` (string)
    URL to the error documentation.
    Example: "https://errors.ripplenet.ripple.com/error/json-processing-error"

  - `title` (string)
    Summary of the returned problem.
    Example: "Invalid Request Object"

  - `detail` (string)
    Description of the returned problem.
    Example: "The request parameter [account_id] is not in the correct format."

  - `status` (number)
    HTTP error code.
    Example: 400

  - `ripplenet_error_code` (string)
    RippleNet specific error code.
    Example: "E0104"

  - `finality` (string)
    Specifies if the request can be retried for a successful response.
    Example: "PERMANENT"


