Open account

POST
/accounts

Opens a banking account for an organization. Requires accounts:write in that organization.

Set type to banking. When the new account is configured for Reward Card use, you must provide a cardholderId belonging to the same organization. The returned account has type banking and can have associated Reward Cards. To issue a Reward Card for the new account, use the Cards API.

Returns the account’s details and balances. Its status is active when opening is complete or pending while opening is in progress.

Include an idempotencyKey with every request. To retry the same operation, use the same API key, idempotency key, and request body. After a successful opening, a retry returns the existing account’s current state. Reusing the key with different request data returns 409.

Headers

flex-version

string

pattern ^\d{4}-\d{2}-\d{2}$

Request body

Details of the banking account to open.

organizationId

string (uuid)

required

ID of the organization the account will belong to. Your API key must have accounts:write in this organization.

type

string

required

Type of account to open. Only banking is supported.

banking
name

string

Display name for the account, between 1 and 100 characters. Flex assigns a default name if omitted.

min length 1

max length 100

cardholderId

string (uuid)

ID of a person in the organization, returned by GET /persons. Required when opening an account configured for Reward Card use. Providing this ID does not automatically request a card for that person.

idempotencyKey

string

required

Unique value identifying this account-opening request, between 1 and 255 characters. Reuse it when retrying the same request. Use a new value to open another account.

min length 1

max length 255

Responses

201

Account opened successfully, or an existing account returned after an idempotent retry.

application/json

A financial account held by an organization with Flex.

id

string (uuid)

required

Unique identifier for the account. Use this ID when retrieving, updating, or closing the account.

organizationId

string (uuid)

required

ID of the organization the account belongs to.

type

string

required

Account category: banking for deposit accounts (including Reward Card deposits), credit for credit accounts, crypto for cryptocurrency accounts (including stablecoins), or investment.

bankingcreditcryptoinvestment
status

string

required

Account status: active means open; pending means opening is incomplete; inactive means frozen; closed means closed.

activeclosedinactivepending
name

string

required

Display name of the account. May be empty if no name has been set.

currency

string

Currency code or token symbol for the account, such as USD, USDC, or USDT.

accountNumberLast4

string

Last four digits of the bank account number. Present for banking accounts when available.

routingNumber

string

Bank routing number. Present for banking accounts when available.

accountNumber

string

Full bank account number. Present for banking accounts when available and permitted by your key’s account access.

balances

AccountBalances

required

Account balances, grouped by balance type.

available

AccountBalanceEntry

required

Amount available to spend or withdraw. For investment accounts, this is withdrawable cash rather than the account’s total value.

amount

AccountAmount

Balance amount, including currency and scale. Present when the balance is available; otherwise, unavailable is returned.

amount

integer (int64)

required

Integer monetary value. Divide by 10^scale to obtain the value in the specified currency. For example, 125000 with scale 2 represents 1250.00.

scale

integer

required

Number of decimal places represented by amount. For example, 2 means the amount is expressed in hundredths.

currency

string

required

Currency code or token symbol, such as USD, USDC, or USDT.

asOf

string (date-time)

Date and time the balance was last confirmed.

unavailable

object

Details explaining why the balance could not be retrieved or calculated. An unavailable balance must not be treated as zero.

reason

string

required

balance_source_unresolved means required balance data or its confirmation timestamp is missing.

balance_source_unresolved
retryable

boolean

required

Whether a later request may resolve the balance. true does not guarantee the next request will succeed; false means retrying alone is not expected to resolve it.

pending

AccountBalanceEntry

Funds awaiting settlement. Returned for banking and investment accounts.

amount

AccountAmount

Balance amount, including currency and scale. Present when the balance is available; otherwise, unavailable is returned.

amount

integer (int64)

required

Integer monetary value. Divide by 10^scale to obtain the value in the specified currency. For example, 125000 with scale 2 represents 1250.00.

scale

integer

required

Number of decimal places represented by amount. For example, 2 means the amount is expressed in hundredths.

currency

string

required

Currency code or token symbol, such as USD, USDC, or USDT.

asOf

string (date-time)

Date and time the balance was last confirmed.

unavailable

object

