---
title: "Register accounts under a customer API bank connection"
method: POST
path: "/public/v2/bank-connections/{connection_id}/accounts/"
tags: ["Bank Connections"]
---

# Register accounts under a customer API bank connection

`POST /public/v2/bank-connections/{connection_id}/accounts/`

## Request

- Base URL: `https://api.dualentry.com`
- URL: `https://api.dualentry.com/public/v2/bank-connections/{connection_id}/accounts/`
- Auth: none declared

Upsert accounts for an existing customer_api connection identified by DualEntry connection id.

**Side effects**
- If you register an account with the status `inactive`, DualEntry unlinks the GL accounts that link to it.

## Path parameters

- `connection_id` integer, required

## Headers

- `Idempotency-Key` string

## Request body

- PublicBankConnectionAccountsRegisterSchemaIn
  - `accounts` PublicBankConnectionAccountSchemaIn[], required
    - `account_id` string, required: Stable customer-supplied account key.
    - `account_name` string, required: Display name for the account.
    - `truncated_account_number` string, nullable
    - `currency_iso_4217_code` string, nullable
    - `status` 'active' | 'inactive', nullable: Optional account status. Omit to leave unchanged on upsert; defaults to active on create.

## Response `200`

OK

- PublicBankConnectionSchemaOut
  - `created_at` string, date-time, required: Date and time the record was created
  - `updated_at` string, date-time, required: Date and time the record was last updated
  - `id` integer, required
  - `connection_source_id` string, required
  - `institution_name` string, nullable
  - `bank_url` string
  - `icon_url` string
  - `status` string, required
  - `successfully_aggregated_at` string, date-time, nullable
  - `last_sync_at` string, date-time, nullable
  - `accounts` PublicBankConnectionAccountSchemaOut[]
    - `id` integer, required
    - `account_id` string, required
    - `account_name` string, required
    - `truncated_account_number` string, nullable
    - `currency_iso_4217_code` string, nullable
    - `status` string, required

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `422`: Unprocessable Content

## Changes

- **2026-10-01** `8f0a589ca348`: 1 info
  - added the new optional request property `accounts/items/status`
- **2026-09-29** `4b2d6ee0dff6`: 8 info
  - added the optional property `bank_url` to the response with the `200` status
  - added the optional property `error_code` to the response with the `400` status
  - added the optional property `error_code` to the response with the `404` status
  - added the optional property `error_code` to the response with the `422` status
  - …4 more
- **2026-08-28** `48edcb3acb74`: 2 info
  - added the required property `created_at` to the response with the `200` status
  - added the required property `updated_at` to the response with the `200` status
- **2026-08-19** `f338ec8b3f52`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/dualentry/apis/dualentry-public-api/changes/public/v2/bank-connections/:connection_id/accounts/post.md)

---

[API](https://skmtc.dev/dualentry/apis/dualentry-public-api.md) · [All operations](https://skmtc.dev/dualentry/apis/dualentry-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dualentry/apis/dualentry-public-api/revisions/7588ae19aaff?raw)
