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

# Update account

> Updates account name and number. Adapt the account number to your chart of accounts.

<sup>Required permissions: `accounting:accounts:write`</sup>



## OpenAPI

````yaml put /accounting/accounts/{id}
openapi: 3.1.0
info:
  title: Fynn API
  description: ''
  termsOfService: https://www.fynn.eu/tos
  contact:
    name: Fynn UG (haftungsbeschränkt)
    url: https://www.fynn.eu
    email: hi@fynn.eu
  license:
    name: Proprietary
    url: https://www.fynn.eu/license
  version: 0.0.0
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Sandbox
security:
  - JWT: []
tags: []
paths:
  /accounting/accounts/{id}:
    parameters: []
    put:
      tags:
        - Accounting
      summary: Update account
      description: >-
        Updates account name and number. Adapt the account number to your chart
        of accounts.


        <sup>Required permissions: `accounting:accounts:write`</sup>
      operationId: updateAccountingAccount
      parameters:
        - name: id
          in: path
          description: AccountingAccount identifier
          required: true
          deprecated: false
          schema:
            type: string
          style: simple
          explode: false
      requestBody:
        description: The updated AccountingAccount resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountingAccount.AccountUpdate'
          text/html:
            schema:
              $ref: '#/components/schemas/AccountingAccount.AccountUpdate'
        required: true
      responses:
        '200':
          description: AccountingAccount resource updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AccountingAccount-AccountingAccountRead'
            text/html:
              schema:
                $ref: '#/components/schemas/AccountingAccount-AccountingAccountRead'
          links: {}
        '400':
          description: Invalid input
        '404':
          description: Resource not found
        '422':
          description: Unprocessable entity
      deprecated: false
      security:
        - JWT:
            - accounting:accounts:write
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X PUT \
             /accounting/accounts/{id} \
             --header "Content-Type: application/json" \
             --header "Authorization: Bearer <token>" \
             --data '{
                "name": "",
                "number": ""
            }'
components:
  schemas:
    AccountingAccount.AccountUpdate:
      type: object
      description: ''
      deprecated: false
      required:
        - name
        - number
      properties:
        name:
          description: The name of the account
          type: string
        number:
          description: The number of the account
          type: string
        isAutomaticAccount:
          description: >-
            Whether DATEV derives the tax itself (Automatikkonto). Optional;
            when omitted the current value is kept.
          type: boolean
        removeLegacyBuKey:
          description: >-
            Set to true to remove the fixed legacy Buchungsschlüssel and let
            Fynn derive the key per booking line again.
          type: boolean
    AccountingAccount-AccountingAccountRead:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          $ref: '#/components/schemas/AccountId-AccountingAccountRead'
          readOnly: true
          example: f3b3b3b3-3b3b-3b3b-3b3b-3b3b3b3b3b3b
        name:
          description: Account name used for internal labeling.
          example: Bankkonto
          type:
            - string
            - 'null'
        number:
          description: Account number from your used skr 03 or skr 04 chart of accounts.
          example: '1200'
          type: string
        type:
          readOnly: true
          description: Type of account which references to the chart of accounts.
          example: revenueGermany
          type: string
          enum:
            - bankAccount
            - ledgerAccount
            - revenueGermany
            - revenueGermanyReduced
            - salesDeductionAccount
            - revenueEurope
            - revenueTaxFree
            - bankFees
            - passiveDeferral
            - debtor
            - paypal
            - stripe
            - sepaDebit
            - goCardless
        isAutomaticAccount:
          description: >-
            Whether DATEV derives the tax itself for this account
            (Automatikkonto). Revenue lines then carry no Buchungsschlüssel,
            PRAP lines carry key 40.
          example: true
          type: boolean
        legacyBuKey:
          readOnly: true
          description: >-
            Fixed legacy Buchungsschlüssel (Altbestand) migrated from a
            dot-notation account number. Read-only; can be removed but not set
            to a new value.
          example: '40'
          type:
            - string
            - 'null'
    AccountId-AccountingAccountRead:
      type: object
      description: ''
      deprecated: false
  securitySchemes:
    JWT:
      type: http
      scheme: bearer

````