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

# Create a data stream



## OpenAPI

````yaml /openapi.json post /data_streams
openapi: 3.1.0
info:
  title: End Close API
  description: REST API is used to interact with the End Close platform.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.endclose.com/v1
security:
  - ApiKeyAuth: []
paths:
  /data_streams:
    post:
      summary: Create a data stream
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - key
                - name
              properties:
                key:
                  type: string
                  description: Unique immutable identifier
                name:
                  type: string
                  description: Human readable name
                type:
                  type: string
                  enum:
                    - api
                    - bank_feed
                  default: api
                  description: The type of data stream to create
                bank_account_id:
                  type: string
                  description: >-
                    Required when type is bank_feed. The ID of the bank account
                    to link.
      responses:
        '201':
          description: Data stream created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DataStream'
        '422':
          description: >-
            Validation error (e.g. missing required fields, duplicate key,
            bank_account_id not found)
components:
  schemas:
    DataStream:
      type: object
      required:
        - key
        - name
      properties:
        id:
          type: integer
          description: Unique numeric identifier
        key:
          type: string
          description: Unique immutable identifier
        name:
          type: string
          description: Human readable name
        description:
          type: string
          description: Optional description of the data stream
        type:
          type: string
          description: The type of data stream (e.g. api, csv, stripe, bank_feed)
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````