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

> ## Agent Instructions
> Mono is an AI platform for small and medium-sized firms in Switzerland, Germany, Austria and Italy. Answer in the reader's language. Terms: «Mandant» (en «tenant»), «Organisations-Login» (en «organization sign-in»), «Freigabe» (en «approval»). Reading needs no approval; every write waits for one. Never suggest pasting a key or token into a chat.

# «Jetzt sichern», «Jetzt testen», «Wiederherstellen» auf einen Stand und «Rückgängig»; eigene Ziele einrichten, testen, ändern, entfernen; der Schlüssel eines Ziels und der Wiederherstellungsschlüssel nur im Browser (ADR-0140 §§ 2–4, 8)

> «Jetzt sichern», «Jetzt testen», «Wiederherstellen» auf einen Stand und «Rückgängig»; eigene Ziele einrichten, testen, ändern, entfernen; der Schlüssel eines Ziels und der Wiederherstellungsschlüssel nur im Browser (ADR-0140 §§ 2–4, 8).

Im Chat mit «Mono Admin»: .



## OpenAPI

````yaml /api-reference/openapi.json post /mandanten/{id}/datensicherung
openapi: 3.1.0
info:
  title: Console-API des Node
  version: v1
  summary: Die API, mit der die Mono Console einen Node liest und ändert.
  description: >-
    Jeder Node hat diese API unter `/api/v1`. Die Mono Console, die Desktop-App
    und «Mono Admin» im Chat nutzen dieselben Regeln und dasselbe Audit.


    **Anmeldung:** Jede Anfrage trägt einen Bearer-Token, den der Node selbst
    ausstellt (OpenID Connect mit PKCE, Client `mono-console`). Ein Token gilt
    für die Person: Sie sehen und ändern nur, was diese Person darf.


    **Antworten:** JSON. Eine Ablehnung ist `{ error, message }` mit einem Satz
    auf Deutsch. Jede Änderung steht im Audit, nie ein Inhalt.


    Diese Referenz ist aus dem Code erzeugt (`pnpm docs:gen`). Eine Antwort oder
    ein Körper ohne Schema heisst: Der Code beweist die Form nicht an einer
    Stelle, die der Generator lesen kann.
servers:
  - url: https://ki.muster.example/api/v1
    description: 'Ein Node (Beispiel: Muster AG)'
  - url: http://127.0.0.1:8787/api/v1
    description: Ein Node auf diesem Gerät (`pnpm dev:gateway`)
security:
  - bearer: []
tags:
  - name: Übersicht
    x-displayName: Übersicht
    description: >-
      Wer angemeldet ist, die MCP-Server, die Einrichtung und die gemessenen
      Kennzahlen.
  - name: Inbox
    x-displayName: Inbox
    description: >-
      Freigaben, «Immer erlauben» und die Aufgaben auf den Geräten des
      Mandanten.
  - name: Studio
    x-displayName: Studio
    description: Standard-Apps, eigene Apps, Skill-Packs und die CI.
  - name: Konnektoren
    x-displayName: Konnektoren
    description: >-
      Microsoft 365 und Google Workspace, Systeme über ihre Adresse und die Mono
      Connectors.
  - name: Zugriff
    x-displayName: Zugriff
    description: >-
      Anmeldung, Gruppen und Rollen, Einladungen und die Kunden eines
      IT-Partners.
  - name: Gateway
    x-displayName: Gateway
    description: KI-Clients, Tools, Modelle, Datenwege, Kosten, Kanäle und das Audit.
  - name: Betrieb
    x-displayName: Betrieb
    description: Updates, die eigene Adresse, das Netzwerk und die Mandantennotizen.
  - name: Profil
    x-displayName: Profil
    description: 'Das eigene Konto der Person: Zustimmungen, Sprache, Foto und Passkeys.'
