> ## 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.

# Quick start guide

> Set up Midaz for the first time, from environment installation to creating your first ledger structure.

<Tip>
  **This guide is intended for developers** setting up Midaz for the first time. If you're looking for a business-level overview of how Midaz works, see [About Midaz](/en/midaz/about-midaz). For deployment options, see [SaaS and BYOC](/en/deployment-models).
</Tip>

Starting with Midaz is straightforward. Follow these steps to build your foundation and explore the possibilities.

## Step 1 - Set up your environment

***

To set up your Midaz environment, follow the steps in the [Installing Midaz monorepo](/en/midaz/midaz-setup) page.

* This will install Midaz Ledger.

### Authentication and authorization

Midaz does not include a built-in authentication or authorization system. This gives you the flexibility to integrate with your existing identity provider or security stack.

If you need a ready-to-use solution, you can enable **Access Manager**, an optional feature developed by Lerian. It handles both authentication and authorization, making it easier to control who can access what across your entire Lerian ecosystem — including Midaz and all other Lerian products.

<Tip>
  Access Manager supports common identity standards like OAuth2 and OIDC and integrates natively with all Lerian products. For more details, refer to the [Access Manager](/en/platform/access-manager/access-manager) guide.
</Tip>

## Step 2 - Create your Midaz structure

***

Start by creating the data structure that powers your workflows.

### Step 2.1 - Create an Organization

The first step is to create your Organization within Midaz.

* [**To create an Organization, use the Create an Organization endpoint.**](/en/reference/midaz/create-an-organization)

<Tip>
  If your organization has multiple branches, you can create various Organizations and designate a **Parent Organization**.

  For example, if Company XYZ has branches in New York and Brazil, you can create an Organization for Company XYZ and set it as the parent of XYZ New York and XYZ Brazil.
</Tip>

For a complete list of endpoints to manage your Organization, expand the section below:

<Accordion title="Managing Organizations">
  * Retrieve all Organizations using the [List Organizations](/en/reference/midaz/list-organizations) endpoint.
  * Retrieve a specific Organization with the [Retrieve an Organization](/en/reference/midaz/retrieve-an-organization)
  * Update Organization details using the [Update an Organization](/en/reference/midaz/update-an-organization) endpoint.
  * Delete an Organization in Homologation using the [Delete an Organization](/en/reference/midaz/delete-an-organization) endpoint.
    * For Organizations in Production, deletion requires contacting Lerian support for security purposes.
</Accordion>

### Step 2.2 - Create a Ledger

Each organization must have **at least** on Ledger. However, you can have multiple Ledgers within each Organization if needed.

* [**To create a Ledger, use the Create a Ledger endpoint.**](/en/reference/midaz/create-a-ledger)

For a complete list of endpoints to manage your Ledger, expand the section below:

<Accordion title="Managing Ledgers">
  * Retrieve all Ledgers using the [List Ledgers](/en/reference/midaz/list-ledgers) endpoint.
  * Retrieve a specific Ledger with the [Retrieve a Ledger](/en/reference/midaz/retrieve-a-ledger) endpoint.
  * Update Ledger details using the [Update a Ledger](/en/reference/midaz/update-a-ledger) endpoint.
  * Delete a Ledger in Homologation using the [Delete a Ledger](/en/reference/midaz/delete-a-ledger) endpoint.
    * For Ledgers in Production, deletion requires contacting Lerian support for security purposes.
</Accordion>

### Step 2.3 - Create the Assets

Your Organization can have multiple Assets. However, each Asset must be created individually, allowing for specific configurations like decimal places.

* [**To create an Asset, use the Create an Asset endpoint.**](/en/reference/midaz/create-an-asset)

<Tip>
  When you create an Asset, Midaz automatically sets up an External Account if one doesn’t already exist. This ensures seamless backing for all transactions flowing in and out of the Ledger.
</Tip>

For a complete list of endpoints to manage your Assets, expand the section below:

<Accordion title="Managing Assets">
  * Retrieve all Assets using the [List Assets](/en/reference/midaz/list-assets) endpoint.
  * Retrieve a specific Asset with the [Retrieve an Asset](/en/reference/midaz/retrieve-an-asset) endpoint.
  * Update Asset details using the [Update an Asset](/en/reference/midaz/update-an-asset) endpoint.
  * Delete an Asset with the [Delete an Asset](/en/reference/midaz/delete-an-asset) endpoint.
</Accordion>

### Step 2.4 - Create a Segment (optional)

If you want, you can use the **Segment ID** as a custom grouping label that enables clustering accounts according to user-defined policies, supporting efficient account segmentation and management.

* [**To create a Product, use the Create a Segment endpoint.**](/en/reference/midaz/create-a-segment)

For a complete list of endpoints to manage your Segment, expand the section below:

<Accordion title="Managing Segment">
  * Retrieve all Segments using the [List Segments](/en/reference/midaz/list-segments) endpoint.
  * Retrieve a specific Segment with the [Retrieve a Segment](/en/reference/midaz/retrieve-a-segment) endpoint.
  * Update Segment details using the [Update a Segment](/en/reference/midaz/update-a-segment) endpoint.
  * Delete a Segment using the [Delete a Segment](/en/reference/midaz/delete-a-segment) endpoint.
</Accordion>

### Step 2.5 - Create a Portfolio

Create a Portfolio to group your accounts of different Assets.

* [**To create a Portfolio, use the Create a Portfolio endpoint.**](/en/reference/midaz/create-a-portfolio)

For a complete list of endpoints to manage your Portfolios, expand the section below:

<Accordion title="Managing Portfolios">
  * Retrieve all Portfolios using the [List Portfolios](/en/reference/midaz/list-portfolios) endpoint.
  * Retrieve a specific Portfolio with the [Retrieve a Portfolio](/en/reference/midaz/retrieve-a-portfolio) endpoint.
  * Update Portfolio details using the [Update a Portfolio](/en/reference/midaz/update-a-portfolio) endpoint.
  * Delete a Portfolio with the [Delete a Portfolio](/en/reference/midaz/delete-a-portfolio) endpoint.
</Accordion>

### Step 2.6 - Create the Accounts

You can now add the accounts related to the Assets you want to use with the Ledger. You will have to create one account for each Asset.

* [**To create an account, use the Create an Account endpoint.**](/en/reference/midaz/create-an-account)

For a complete list of endpoints to manage your Accounts, expand the section below:

<Accordion title="Managing Accounts">
  * Retrieve all Accounts using the [List Accounts](/en/reference/midaz/list-accounts) endpoint.
  * Retrieve a specific Account with the [Retrieve an Account](/en/reference/midaz/retrieve-an-account) endpoint.
  * Update Account details using the [Update an Account](/en/reference/midaz/update-an-account) endpoint.
  * Delete an Account with the [Delete an Account](/en/reference/midaz/delete-an-account) endpoint.
</Accordion>

## Step 3 - Explore our APIs

***

Dive into the [API reference](/en/reference/introduction) to learn more about how Midaz can elevate your operations. From metadata handling to idempotency, every detail is crafted for simplicity and efficiency.

## Need help?

***

You're not alone. We’re here to support you every step of the way.

* Explore our [Documentation hub](/en/welcome-to-our-guides) for in-depth guides and resources.

* Join the [Discord community](https://discord.lerian.studio/).

* [Contact our support team](https://lerian.studio/support) for personalized assistance.
