---
title: Open a subledger
slug: tutorials/api/accounts/open-a-subledger
description: Step-by-step creation of a subledger with POST core/v1/dda/subaccounts, linking to master account.
docTags: 
createdAt: 2024-08-08T11:35:01.141Z
---

## What you will learn

✅ How to open a subledger (also called a *subaccount*)

You can [open](docId\:K40F8Ih5SnvtbAbcEJ1MR) a subledger under any master account, such as a checking or savings account.

Subledgers also support a beneficiary profile for storing additional data such as the name and address associated with the subledger. Your Integration manager will assist you with any questions related to the data used to populate these fields, as they can vary by use case and program.

Once opened, the subledger is ready within a few seconds.

If you are new to subledgers we recommend you read the [subledger documentation](docId\:OdZF-4AInebu2YUz5GRCs) before starting this tutorial.

:::hint{type="info"}
The tutorial assumes you have a knowledge of APIs and how they work. Refer to [API basics](docId\:pUTTCwQ5SKLzxYzIn5D1b) for more details.
:::

The tutorial uses these API endpoints:

| API                           | Description                              |
| ----------------------------- | ---------------------------------------- |
| POST /core/v1/dda/subaccounts | Opens a subledger under a master account |

## Before you begin

Make sure you have:

- [API credentials](docId\:wmg-1Fqwq3bj-D3c3HFfs)&#x20;
- Master account number of the account under which you want to create the subledger
- Title for the account
- [Registered](docId\:BN5XtgkJogBe-CtwomCbS)  for the following webhook event:

| Webhook                  | Description                       |
| ------------------------ | --------------------------------- |
| `Core.SubAccount.Opened` | Subledger (subaccount) was opened |

## Open a subledger

This tutorial shows you how to open a subledger for a master account. You will open an account for **Jerry Penn**, whose master account number is **2819503463**.

### To open a subledger

:::::WorkflowBlock
::::WorkflowBlockItem
Call `POST ``/core/v1/dda/subaccounts`. For this call, the master account number and the title (name on the subledger) are required. Typically you use the partner name for the subledger title.

:::CodeblockTabs
POST /core/v1/dda/subaccounts request

```curl
curl --location 'https://sandbox.crbcos.com/core/v1/dda/subaccounts' \
--header 'Idempotency-key: 3392de17-6e92-4999-b943-cad5f19b1629' \
--data '{
  "masterAccountNumber": "2819503463",
  "title": "Jerry Penn",
  "customerId": "53c34cf0-4cd2-4768-937b-b30000dffdca",
  "beneficiary": {
    "firstName": "Jerry" ,
    "lastName": "Penn",
    "streetAddress1": "12 Main St",
    "city": "New York",
    "state": "NY",
    "postalCode": "10001",
    "countryCode": "US"
  }
}
'
```
:::
::::

::::WorkflowBlockItem
A successful API call returns a JSON response with the details of the new account.

:::CodeblockTabs
POST /core/v1/dda/subaccounts response

```json
{
    "accountNumber": "302022615264",
    "accountType": "Deposit",
    "status": "Active",
    "ledgerType": "Passthrough",
    "productType": "Checking",
    "title": "Jerry Penn",
    "currentBalance": 0,
    "availableBalance": 0,
    "holdAmount": 0,
    "transactionCount": 0,
    "creditLimit": 0,
    "currency": "usd",
    "openedAt": "2025-06-24T03:05:04.7952946-04:00",
    "masterAccountNumber": "2819503463",
    "customerId": "53c34cf0-4cd2-4768-937b-b30000dffdca",
    "beneficiary": {
        "firstName": "Jerry",
        "lastName": "Penn",
        "streetAddress1": "12 Main St",
        "city": "New York",
        "state": "NY",
        "postalCode": "10001",
        "countryCode": "US"
    },
    "partnerId": "cd9c12f4-7691-424a-b38b-af5b0134c611",
    "lastMaintenanceAt": "2025-06-24T03:05:04.7952946-04:00",
    "productId": "83bed086-8182-4151-a1e3-af5b01362783",
    "lastModifiedAt": "2025-06-24T03:05:04.8043224-04:00"
}
```
:::
::::

:::WorkflowBlockItem
The `accountNumber` field provides the account number for the new subledger.
:::

::::WorkflowBlockItem
The `Core.SubAccount.Opened` webhook event fires when the account is open.

:::CodeblockTabs
Sample webhook event

```json
{
  "id": "7dffc503-e24b-4fdd-96c3-b2e20129aa6d",
  "eventName": "Core.SubAccount.Opened",
  "status": "Pending",
  "partnerId": "cd9c12f4-7691-424a-b38b-af5b0134c611",
  "createdAt": "2025-06-24T03:05:04.8043224-04:00",
  "resources": [
    "core/v1/dda/subaccounts/302022615264"
  ],
  "details": [
    {
      "subAccountNumber": "302022615264",
      "masterAccountNumber": "2819503463",
      "accountType": "Deposit",
      "status": "Active",
      "title": "Jerry Penn",
      "clientIdentifier": null
    }
  ]
}
```
:::
::::
:::::



