Prerequisites
Before you begin, make sure you meet the following requirements:
- You completed the Midaz setup guide and all services run.
- At least one Organization, Ledger, and Account already exist, as created in the Midaz Getting Started guide.
- The Midaz ledger serves the holder and instrument endpoints. In Midaz v4, CRM is part of the ledger binary, so it needs no separate service or port.
Replace the placeholder IDs in the examples below with the real IDs from your environment.
CRM components
The CRM (Customer Relationship Management) component lets you register the people and companies behind your ledger accounts. It manages two core entities:
- Holders: Individuals (
NATURAL_PERSON) or companies (LEGAL_PERSON) that own accounts. - Instruments: The link between a holder and a specific ledger account, with optional banking details.
Step 1 — Create a holder
A Holder represents a person or company in your system. Create holders for individuals (
NATURAL_PERSON) or companies (LEGAL_PERSON).
Send a POST request with the holder’s type, name, document, contact, and address. For the full request and response schema, see Create a holder.
Individual holder example
Individual holder example
Company holder example
Company holder example
To register a company instead of an individual, set the type to
LEGAL_PERSON:Step 2 — Link a holder to an account
Once the holder exists, link it to a ledger account with an Instrument. An instrument connects a holder to one account inside a ledger, with optional banking details. For the full request and response schema, see Create an instrument.
Example request
Example request
Step 3 — Query and update your data
Once holders and instruments exist, you can retrieve, list, and update them.
Update holder example
Update holder example
The update changes only the fields you send. All other fields stay unchanged.
Step 4 — Clean up
To remove resources, delete instruments first, then holders.
Example requests
Example requests
Delete an instrument:Delete a holder:
Summary
In this guide, you:
- Created a Holder to register an individual or company in CRM.
- Created an Instrument to link the holder to a ledger account.
- Queried and updated CRM data.
- Removed instruments and holders when no longer needed.
Next steps
CRM API reference
Explore advanced filtering, metadata queries, and all available endpoints.
Using CRM with Midaz Console
Manage holders through a graphical interface.

