---
title: "Create a data stream"
method: POST
path: "/data_streams"
---

# Create a data stream

`POST /data_streams`

## Request body

- object
  - `key` string, required — Unique immutable identifier
  - `name` string, required — Human readable name
  - `type` 'api' | 'bank_feed' — The type of data stream to create
  - `bank_account_id` string — Required when type is bank_feed. The ID of the bank account to link.

## Response `201`

Data stream created

- DataStream
  - `id` integer — Unique numeric identifier
  - `key` string, required — Unique immutable identifier
  - `name` string, required — Human readable name
  - `description` string — Optional description of the data stream
  - `type` string — The type of data stream (e.g. api, csv, stripe, bank_feed)
  - `program_id` integer, nullable
  - `records_count` integer — Record count from the ClickHouse mirror

## Other responses

- `422` — Validation error (e.g. missing required fields, duplicate key, bank_account_id not found)

---

[API](https://skmtc.net/endclose/apis/end-close-api.md) · [All operations](https://skmtc.net/endclose/apis/end-close-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/endclose/end-close-api/revisions/613ceff68dc7/schema)
