> ## Documentation Index
> Fetch the complete documentation index at: https://docs.blnkfinance.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Link Identity to a Balance

> Learn how to link identities to a balance

## Overview

Blnk enables you to create and link multiple balances to a single identity within your Ledger.

Any transaction record associated with a linked balance is also automatically mapped to the corresponding identity.

***

## Link an identity to a balance

To create a balance connected to an identity, include the `identity_id` of the identity you want to associate with the balance in the request body of the **create-balance** endpoint as shown below:

```bash cURL theme={"system"}
curl -X POST "http://localhost:5001/balances" \
  -H "X-blnk-key: <api-key>" \
  -H "Content-Type: application/json" \
  -d '{
    "ledger_id": "ldg_073f7ffe-9dfd-42ce-aa50-d1dca1788adc",
    "identity_id": "idt_0501db5c-baf9-4be1-a931-f4bae7f3a41d",
    "currency": "USD"
  }'
```

```json Response {11} theme={"system"}
{
    "balance": 0,
    "version": 0,
    "inflight_balance": 0,
    "credit_balance": 0,
    "inflight_credit_balance": 0,
    "debit_balance": 0,
    "inflight_debit_balance": 0,
    "precision": 0,
    "ledger_id": "ldg_073f7ffe-9dfd-42ce-aa50-d1dca1788adc",
    "identity_id": "idt_0501db5c-baf9-4be1-a931-f4bae7f3a41d",
    "balance_id": "bln_e39a239a-a6ca-4509-b0d9-29dcc5630f8a",
    "indicator": "",
    "currency": "USD",
    "created_at": "2024-07-05T08:13:18.882616461Z",
    "meta_data": {
        "customer_internal_id": "1234",
        "customer_name": "Jerry"
    }
}
```

***

## Update a balance's identity

You can update the identity associated with an existing balance using the [**Update Balance Identity**](/reference/update-balance-identity) endpoint:

<CodeGroup>
  ```bash cURL theme={"system"}
  curl -X PUT "http://localhost:5001/balances/{id}/identity" \
    -H "X-blnk-key: <api-key>" \
    -H "Content-Type: application/json" \
    -d '{
      "identity_id": "idt_3b63c8da-af29-4cc3-ad38-df17d87456e6"
    }'
  ```

  ```javascript TypeScript theme={"system"}
  const updatedBalance = await LedgerBalances.updateIdentity(balanceId, {
      identity_id: "idt_3b63c8da-af29-4cc3-ad38-df17d87456e6"
  });
  console.log("Balance Identity Updated:", updatedBalance);
  ```

  ```bash Blnk CLI theme={"system"}
  blnk balances update-identity
  ```
</CodeGroup>

<Tip>
  You can link a balance to a different identity. The identity must exist in your system before you can associate it with a balance. This provides flexibility in managing customer data relationships.
</Tip>

***

## Need help?

We are very happy to help you make the most of Blnk, regardless of whether it is your first time or you are switching from another tool.

To ask questions or discuss issues, please [contact us](mailto:support@blnkfinance.com) or [join our Discord community](https://discord.gg/7WNv94zPpx).

***

<Tip>
  **Tip:** Connect to Blnk Cloud to see your Core data.

  You can view your transactions, manage identities, create custom reports, invite other team members to collaborate, and perform operations on your Core — all in one dashboard.

  [Check out Blnk Cloud →](https://www.blnkfinance.com/products/cloud)
</Tip>
