---
title: "Create account balance history config v2"
method: POST
path: "/bank-statements/v2/account-balances/history/config"
tags: ["Bank statements"]
---

# Create account balance history config v2

`POST /bank-statements/v2/account-balances/history/config`

## Request

- Base URL: `https://sandbox.pismolabs.io/passport`
- URL: `https://sandbox.pismolabs.io/passport/bank-statements/v2/account-balances/history/config`
- Auth: none declared

Create an account balance history configuration by division, organization, or program ID.

The configuration becomes effective on the day after the cycle closing time plus the cycle event delay.
Example:
  - Division timezone: `UTC`
  - Create account balance history configuration is called at: `2023-05-01T18:00:00Z`
  - Account balance history configuration `cycle_closing_time` is: `22:00:00`
  - Account balance history configuration `cycle_event_delay` is: `10`
  - Account balance history configuration starts at `2023-05-01T22:10:00Z`

This endpoint generates an [Account balance history configuration created](https://developers.pismo.io/events/docs/account-balances-balance-history-config-creation-1) event.

## Request body

- CreateAccountBalanceHistoryConfigurationRequestv2: Create account balance history configuration request object.
  - `target_type` 'ORGANIZATION' | 'PROGRAM' | 'DIVISION', required: Account balance history config target type
  - `target_id` string, required: Target ID. When `target_type` is `DIVISION`, this value is the division code. Likewise, when `target_type` is `PROGRAM`, the value is the program ID, and so on.
  - `cycle_closing_time` string, time, required: Cycle closing time indicates what time of day the cycle closes for a division, organization, or program. This time uses the timezone configured for the corresponding division, organization, or program.
  - `cycle_event_delay` integer, required: The cycle event delay specifies how many minutes after `cycle_closing_time` the account balance history event is issued for each account in the division.

## Response `201`

Created

- CreateAccountBalanceHistoryConfigurationResponseV2: Create account balance history configuration v2 response
  - `id` string, uuid: Balance history configuration ID
  - `target_type` 'ORGANIZATION' | 'PROGRAM' | 'DIVISION': The target type of the balance history configuration, based on the hierarchical level it applies to.
  - `target_id` string: Target ID (`org_id`, `program_id`, or `division_id`)
  - `cycle_closing_time` string, time: Time of day the cycle closes for a division. This time follows the timezone configured in division. You can find the division timezone using the [Get division by code](https://developers.pismo.io/pismo-docs/reference/get-division-by-code-v2) endpoint.
  - `cycle_event_delay` integer: The cycle event delay specifies how many minutes after `cycle_closing_time` the account balance history event is issued for each account in the division.
  - `cycle_config_validity` CycleConfigValidity: The start and end date/time indicating when the cycle configuration becomes valid or invalid.
    - `start` string, datetime: The date and time when the configuration becomes valid. Format = `yyyy-mm-dd:hr:mm:ss`.
    - `end` string, datetime: The date and time when the configuration ends. Format = `yyyy-mm-dd:hr:mm:ss`.

## Other responses

- `400`: Bad Request
- `404`: Not Found
- `409`: Conflict
- `500`: Internal Server Error

---

[API](https://skmtc.dev/pismo/apis/platform-authentication.md) - [All operations](https://skmtc.dev/pismo/apis/platform-authentication/llms.txt) - [OpenAPI document](https://skmtc.dev/pismo/apis/platform-authentication/revisions/935b62e16de4?raw)
