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

# Dokument-Hash-Datensatz (Experimentell)

> Aktuelle Eingaben der Dokumentenpipeline und Implementierungsbeschränkungen.

> [!WARNING]
>
> Die aktuelle Implementierung simuliert Extraktion und KI-Verifizierung. Ihr generiertes Urteil und Vertrauen sind kein Beweis für die Echtheit des Dokuments. Verwenden Sie diesen Endpunkt nicht, um Identitäten zu genehmigen, die Einhaltung zu etablieren oder Dokumente zu authentifizieren.

Der Handler akzeptiert `agent_id` und `document_hash`, mit optionalen `document_type`, `file_name` und `metadata`. Der Agent muss existieren und aktiv sein. Er akzeptiert **keine** Dokumentenbytes in `document_b64`, führt keine OCR durch und vergleicht keine hochgeladene Datei mit dem bereitgestellten Hash.

Der Handler erstellt seinen Datensatz synchron. Verwenden Sie die zurückgegebene Dokumentenkennung mit [Dokument abrufen](https://docs.truthlocks.com/de/api-reference/machine-identity/documents/get.md). Generierte Extraktions-Hashes beschreiben simulierten Inhalt, nicht extrahierte Dateibytes. Pipeline-Empfangssignaturen enthalten derzeit Systemmarker anstelle von kryptografischen Signaturen.

Für die kryptografische Datensatzverifizierung verwenden Sie [Attestierung verifizieren](https://docs.truthlocks.com/de/api-reference/verify.md) mit einer echten signierten Attestierung und der ursprünglichen Nutzlast oder dem Dokument-Hash. Dies prüft die Integrität und den Datensatzstatus, nicht ob die sachlichen Behauptungen des Dokuments wahr sind.


## OpenAPI

````yaml de/mint-openapi.yaml POST /v1/truth/document/verify
openapi: 3.0.3
info:
  title: Truthlocks API
  description: >
    Truthlocks ist eine universelle Verifizierungsinfrastruktur für Dokumente,
    Anmeldeinformationen und digitale Assets.

    Diese Spezifikation definiert die kanonische API für die Interaktion mit
    Truthlocks-Diensten.


    ## Basis-URLs

    - **Produktion**: `https://api.truthlocks.com`

    - **Sandbox**: `https://sandbox-api.truthlocks.com`


    ## Authentifizierung

    - **API-Schlüssel**: Verwenden Sie den Header `X-API-Key` für
    Machine-to-Machine-Operationen

    - **Bearer Tokens**: Verwenden Sie `Authorization: Bearer <jwt>` für
    benutzerinitiierte Operationen


    ## Mandantenidentität

    In der Produktion wird die Mandantenidentität aus dem authentifizierten
    Kontext (API-Schlüssel oder JWT) abgeleitet.

    Der Header `X-Tenant-ID` wird in der Produktion ignoriert, um Spoofing zu
    verhindern.
  version: 1.0.0
  contact:
    name: Truthlocks Support
    url: https://truthlocks.com/support
    email: support@truthlocks.com
servers:
  - url: https://api.truthlocks.com
    description: Produktions-API
  - url: https://sandbox-api.truthlocks.com
    description: Sandbox-Umgebung
security:
  - APIKey: []
  - BearerAuth: []
tags:
  - name: Authentication
    description: API-Schlüssel- und Token-Verwaltung
  - name: Issuers
    description: Ausstellerregistrierung und Vertrauensmanagement
  - name: Keys
    description: Kryptographische Schlüsselverwaltung für Aussteller
  - name: Attestations
    description: Bestätigungslebenszyklus (prägen, widerrufen, ersetzen)
  - name: Verification
    description: Bestätigungsverifizierung und Proof-Bundles
  - name: Governance
    description: Aussteller-Governance-Workflows (nur Admin)
  - name: Identity
    description: Organisations-, Benutzer- und Rollenverwaltung
  - name: Audit
    description: Audit-Ereignisabfragen
  - name: Tenant Console
    description: Mandantenprofil- und Lebenszyklus-Endpunkte
  - name: Health
    description: Endpunkte für Dienststatus und Bereitschaft
  - name: Risk
    description: Erfassung von Risikosignalen und Betrugserkennung
  - name: Risk Enforcement
    description: >-
      Risikodurchsetzungsmaßnahmen – Blockieren, Herausfordern, Quarantäne und
      Konfiguration
  - name: Billing
    description: Verwaltung von Abrechnung, Abonnements und Add-ons
  - name: Machine Identity
    description: >-
      Machine Agent Identity Protocol (MAIP) – Agentenregistrierung, Sitzungen,
      Vertrauen, Zeugen, Compliance, Orchestrierung und Beobachtbarkeit
externalDocs:
  description: Transparenz-API nur lesend (separate Dienstspezifikation)
  url: >-
    https://github.com/truthlocks/truthlock/blob/main/docs/transparency/openapi.yaml
paths:
  /v1/truth/document/verify:
    post:
      tags:
        - Machine Identity
      summary: Dokumentenwahrheit überprüfen
      description: >-
        Experimenteller Dokumenten-Hash-Datensatz. Extraktions- und
        KI-Ergebnisse werden in der aktuellen Implementierung simuliert. Dieser
        Endpunkt akzeptiert keine Dokumenten-Bytes und darf nicht als Beweis für
        die Authentizität eines Dokuments verwendet werden.
      operationId: maip.truth.document.verify
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                agent_id:
                  type: string
                  description: Anfragender Agent
                  format: uuid
                document_hash:
                  type: string
                  description: SHA-256-Hash des Dokuments
                document_type:
                  type: string
                file_name:
                  type: string
                metadata: {}
              type: object
              required:
                - agent_id
                - document_hash
      responses:
        '200':
          description: Ergebnis der Dokumentenprüfung
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaipDocumentVerification'
        '400':
          description: Validierungsfehler
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '401':
          description: Authentifizierung erforderlich
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: Ratenlimit überschritten
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - APIKey: []
components:
  schemas:
    MaipDocumentVerification:
      type: object
      properties:
        verification_id:
          type: string
          format: uuid
        document_id:
          type: string
          format: uuid
        document_hash:
          type: string
        status:
          type: string
          enum:
            - pending
            - verified
            - failed
        results:
          type: array
          items:
            type: object
            additionalProperties: true
        verifications:
          type: array
          items:
            type: object
            additionalProperties: true
        claims:
          type: array
          items:
            $ref: '#/components/schemas/MaipTruthClaim'
        created_at:
          type: string
          format: date-time
    ErrorEnvelope:
      type: object
      required:
        - code
        - message
        - http_status
      properties:
        code:
          type: string
          description: Maschinenlesbarer Fehlercode
          enum:
            - AUTH_REQUIRED
            - AUTH_INVALID
            - PERMISSION_DENIED
            - TENANT_IDENTITY_UNVERIFIED
            - NOT_FOUND
            - VALIDATION_ERROR
            - CONFLICT
            - PAYLOAD_TOO_LARGE
            - RATE_LIMIT_EXCEEDED
            - QUOTA_EXCEEDED
            - SERVICE_UNAVAILABLE
            - INTERNAL_ERROR
        message:
          type: string
          description: Menschenlesbare Fehlermeldung
        http_status:
          type: integer
          description: HTTP-Statuscode
        retry_after_ms:
          type: integer
          description: >-
            Millisekunden, die vor einem erneuten Versuch gewartet werden sollen
            (für Ratenbegrenzungen)
        details:
          type: object
          description: Zusätzlicher Fehlerkontext
      example:
        code: AUTH_REQUIRED
        message: Authentication required
        http_status: 401
    MaipTruthClaim:
      type: object
      properties:
        claim_id:
          type: string
          format: uuid
        agent_id:
          type: string
          format: uuid
        claim_type:
          type: string
        payload:
          type: object
          additionalProperties: true
        evidence:
          type: array
          items:
            type: object
            additionalProperties: true
        status:
          type: string
          enum:
            - pending
            - verified
            - rejected
            - expired
        receipt_id:
          type: string
          format: uuid
        attestations:
          type: array
          items:
            $ref: '#/components/schemas/MaipAttestation'
        verified_at:
          type: string
          format: date-time
        created_at:
          type: string
          format: date-time
    MaipAttestation:
      type: object
      properties:
        attestation_id:
          type: string
          format: uuid
        witness_id:
          type: string
          format: uuid
        agent_id:
          type: string
          format: uuid
        claim_hash:
          type: string
        signature:
          type: string
        status:
          type: string
          enum:
            - pending
            - accepted
            - rejected
        created_at:
          type: string
          format: date-time
  securitySchemes:
    APIKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: API-Schlüssel für die Maschine-zu-Maschine-Authentifizierung
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT für benutzerinitiierte Operationen

````

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