> ## Documentation Index
> Fetch the complete documentation index at: https://api-doc.fidly.be/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Bank Account

> Declare a bank account of the company.

The account is always created as a `manual` one, with no balance: the `ponto` and `coda`
accounts come from their own feed. It becomes the company's default account if asked, or
automatically when the company does not have one yet.

In sandbox mode the body is validated exactly as in live mode but nothing is stored, so
the returned `id` is not resolvable.



## OpenAPI

````yaml /openapi.json post /bank-accounts
openapi: 3.1.0
info:
  title: Fidly API
  version: 1.0.0
servers:
  - url: https://api.fidly.be
    description: Production
security: []
paths:
  /bank-accounts:
    post:
      tags:
        - bank accounts
      summary: Create Bank Account
      description: >-
        Declare a bank account of the company.


        The account is always created as a `manual` one, with no balance: the
        `ponto` and `coda`

        accounts come from their own feed. It becomes the company's default
        account if asked, or

        automatically when the company does not have one yet.


        In sandbox mode the body is validated exactly as in live mode but
        nothing is stored, so

        the returned `id` is not resolvable.
      operationId: create_bank_account_bank_accounts_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BankAccountCreate'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BankAccountOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BankAccountCreate:
      properties:
        title:
          type: string
          maxLength: 500
          minLength: 1
          title: Title
          description: Name of the account.
        reference:
          type: string
          maxLength: 100
          minLength: 1
          title: Reference
          description: >-
            The account's IBAN, validated (ISO 13616 structure and check digits)
            and stored uppercase without spaces. Must not already be used by
            another account of the company.
        bic:
          type: string
          maxLength: 11
          minLength: 1
          title: Bic
          description: BIC/SWIFT code of the institution.
        display_on_invoice:
          type: boolean
          title: Display On Invoice
          description: Whether this account is printed on the invoices the company issues.
          default: true
        default:
          type: boolean
          title: Default
          description: >-
            Makes this account the company's default, demoting the previous one.
            Forced to `true` when the company has no default account yet, so
            that it always ends up with exactly one.
          default: false
      additionalProperties: false
      type: object
      required:
        - title
        - reference
        - bic
      title: BankAccountCreate
      description: >-
        A bank account to create. The account is always created as a `manual`
        one: accounts

        of the other origins are produced by their own feed (the banking
        connection for `ponto`,

        a statement for `coda`) and cannot be declared through the API.


        `title`, `reference` and `bic` are required — a manual account exists
        precisely to be

        identified and paid into. Everything else about the account (`origin`,
        the balances,

        `currency`, the timestamps) is derived or read-only, and rejected if
        sent.
    BankAccountOut:
      properties:
        id:
          type: string
          title: Id
          description: Opaque unique identifier of the bank account.
        origin:
          type: string
          title: Origin
          description: >-
            How the account came into Fidly. One of: `ponto` (synchronised
            through the banking connection), `coda` (created from a CODA
            statement), `manual`.
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: Name of the account.
        reference:
          anyOf:
            - type: string
            - type: 'null'
          title: Reference
          description: Account reference, usually the IBAN.
        bic:
          anyOf:
            - type: string
            - type: 'null'
          title: Bic
          description: BIC/SWIFT code of the institution.
        current_balance:
          anyOf:
            - type: number
            - type: 'null'
          title: Current Balance
          description: Current balance of the account.
        available_balance:
          anyOf:
            - type: number
            - type: 'null'
          title: Available Balance
          description: Balance actually available for spending.
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
          description: ISO 4217 currency code of the balances (e.g. `EUR`).
        default:
          type: boolean
          title: Default
          description: '`true` when this is the company''s default account.'
        display_on_invoice:
          type: boolean
          title: Display On Invoice
          description: >-
            `true` when this account is printed on the invoices the company
            issues.
        created_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Created At
          description: When the account was added to Fidly (ISO 8601).
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When the account was last modified (ISO 8601).
      additionalProperties: true
      type: object
      required:
        - id
        - origin
        - title
        - reference
        - bic
        - current_balance
        - available_balance
        - currency
        - default
        - display_on_invoice
        - created_at
        - updated_at
      title: BankAccountOut
      description: >-
        A bank account of the company, identified by an opaque `id`.


        Balances are decimal numbers in the account's `currency`; they are
        `null` for accounts

        Fidly does not synchronise (a `manual` account carries no balance).
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````