Enabling Account Type validation
In case you want to activate account type validation to a specific ledger, you must configure it in the Onboarding service. This means updating the variable in the.env file of Midaz Onboarding service where you want to use type validation.
Your configuration should look like this:
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.
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.

