Update account
/accounts/{accountId}Updates an account’s display name. Requires accounts:write in the
organization the account belongs to.
Provide the new name and an idempotencyKey. The display name is the
only field this endpoint updates.
Returns the account’s updated details and balances.
To retry the same operation, use the same API key, idempotency key,
account ID, and request body. After a successful update, a retry returns
the account’s current state without applying the update again. Reusing
the key with a different account ID or name returns 409.
Path parameters
accountIdstring (uuid)
ID of the account to update, returned by GET /accounts or POST /accounts.
Headers
flex-versionstring
pattern ^\d{4}-\d{2}-\d{2}$
Request body
New display name and idempotency key for the account update. Both fields are required.
namestring
Required. New display name for the account, between 1 and 100 characters.
min length 1
max length 100
idempotencyKeystring
Unique value identifying this update request, between 1 and 255 characters. Reuse it when retrying the same update. Use a new value for a separate update.
min length 1
max length 255
Responses
Account updated successfully, or its current state returned after an idempotent retry.
application/jsonA financial account held by an organization with Flex.
idstring (uuid)
Unique identifier for the account. Use this ID when retrieving, updating, or closing the account.
organizationIdstring (uuid)
ID of the organization the account belongs to.
typestring
Account category: banking for deposit accounts (including Reward Card deposits), credit for credit accounts, crypto for cryptocurrency accounts (including stablecoins), or investment.
bankingcreditcryptoinvestmentstatusstring
Account status: active means open; pending means opening is incomplete; inactive means frozen; closed means closed.
activeclosedinactivependingnamestring
Display name of the account. May be empty if no name has been set.
currencystring
Currency code or token symbol for the account, such as USD, USDC, or USDT.
accountNumberLast4string
Last four digits of the bank account number. Present for banking accounts when available.
routingNumberstring
Bank routing number. Present for banking accounts when available.
accountNumberstring
Full bank account number. Present for banking accounts when available and permitted by your key’s account access.
balancesAccountBalances
required
balancesAccountBalances
Account balances, grouped by balance type.
availableAccountBalanceEntry
required
availableAccountBalanceEntry
Amount available to spend or withdraw. For investment accounts, this is withdrawable cash rather than the account’s total value.
amountAccountAmount
amountAccountAmount
Balance amount, including currency and scale. Present when the balance is available; otherwise, unavailable is returned.
amountinteger (int64)
Integer monetary value. Divide by 10^scale to obtain the value in the specified currency. For example, 125000 with scale 2 represents 1250.00.
scaleinteger
Number of decimal places represented by amount. For example, 2 means the amount is expressed in hundredths.
currencystring
Currency code or token symbol, such as USD, USDC, or USDT.
asOfstring (date-time)
Date and time the balance was last confirmed.
unavailableobject
unavailableobject
Details explaining why the balance could not be retrieved or calculated. An unavailable balance must not be treated as zero.
reasonstring
balance_source_unresolved means required balance data or its confirmation timestamp is missing.
balance_source_unresolvedretryableboolean
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.
pendingAccountBalanceEntry
pendingAccountBalanceEntry
Funds awaiting settlement. Returned for banking and investment accounts.
amountAccountAmount
amountAccountAmount
Balance amount, including currency and scale. Present when the balance is available; otherwise, unavailable is returned.
amountinteger (int64)
Integer monetary value. Divide by 10^scale to obtain the value in the specified currency. For example, 125000 with scale 2 represents 1250.00.
scaleinteger
Number of decimal places represented by amount. For example, 2 means the amount is expressed in hundredths.
currencystring
Currency code or token symbol, such as USD, USDC, or USDT.
asOfstring (date-time)
Date and time the balance was last confirmed.
unavailableobject
unavailableobject
Details explaining why the balance could not be retrieved or calculated. An unavailable balance must not be treated as zero.
reasonstring
balance_source_unresolved means required balance data or its confirmation timestamp is missing.
balance_source_unresolvedretryableboolean
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.
holdAccountBalanceEntry
holdAccountBalanceEntry
Funds reserved and unavailable to spend or withdraw.
amountAccountAmount
amountAccountAmount
Balance amount, including currency and scale. Present when the balance is available; otherwise, unavailable is returned.
amountinteger (int64)
Integer monetary value. Divide by 10^scale to obtain the value in the specified currency. For example, 125000 with scale 2 represents 1250.00.
scaleinteger
Number of decimal places represented by amount. For example, 2 means the amount is expressed in hundredths.
currencystring
Currency code or token symbol, such as USD, USDC, or USDT.
asOfstring (date-time)
Date and time the balance was last confirmed.
unavailableobject
unavailableobject
Details explaining why the balance could not be retrieved or calculated. An unavailable balance must not be treated as zero.
reasonstring
balance_source_unresolved means required balance data or its confirmation timestamp is missing.
balance_source_unresolvedretryableboolean
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.
createdAtstring (date-time)
Date and time the account was created.
lastModifiedAtstring (date-time)
Date and time the account record was last updated. Balance confirmation times are reported separately in asOf.
The account ID or request body is invalid. Both name and idempotencyKey are required.
application/jsonDetails of a failed request.
statusCodeinteger
HTTP status code for the error.
messagestring
Summary of the error.
errorsmap of string
Additional details about invalid fields or the reason the request failed.
flexErrorCodestring
Machine-readable error code, when provided.
Your API key has no accounts:write permission in any organization.
application/jsonDetails of a failed request.
statusCodeinteger
HTTP status code for the error.
messagestring
Summary of the error.
errorsmap of string
Additional details about invalid fields or the reason the request failed.
flexErrorCodestring
Machine-readable error code, when provided.
No account with that ID exists in an organization your API key has permission to update.
The idempotency key was used with different request data, or a request with the same key is still running.
application/jsonDetails of a failed request.
statusCodeinteger
HTTP status code for the error.
messagestring
Summary of the error.
errorsmap of string
Additional details about invalid fields or the reason the request failed.
flexErrorCodestring
Machine-readable error code, when provided.
Rate limit exceeded. The Retry-After response header specifies how many seconds to wait before retrying.
Request template
curl -X PATCH 'https://api.flex.one/accounts/<accountId>' \
-H "Authorization: Bearer $FLEX_API_KEY" \
-H 'flex-version: 2026-10-23' \
-H 'Content-Type: application/json' \
-d '{
"name": "Travel expenses",
"idempotencyKey": "f377921b-f057-409f-8940-21c72bebd374"
}'Response 200
{
"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": 125000,
"scale": 2,
"currency": "USD"
},
"asOf": "2026-11-15T15:00:00Z"
},
"pending": {
"amount": {
"amount": 0,
"scale": 2,
"currency": "USD"
},
"asOf": "2026-11-15T15:00:00Z"
},
"hold": {
"amount": {
"amount": 2500,
"scale": 2,
"currency": "USD"
},
"asOf": "2026-11-15T15:00:00Z"
}
},
"createdAt": "2026-10-01T09:00:00Z",
"lastModifiedAt": "2026-11-15T15:00:00Z"
}