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

# Update a client

> Updates a client by ID.

<Warning>This endpoint only works with the **Accountant API key**. More information [here](/api-keys)</Warning>


## OpenAPI

````yaml https://api.steuerboard.com/v1/openapi patch /admin/clients/{id}
openapi: 3.1.1
info:
  version: 0.1.0
  title: Steuerboard API
servers:
  - url: https://api.steuerboard.com/v1
security:
  - bearerAuth: []
tags:
  - name: auth
    description: Authentication and identity endpoints
    x-displayName: Auth
  - name: collect
    description: Public collect session endpoints
    x-displayName: Collect
  - name: collect.sessions
    description: Collect Sessions endpoints
    x-displayName: Collect Sessions
  - name: health
    description: Service health endpoints
    x-displayName: Health
  - name: admin.clients
    description: Admin endpoints for managing clients
    x-displayName: Clients
  - name: admin.users
    description: Admin user management endpoints
    x-displayName: Admin Users
  - name: files
    description: File management endpoints
    x-displayName: Files
  - name: tasks
    description: Task management endpoints
    x-displayName: Tasks
  - name: workspaces
    description: Workspace management endpoints
    x-displayName: Workspaces
  - name: workspace.members
    description: Workspace member management endpoints
    x-displayName: Workspace Members
  - name: webhooks
    description: Webhook event payloads and contracts
    x-displayName: Webhooks
  - name: users
    description: User management endpoints
    x-displayName: Users
externalDocs:
  description: Find out more about Steuerboard API
  url: https://docs.steuerboard.com
paths:
  /admin/clients/{id}:
    patch:
      tags:
        - admin.clients
      summary: Update a client
      description: Updates a client by ID.
      operationId: updateClient
      parameters:
        - schema:
            type: string
            format: cuid
            description: The ID of the item
            example: cmf41ajzv003706un4i99q19z
          required: true
          in: path
          name: id
      requestBody:
        description: Client update
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClientUpdate'
      responses:
        '200':
          description: Client updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Client'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/auth_error'
        '403':
          description: Missing scope
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/auth_error'
                  - properties:
                      status_code:
                        type: integer
                        enum:
                          - 403
                      type:
                        type: string
                        enum:
                          - auth_error
                      code:
                        type: string
                        enum:
                          - missing_scope
                      message:
                        type: string
        '404':
          description: Client not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/not_found'
        '422':
          description: The validation error(s)
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    properties:
                      success:
                        type: boolean
                        example: false
                      error:
                        type: object
                        properties:
                          issues:
                            type: array
                            items:
                              type: object
                              properties:
                                code:
                                  type: string
                                path:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                message:
                                  type: string
                              required:
                                - code
                                - path
                          name:
                            type: string
                        required:
                          - issues
                          - name
                        example:
                          name: ValidationError
                          issues:
                            - code: invalid_type
                              path:
                                - fieldName
                              message: Expected string, received undefined
                    required:
                      - success
                      - error
                  - type: object
                    properties:
                      success:
                        type: boolean
                        example: false
                      error:
                        type: object
                        properties:
                          issues:
                            type: array
                            items:
                              type: object
                              properties:
                                code:
                                  type: string
                                path:
                                  type: array
                                  items:
                                    anyOf:
                                      - type: string
                                      - type: number
                                message:
                                  type: string
                              required:
                                - code
                                - path
                          name:
                            type: string
                        required:
                          - issues
                          - name
                        example:
                          name: ValidationError
                          issues:
                            - code: invalid_type
                              path:
                                - id
                              message: Required
                    required:
                      - success
                      - error
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/rate_limit'
        '500':
          description: Internal server error
          content: {}
components:
  schemas:
    ClientUpdate:
      type: object
      properties:
        name:
          type: string
          description: The updated name of the client
          example: Muster GmbH
        type:
          type: string
          enum:
            - natural_person
            - individual_enterprise
            - legal_person
          description: >-
            The type of the client. 'natural_person' for individuals,
            'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and
            'individual_enterprise' for sole proprietorships.
          title: ClientType
          example: legal_person
        customId:
          type:
            - string
            - 'null'
          description: The client's custom ID can be defined by the accountant
          example: ABC123
        legalName:
          type:
            - string
            - 'null'
          description: The legal name of the client
          example: Muster GmbH
        address:
          type:
            - object
            - 'null'
          properties:
            line1:
              type: string
              minLength: 1
            line2:
              type: string
            city:
              type: string
              minLength: 1
            postalCode:
              type: string
              minLength: 1
            countryCode:
              type: string
              default: DE
          required:
            - line1
            - city
            - postalCode
          description: The address of the client
          example:
            line1: Musterstraße 1
            line2: 12345 Musterstadt
            city: Musterstadt
            postalCode: '12345'
            countryCode: DE
    Client:
      type: object
      properties:
        id:
          type: string
          format: cuid
          description: The ID of the client
          example: cmf41ajzv003706un4i99q19z
        name:
          type: string
          description: The name of the client
          example: Muster GmbH
        slug:
          type: string
          description: The slug of the client
          example: muster-gmbh
        type:
          type: string
          enum:
            - natural_person
            - individual_enterprise
            - legal_person
          description: >-
            The type of the client. 'natural_person' for individuals,
            'legal_person' for companies like UG, GmbH, AG, Ltd., Inc., etc. and
            'individual_enterprise' for sole proprietorships.
          title: ClientType
          example: legal_person
        customId:
          type:
            - string
            - 'null'
          description: The client's custom ID can be defined by the accountant
          example: ABC123
        legalName:
          type:
            - string
            - 'null'
          description: The legal name of the client
          example: Muster GmbH
        archivedAt:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            The date and time the client was archived. ISO-8601 format
            (YYYY-MM-DDTHH:MM:SSZ).
          example: '2021-01-01T00:00:00Z'
        datevClientId:
          type:
            - string
            - 'null'
          description: The client's ID in DATEV
          example: ABC123
        createdAt:
          type: string
          format: date-time
          description: >-
            The date and time of the creation for the client. ISO-8601 format
            (YYYY-MM-DDTHH:MM:SSZ).
          example: '2021-01-01T00:00:00Z'
        updatedAt:
          type: string
          format: date-time
          description: >-
            The date and time of the last update for the client. ISO-8601 format
            (YYYY-MM-DDTHH:MM:SSZ).
          example: '2021-01-01T00:00:00Z'
      required:
        - id
        - name
        - slug
        - type
        - customId
        - legalName
        - archivedAt
        - datevClientId
        - createdAt
        - updatedAt
    auth_error:
      type: object
      properties:
        status_code:
          type: integer
          enum:
            - 401
        type:
          type: string
          enum:
            - auth_error
        code:
          type: string
          enum:
            - unauthorized
        message:
          type: string
      required:
        - status_code
        - type
        - code
        - message
    not_found:
      type: object
      properties:
        status_code:
          type: integer
          enum:
            - 404
        type:
          type: string
          enum:
            - not_found
        code:
          type: string
          enum:
            - not_found
        message:
          type: string
      required:
        - status_code
        - type
        - code
        - message
    rate_limit:
      type: object
      properties:
        status_code:
          type: integer
          enum:
            - 429
        type:
          type: string
          enum:
            - rate_limit
        code:
          type: string
          enum:
            - too_many_requests
        message:
          type: string
      required:
        - status_code
        - type
        - code
        - message
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Bearer token authentication

````