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

# Voreingestellte Transaktionsregeln per API installieren

> Installieren Sie voreingestellte KYT-Regeln mit Didit per API, einzeln über den Bibliotheksschlüssel oder als komplettes Bundle.



API-Prompt zum Installieren der Regelbibliothek
        Prompt in die Zwischenablage kopieren



      
      

\<pre>

\`Install preset rules from the Didit library onto my application.

Endpoint:
POST https://verification.didit.me/v3/transactions/rules/install/

Authentication:
Use the x-api-key header with my Didit API key.

Request body (application/json) - provide at least one selector:
\{ "library_keys": ["structuring-inbound", "structuring-outbound"] }
\{ "bundle": "responsible_gaming" }
\{ "library_keys": ["structuring-inbound"], "bundle": "aml_ctf" }

Response:
\{ "installed_library_keys": ["structuring-inbound", "structuring-outbound"], "installed_count": 2 }

Behavior:
\- Installed presets evaluate immediately - in ACTIVE mode when transaction monitoring is enabled on the application, DISABLED otherwise. Tune them afterwards with PATCH (mode only).
\- You may send both selectors. When you do, only the requested library keys that belong to the bundle are installed.
\- Already-installed keys are skipped, so the call is safe to repeat.
\- Discover keys and bundles via GET /v3/transactions/rules/library/.

Failure modes:
\- 400 - neither library_keys nor bundle provided, or library_keys is not a list.`

\</pre>



      
      

Einfügen in



## OpenAPI

````yaml de/openapi-25.json POST /v3/transactions/rules/install/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: API für Ausweisverifizierung. Authentifizierung über den x-api-key-Header.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/transactions/rules/install/:
    post:
      tags:
        - Transactions
      summary: Bibliotheksregeln installieren
      description: >-
        Installieren Sie eine oder mehrere Vorlagen in der Anwendung, über
        `library_keys` oder ein ganzes `bundle`. Eine installierte Vorlage ist
        sofort aktiv, solange die Transaktionsüberwachung eingeschaltet ist,
        andernfalls deaktiviert; bereits installierte Schlüssel werden
        übersprungen. Eine Bibliotheksregel, deren Bedingungen Daten lesen, die
        die Regel-Engine noch nicht auswerten kann, wird zurückgehalten, bis sie
        ausgeführt werden kann. Eine Anfrage, die eine solche Regel in
        `library_keys` benennt, wird mit 400 beantwortet und installiert nichts
        („Diese Bibliotheksregeln können noch nicht ausgeführt werden: deren
        Bedingungen lesen Daten, die die Regel-Engine nicht auswerten kann.“
        gefolgt von den Schlüsseln), und eine `bundle`-Installation überspringt
        sie. Eine zurückgehaltene Regel wird automatisch wieder aktiv, sobald
        ihre Bedingungen ausgewertet werden können. Ein Eintrag in
        `library_keys`, der nicht in der Bibliothek vorhanden ist, wird
        übersprungen, nicht abgelehnt.
      operationId: installTransactionRuleLibrary
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionRuleInstallRequest'
            example:
              library_keys:
                - structuring-inbound
                - structuring-outbound
      responses:
        '200':
          description: Was installiert wurde.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionRuleInstallResult'
              example:
                installed_library_keys:
                  - structuring-inbound
                  - structuring-outbound
                installed_count: 2
        '400':
          description: >-
            Weder library_keys noch bundle angegeben, `library_keys` ist keine
            Liste oder ein Eintrag in `library_keys` wird zurückgehalten. Ein
            unbekannter Eintrag wird übersprungen und gibt 200 ohne ihn zurück.
          content:
            application/json:
              schema:
                type: object
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X POST
            'https://verification.didit.me/v3/transactions/rules/install/' \
              -H 'x-api-key: YOUR_API_KEY' \
              -H 'Content-Type: application/json' \
              -d '{"library_keys": ["structuring-inbound", "structuring-outbound"]}'
        - lang: python
          label: Python
          source: |-
            from didit import Didit

            # Reads DIDIT_API_KEY.
            client = Didit()

            result = client.transactions.rules.install_library(
                library_keys=["structuring-inbound", "structuring-outbound"],
            )
            print(result)
        - lang: javascript
          label: Node.js
          source: |-
            import Didit from "@didit-protocol/sdk-node";

            // Reads DIDIT_API_KEY.
            const didit = new Didit();

            const result = await didit.transactions.rules.installLibrary({
              library_keys: ["structuring-inbound", "structuring-outbound"],
            });
            console.log(result);
        - lang: go
          label: Go
          source: "ctx := context.Background()\n// Reads DIDIT_API_KEY.\nclient := didit.NewClient()\n\nresult, err := client.Transactions.Rules.InstallLibrary(ctx, didit.TransactionRuleInstallRequest{\n\tLibraryKeys: didit.Some([]string{\"structuring-inbound\", \"structuring-outbound\"}),\n})\nif err != nil {\n\tlog.Fatal(err)\n}\nfmt.Printf(\"%+v\\n\", result)"
        - lang: java
          label: Java
          source: >-
            import java.util.List;

            import me.didit.Didit;

            import me.didit.types.TransactionRuleInstallRequest;


            // Reads DIDIT_API_KEY.

            Didit client = new Didit();


            var result =
            client.transactions().rules().installLibrary(TransactionRuleInstallRequest.builder()
                    .libraryKeys(List.of("structuring-inbound", "structuring-outbound"))
                    .build());
            System.out.println(result);
        - lang: php
          label: PHP
          source: |-
            <?php

            require 'vendor/autoload.php';

            use Didit\DiditClient;

            // Reads DIDIT_API_KEY.
            $didit = new DiditClient();

            $result = $didit->transactions->rules->installLibrary([
                'library_keys' => ['structuring-inbound', 'structuring-outbound'],
            ]);
            print_r($result->toArray());
        - lang: ruby
          label: Ruby
          source: >-
            require "didit"


            # Reads DIDIT_API_KEY.

            didit = Didit::Client.new


            result = didit.transactions.rules.install_library(library_keys:
            ["structuring-inbound", "structuring-outbound"])

            puts result.to_h
        - lang: csharp
          label: .NET
          source: >-
            using System;

            using System.Text.Json;

            using Didit;


            // Reads DIDIT_API_KEY.

            using var client = new DiditClient();


            var result = await client.Transactions.Rules.InstallLibraryAsync(new
            TransactionRuleInstallRequest

            {
                LibraryKeys = new string[] { "structuring-inbound", "structuring-outbound" },
            });

            Console.WriteLine(JsonSerializer.Serialize(result));