paths:
  /mandanten/{id}/datensicherung:
    post:
      tags:
        - Betrieb
      summary: >-
        «Jetzt sichern», «Jetzt testen», «Wiederherstellen» auf einen Stand und
        «Rückgängig»; eigene Ziele einrichten, testen, ändern, entfernen; der
        Schlüssel eines Ziels und der Wiederherstellungsschlüssel nur im Browser
        (ADR-0140 §§ 2–4, 8)
      description: >-
        «Jetzt sichern», «Jetzt testen», «Wiederherstellen» auf einen Stand und
        «Rückgängig»; eigene Ziele einrichten, testen, ändern, entfernen; der
        Schlüssel eines Ziels und der Wiederherstellungsschlüssel nur im Browser
        (ADR-0140 §§ 2–4, 8).


        Im Chat mit «Mono Admin»: .
      operationId: postMandantenByIdDatensicherung
      parameters:
        - name: id
          in: path
          required: true
          description: Der Mandant (seine ID auf diesem Node).
          schema:
            type: string
          example: muster-ag
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DatensicherungAction'
      responses:
        '200':
          description: Erfolgreich.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DatensicherungActionResponse'
        '400':
          $ref: '#/components/responses/Fehler400'
        '401':
          $ref: '#/components/responses/Fehler401'
        '403':
          $ref: '#/components/responses/Fehler403'
        '404':
          $ref: '#/components/responses/Fehler404'