Details explaining why the balance could not be retrieved or calculated. An unavailable balance must not be treated as zero.

reason

string

required

balance_source_unresolved means required balance data or its confirmation timestamp is missing.

balance_source_unresolved
retryable

boolean

required

Whether a later request may resolve the balance. true does not guarantee the next request will succeed; false means retrying alone is not expected to resolve it.

hold

AccountBalanceEntry

Funds reserved and unavailable to spend or withdraw.

amount

AccountAmount

Balance amount, including currency and scale. Present when the balance is available; otherwise, unavailable is returned.

amount

integer (int64)

required

Integer monetary value. Divide by 10^scale to obtain the value in the specified currency. For example, 125000 with scale 2 represents 1250.00.

scale

integer

required

Number of decimal places represented by amount. For example, 2 means the amount is expressed in hundredths.

currency

string

required

Currency code or token symbol, such as USD, USDC, or USDT.

asOf

string (date-time)

Date and time the balance was last confirmed.

unavailable

object

Details explaining why the balance could not be retrieved or calculated. An unavailable balance must not be treated as zero.

reason

string

required

balance_source_unresolved means required balance data or its confirmation timestamp is missing.

balance_source_unresolved
retryable

boolean

required

Whether a later request may resolve the balance. true does not guarantee the next request will succeed; false means retrying alone is not expected to resolve it.

createdAt

string (date-time)

required

Date and time the account was created.

lastModifiedAt

string (date-time)

required

Date and time the account record was last updated. Balance confirmation times are reported separately in asOf.

400

The request is invalid, required cardholder information is missing or invalid, or the organization is not eligible to open the account.

application/json

Details of a failed request.

statusCode

integer

required

HTTP status code for the error.

message

string

required

Summary of the error.

errors

map of string

Additional details about invalid fields or the reason the request failed.

flexErrorCode

string

Machine-readable error code, when provided.

403

Your API key does not have accounts:write in the requested organization.

application/json

Details of a failed request.

statusCode

integer

required

HTTP status code for the error.

message

string

required

Summary of the error.

errors

map of string

Additional details about invalid fields or the reason the request failed.

flexErrorCode

string

Machine-readable error code, when provided.

409

The idempotency key was used with different request data, or a request with the same key is still running.

application/json

Details of a failed request.

statusCode

integer

required

HTTP status code for the error.

message

string

required

Summary of the error.

errors

map of string

Additional details about invalid fields or the reason the request failed.

flexErrorCode

string

Machine-readable error code, when provided.

429

Rate limit exceeded. The Retry-After response header specifies how many seconds to wait before retrying.

Request template

curl -X POST 'https://api.flex.one/accounts' \
  -H "Authorization: Bearer $FLEX_API_KEY" \
  -H 'flex-version: 2026-10-23' \
  -H 'Content-Type: application/json' \
  -d '{
  "organizationId": "3f8bbfa2-9257-4a7e-86d3-df1797b8e143",
  "type": "banking",
  "name": "Travel expenses",
  "cardholderId": "2e83707a-2828-4424-9e8d-e940462dc918",
  "idempotencyKey": "95ecb042-9675-40f3-b856-af844e86e161"
}'

Response 201

{
  "id": "470195c7-4cf3-4df3-9f92-80848be0a3ad",
  "organizationId": "3f8bbfa2-9257-4a7e-86d3-df1797b8e143",
  "type": "banking",
  "status": "active",
  "name": "Travel expenses",
  "currency": "USD",
  "accountNumberLast4": "6789",
  "balances": {
    "available": {
      "amount": {
        "amount": 0,
        "scale": 2,
        "currency": "USD"
      },
      "asOf": "2026-11-15T14:30:00Z"
    },
    "pending": {
      "amount": {
        "amount": 0,
        "scale": 2,
        "currency": "USD"
      },
      "asOf": "2026-11-15T14:30:00Z"
    },
    "hold": {
      "amount": {
        "amount": 0,
        "scale": 2,
        "currency": "USD"
      },
      "asOf": "2026-11-15T14:30:00Z"
    }
  },
  "createdAt": "2026-11-15T14:30:00Z",
  "lastModifiedAt": "2026-11-15T14:30:00Z"
}