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

# Register a bank connection for the tenant

> A tenant can register multiple independent connections for the same bank. Currency and physical accounts are discovered by provider setup and returned as subAccounts. Demo and production connections keep separate credential modes.



## OpenAPI

````yaml /openapi/openapi.yaml post /banks/accounts
openapi: 3.1.0
info:
  title: Tahsil API
  version: 1.0.0
  description: >-
    Tahsil müşterilerinin web ve mobil uygulamalarda kullandığı tenant-scoped
    müşteri API sözleşmesi.
servers:
  - url: https://api.tahsil.dev
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Operations - Health
    description: Public liveness and dependency readiness probes.
  - name: Identity - Auth
    description: User login, refresh and logout flows for token-based access.
  - name: Banking - Accounts
    description: Bank account aggregation endpoints available to customer tenants.
  - name: Banking - Transactions
    description: Bank transaction ingestion and retrieval endpoints.
  - name: Banking - Automation
    description: Tenant transaction matching rules, assignments and historical runs.
  - name: Banking - Polling
    description: Polling schedule definitions for bank connector queries.
  - name: Banking - Dashboard
    description: Flexible tenant dashboard analytics and widget query endpoints.
  - name: Audit - Connector Logs
    description: Customer-visible bank connector request/response audit trail.
  - name: Payments - Orchestration
    description: Tenant Virtual POS, rate plan and payment intent orchestration.
paths:
  /banks/accounts:
    post:
      tags:
        - Banking - Accounts
      summary: Register a bank connection for the tenant
      description: >-
        A tenant can register multiple independent connections for the same
        bank. Currency and physical accounts are discovered by provider setup
        and returned as subAccounts. Demo and production connections keep
        separate credential modes.
      operationId: postBanksAccounts
      parameters:
        - name: x-company-id
          in: header
          required: true
          schema:
            type: string
          description: Target tenant company id for write operation.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankAccountCreate'
      responses:
        '200':
          $ref: '#/components/responses/ItemResponse'
        '402':
          $ref: '#/components/responses/StatusResponse'
        '409':
          $ref: '#/components/responses/StatusResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    BankAccountCreate:
      type: object
      required:
        - bankCode
        - title
      example:
        bankCode: akbank
        title: Ana tahsilat hesabı
        environment: production
      properties:
        bankCode:
          type: string
        title:
          type: string
        environment:
          type: string
          enum:
            - demo
            - production
          default: production
          description: >-
            Immutable connection mode. Demo connections accept only
            server-constrained demo credentials.
  responses:
    ItemResponse:
      description: Single entity response
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: boolean
              result:
                type: object
                additionalProperties: true
          example:
            status: true
            result:
              id: 64f000000000000000000001
    StatusResponse:
      description: Operation completed
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                type: boolean
          example:
            status: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

## Related topics

- [Read normalized provider connection field metadata for a bank](/api-reference/banking--accounts/read-normalized-provider-connection-field-metadata-for-a-bank.md)
- [List bank connections with provider-owned sub-accounts](/api-reference/banking--accounts/list-bank-connections-with-provider-owned-sub-accounts.md)
- [List tenant Virtual POS connections](/api-reference/payments--orchestration/list-tenant-virtual-pos-connections.md)
- [Update bank account connector](/api-reference/banking--accounts/update-bank-account-connector.md)
- [Delete a Virtual POS connection](/api-reference/payments--orchestration/delete-a-virtual-pos-connection.md)