components:
  schemas:
    TransactionRuleInstallRequest:
      type: object
      properties:
        library_keys:
          type: array
          items:
            type: string
          description: Spezifische Voreinstellungen zum Installieren oder Deinstallieren.
        bundle:
          type: string
          description: >-
            Stattdessen jede Vorlage in diesem Bundle installieren oder
            deinstallieren.
      description: Geben Sie library_keys ODER bundle an.
    TransactionRuleInstallResult:
      type: object
      properties:
        installed_library_keys:
          type: array
          items:
            type: string
          description: >-
            Nur POST (Installieren): Durch diesen Aufruf installierte
            Voreinstellungen.
        installed_count:
          type: integer
          description: Nur POST (Installieren).
        uninstalled_count:
          type: integer
          description: >-
            Nur DELETE (Deinstallation): durch diesen Aufruf entfernte
            Voreinstellungen.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        Der API-Schlüssel Ihrer Anwendung, aus Entwickler -> API-Schlüssel in
        der Business Console. Der Primärschlüssel hat Vollzugriff. Ein benannter
        Schlüssel kann im Geltungsbereich eingeschränkt werden: keine, Lese-
        oder Schreibberechtigung pro Ressource, beschränkt auf bestimmte
        Workflows oder genehmigte Sitzungen, auf eine Liste von IP-Adressen und
        auf ein Ablaufdatum. 401 bedeutet, dass der Schlüssel falsch, widerrufen
        oder abgelaufen ist; 403 bedeutet, dass kein Schlüssel gesendet wurde,
        der Schlüssel keinen Zugriff auf diese Ressource oder Aktion hat oder
        die Anfrage von einer Adresse außerhalb seiner IP-Liste stammte; 404 bei
        einer Sitzungsroute bedeutet, dass die Sitzung außerhalb der Workflows
        oder Status des Schlüssels liegt. Ein Schlüssel ohne Medienzugriff
        erhält Bild-, Video- und PDF-URLs als null, und ein Schlüssel ohne
        Schreibberechtigung für Sitzungen erhält Sitzungslinks und Token als
        null. Siehe https://docs.didit.me/console/api-keys.

````

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