Account Types in Midaz allow you to systematically classify accounts according to your organization’s financial structure needs. These classifications define the nature and purpose of accounts within your ledger design, enabling proper transaction routing and operational validation across different account categories. Account Types can be customized via the Account Types API to match your specific business requirements and financial workflows, providing the foundation for structured transaction processing while maintaining data integrity.Documentation Index
Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
Use this file to discover all available pages before exploring further.
Enabling Account Type validation
Account Type validation is enabled per-ledger through the Ledger Settings API. To activate it, send aPATCH request to the Ledger Settings endpoint:
Behavior of the type field in Accounts API
When creating an Account, the type field behavior adapts based on the activation of the Account Type Validation feature:
- Account Type Validation Disabled (Default): The
typefield is optional and accepts any free-form string. - Account Type Validation Enabled: The
typefield becomes mandatory and must match one of the Account Types previously registered via the Account Types API. If an invalid or non-registered type is submitted, the system will return a validation error.
The keyValue field
The
keyValue field identifies an Account Type and has the following constraints:- Immutable:
keyValueis set at creation time and cannot be changed afterward. The Update Account Type endpoint does not accept this field. - Unique per ledger: Each
keyValuemust be unique within a given ledger. - Used for type validation: When
validateAccountTypeis enabled in Ledger Settings, thetypefield of any Account must exactly match one of the registeredkeyValuestrings. Accounts created with an unregisteredtypevalue will be rejected.
Managing Account Types
You can manage your Account Types exclusively via API.
- Create an Account Type — Register a new Account Type for your Ledger.
- List Account Types — Retrieve all Account Types configured in your Ledger.
- Retrieve an Account Type — Get detailed information about a specific Account Type.
- Update an Account Type — Modify the definition of an existing Account Type.
- Delete an Account Type — Remove an Account Type that is no longer in use.