components:
  schemas:
    DatensicherungAction:
      oneOf:
        - type: object
          properties:
            action:
              type: string
              const: backup_now
          required:
            - action
        - type: object
          properties:
            action:
              type: string
              const: backup_restore_test
          required:
            - action
        - type: object
          properties:
            action:
              type: string
              const: backup_restore
            point:
              type: string
              minLength: 1
              maxLength: 200
          required:
            - action
            - point
        - type: object
          properties:
            action:
              type: string
              const: backup_restore_undo
          required:
            - action
        - type: object
          properties:
            action:
              type: string
              const: backup_target_add
            address:
              type: string
              minLength: 1
              maxLength: 400
            name:
              type: string
              maxLength: 120
            share:
              type: string
              maxLength: 120
            country:
              type: string
              pattern: ^[A-Z]{2}$
          required:
            - action
            - address
        - type: object
          properties:
            action:
              type: string
              const: backup_target_key
            id:
              type: string
              maxLength: 64
            user:
              type: string
              minLength: 1
              maxLength: 200
            secret:
              type: string
              minLength: 1
              maxLength: 400
          required:
            - action
            - id
            - user
            - secret
        - type: object
          properties:
            action:
              type: string
              const: backup_target_pin
            id:
              type: string
              maxLength: 64
            fingerprint:
              type: string
              maxLength: 120
          required:
            - action
            - id
            - fingerprint
        - type: object
          properties:
            action:
              type: string
              const: backup_target_test
            id:
              type: string
              maxLength: 64
          required:
            - action
            - id
        - type: object
          properties:
            action:
              type: string
              const: backup_target_change
            id:
              type: string
              maxLength: 64
            name:
              type: string
              maxLength: 120
            country:
              type: string
              pattern: ^[A-Z]{2}$
            neverDelete:
              type: boolean
            ownKey:
              type: boolean
          required:
            - action
            - id
        - type: object
          properties:
            action:
              type: string
              const: backup_target_remove
            id:
              type: string
              maxLength: 64
          required:
            - action
            - id
        - type: object
          properties:
            action:
              type: string
              const: backup_recovery_key
            recipient:
              type: string
              pattern: ^age1[02-9ac-hj-np-z]{58}$
          required:
            - action
            - recipient
    DatensicherungActionResponse:
      type: object
      properties:
        view:
          type: object
          properties:
            runner:
              type: string
              enum:
                - node
                - host
                - none
            line:
              type: object
              properties:
                status:
                  type: string
                  enum:
                    - ok
                    - warn
                    - error
                lastAt:
                  anyOf:
                    - type: string
                      minLength: 1
                    - type: 'null'
                testedAt:
                  anyOf:
                    - type: string
                      minLength: 1
                    - type: 'null'
                planned:
                  type: boolean
                reason:
                  anyOf:
                    - type: object
                      properties:
                        code:
                          anyOf:
                            - type: string
                              maxLength: 40
                            - type: 'null'
                        text:
                          type: string
                          maxLength: 400
                      required:
                        - code
                        - text
                      additionalProperties: false
                    - type: 'null'
                'off':
                  anyOf:
                    - type: object
                      properties:
                        since:
                          type: string
                          minLength: 1
                        by:
                          type: string
                          maxLength: 80
                      required:
                        - since
                        - by
                      additionalProperties: false
                    - type: 'null'
              required:
                - status
                - lastAt
                - testedAt
                - planned
                - reason
                - 'off'
              additionalProperties: false
            rows:
              maxItems: 10
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    maxLength: 64
                  kind:
                    type: string
                    enum:
                      - standard
                      - s3
                      - sftp
                      - webdav
                      - smb
                  name:
                    anyOf:
                      - type: string
                        maxLength: 120
                      - type: 'null'
                  region:
                    anyOf:
                      - type: object
                        properties:
                          code:
                            type: string
                            maxLength: 40
                          measured:
                            type: boolean
                        required:
                          - code
                          - measured
                        additionalProperties: false
                      - type: 'null'
                  lastGood:
                    anyOf:
                      - type: string
                        minLength: 1
                      - type: 'null'
                  lastTest:
                    anyOf:
                      - type: object
                        properties:
                          at:
                            type: string
                            minLength: 1
                          ok:
                            type: boolean
                        required:
                          - at
                          - ok
                        additionalProperties: false
                      - type: 'null'
                  generations:
                    anyOf:
                      - type: object
                        properties:
                          daily:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          weekly:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          monthly:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                          preUpdate:
                            type: integer
                            minimum: 0
                            maximum: 9007199254740991
                        required:
                          - daily
                          - weekly
                          - monthly
                          - preUpdate
                        additionalProperties: false
                      - type: 'null'
                  status:
                    type: string
                    enum:
                      - aktuell
                      - test_fehlt
                      - verspaetet
                      - gestoert
                      - entwurf
                      - eingerichtet
                      - aus
                  reason:
                    anyOf:
                      - type: object
                        properties:
                          code:
                            anyOf:
                              - type: string
                                maxLength: 40
                              - type: 'null'
                          text:
                            type: string
                            maxLength: 400
                        required:
                          - code
                          - text
                        additionalProperties: false
                      - type: 'null'
                  bytes:
                    anyOf:
                      - type: integer
                        minimum: 0
                        maximum: 9007199254740991
                      - type: 'null'
                  target:
                    anyOf:
                      - type: object
                        properties:
                          address:
                            type: string
                            maxLength: 400
                          live:
                            type: boolean
                          neverDelete:
                            type: boolean
                          objectLock:
                            anyOf:
                              - type: string
                                enum:
                                  - GOVERNANCE
                                  - COMPLIANCE
                              - type: 'null'
                          publicKey:
                            anyOf:
                              - type: string
                                maxLength: 400
                              - type: 'null'
                          hostKey:
                            anyOf:
                              - type: object
                                properties:
                                  fingerprint:
                                    type: string
                                    maxLength: 120
                                  pinned:
                                    type: boolean
                                required:
                                  - fingerprint
                                  - pinned
                                additionalProperties: false
                              - type: 'null'
                          hasKey:
                            type: boolean
                          needs:
                            type: array
                            items:
                              type: string
                              enum:
                                - key
                                - host_key
                                - country
                          legacy:
                            type: boolean
                          canDelete:
                            type:
                              - boolean
                              - 'null'
                        required:
                          - address
                          - live
                          - neverDelete
                          - objectLock
                          - publicKey
                          - hostKey
                          - hasKey
                          - needs
                          - legacy
                          - canDelete
                        additionalProperties: false
                      - type: 'null'
                required:
                  - id
                  - kind
                  - name
                  - region
                  - lastGood
                  - lastTest
                  - generations
                  - status
                  - reason
                  - bytes
                additionalProperties: false
            points:
              maxItems: 80
              type: array
              items:
                type: object
                properties:
                  file:
                    type: string
                    maxLength: 200
                  at:
                    type: string
                    minLength: 1
                  kind:
                    type: string
                    enum:
                      - nightly
                      - pre-update
                      - legacy
                  bytes:
                    type: integer
                    minimum: 0
                    maximum: 9007199254740991
                required:
                  - file
                  - at
                  - kind
                  - bytes
                additionalProperties: false
            restored:
              anyOf:
                - type: object
                  properties:
                    at:
                      type: string
                      minLength: 1
                    pointAt:
                      type: string
                      minLength: 1
                    by:
                      type: string
                      maxLength: 80
                    undoUntil:
                      type: string
                      minLength: 1
                    undone:
                      type: boolean
                  required:
                    - at
                    - pointAt
                    - by
                    - undoUntil
                    - undone
                  additionalProperties: false
                - type: 'null'
            job:
              anyOf:
                - type: object
                  properties:
                    id:
                      type: string
                      maxLength: 64
                    kind:
                      type: string
                      enum:
                        - now
                        - test
                        - restore
                        - undo
                    state:
                      type: string
                      enum:
                        - waiting
                        - running
                        - done
                        - failed
                    at:
                      type: string
                      minLength: 1
                    reason:
                      anyOf:
                        - type: object
                          properties:
                            code:
                              anyOf:
                                - type: string
                                  maxLength: 40
                                - type: 'null'
                            text:
                              type: string
                              maxLength: 400
                          required:
                            - code
                            - text
                          additionalProperties: false
                        - type: 'null'
                    pointAt:
                      anyOf:
                        - type: string
                          minLength: 1
                        - type: 'null'
                  required:
                    - id
                    - kind
                    - state
                    - at
                    - reason
                    - pointAt
                  additionalProperties: false
                - type: 'null'
            can:
              type: object
              properties:
                now:
                  anyOf:
                    - type: string
                      maxLength: 40
                    - type: 'null'
                test:
                  anyOf:
                    - type: string
                      maxLength: 40
                    - type: 'null'
                restore:
                  anyOf:
                    - type: string
                      maxLength: 40
                    - type: 'null'
                undo:
                  anyOf:
                    - type: string
                      maxLength: 40
                    - type: 'null'
              required:
                - now
                - test
                - restore
                - undo
              additionalProperties: false
            recoveryKey:
              type: boolean
            recoveryFingerprint:
              anyOf:
                - type: string
                  maxLength: 40
                - type: 'null'
            shares:
              maxItems: 40
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    maxLength: 120
                  name:
                    type: string
                    maxLength: 200
                  site:
                    anyOf:
                      - type: string
                        maxLength: 120
                      - type: 'null'
                required:
                  - id
                  - name
                  - site
                additionalProperties: false
            canEdit:
              type: boolean
            restoreNew:
              anyOf:
                - type: object
                  properties:
                    mandant:
                      anyOf:
                        - type: string
                          maxLength: 40
                        - type: 'null'
                    node:
                      type: string
                      maxLength: 40
                    hosting:
                      type: string
                      enum:
                        - linux
                        - docker
                        - kubernetes
                    targets:
                      maxItems: 10
                      type: array
                      items:
                        type: object
                        properties:
                          kind:
                            type: string
                            enum:
                              - s3
                              - webdav
                              - sftp
                              - local
                          name:
                            type: string
                            maxLength: 120
                          address:
                            type: string
                            maxLength: 400
                          prefix:
                            type: string
                            maxLength: 200
                          pathStyle:
                            type: boolean
                          region:
                            anyOf:
                              - type: string
                                maxLength: 40
                              - type: 'null'
                          hostKey:
                            anyOf:
                              - type: string
                                maxLength: 120
                              - type: 'null'
                        required:
                          - kind
                          - name
                          - address
                          - prefix
                        additionalProperties: false
                  required:
                    - mandant
                    - node
                    - hosting
                    - targets
                  additionalProperties: false
                - type: 'null'
          required:
            - runner
            - line
            - rows
            - points
            - restored
            - job
            - can
            - recoveryKey
            - canEdit
          additionalProperties: false
        text:
          type: string
        said:
          type: object
          properties:
            code:
              type: string
              maxLength: 40
            vars:
              type: object
              propertyNames:
                type: string
              additionalProperties:
                type:
                  - string
                  - number
          required:
            - code
          additionalProperties: false
      required:
        - view
        - text
        - said
      additionalProperties: false
    Fehler:
      type: object
      description: >-
        Eine Ablehnung: ein fester Code und ein Satz auf Deutsch, der sagt, was
        zu tun ist.
      properties:
        error:
          type: string
          description: Der Code (`not_found`, `forbidden`, `invalid_input` …).
          examples:
            - forbidden
        message:
          type: string
          description: Der Grund in Worten.
          examples:
            - Nur für Admins dieses Mandanten
        reason:
          type: string
          description: Ein fester Code für den Grund, wo es einen gibt.
          examples:
            - admins_only
      required:
        - error
        - message
  responses:
    Fehler400:
      description: Die Eingabe passt nicht. `message` sagt, was fehlt.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Fehler'
    Fehler401:
      description: 'Anmeldung nötig: Der Bearer-Token fehlt oder gilt nicht mehr.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Fehler'
    Fehler403:
      description: Die Person darf das nicht (zum Beispiel nur Admins des Mandanten).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Fehler'
    Fehler404:
      description: Das Objekt ist auf diesem Node nicht bekannt.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Fehler'
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Ein Access-Token des Node. Die Console holt ihn über die Anmeldung des
        Node (`/oauth/authorize`, PKCE, Client `mono-console`); in der
        Entwicklung nimmt ein Node mit Dev-Anmeldung auch einen Dev-Token.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.