> ## 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.

# Install Library Rules

> Install one or more presets onto the application, by `library_keys` or a whole `bundle`. Installed presets evaluate immediately in their default mode; already-installed keys are skipped.

export const AgentPromptAccordion = ({prompt, title = "AI Agent Integration Prompt"}) => {
  const [copied, setCopied] = React.useState(false);
  const handleCopy = e => {
    e.stopPropagation();
    if (!prompt) return;
    navigator.clipboard.writeText(prompt.trim()).then(() => {
      setCopied(true);
      setTimeout(() => setCopied(false), 2000);
    });
  };
  const agents = ["Claude Code", "Codex", "Cursor", "Devin", "Windsurf", "GitHub Copilot"];
  return <div className="didit-agent-card">
      {}
      <div className="didit-agent-titlebar">
        <div className="didit-agent-dots" aria-hidden="true">
          <span className="didit-agent-dot didit-agent-dot-red"></span>
          <span className="didit-agent-dot didit-agent-dot-yellow"></span>
          <span className="didit-agent-dot didit-agent-dot-green"></span>
        </div>
        <span className="didit-agent-filename">{title}</span>
        <button type="button" className={`didit-agent-copy ${copied ? "didit-agent-copy-copied" : ""}`} onClick={handleCopy} title="Copy prompt to clipboard" aria-label={copied ? "Copied!" : "Copy prompt to clipboard"}>
          {copied ? <>
              <svg width="13" height="13" viewBox="0 0 16 16" fill="none">
                <path d="M3 8.5l3.5 3.5L13 4" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" />
              </svg>
              <span>Copied</span>
            </> : <>
              <svg width="13" height="13" viewBox="0 0 16 16" fill="none">
                <rect x="5" y="5" width="9" height="9" rx="1.5" stroke="currentColor" strokeWidth="1.5" />
                <path d="M11 5V3.5A1.5 1.5 0 0 0 9.5 2h-6A1.5 1.5 0 0 0 2 3.5v6A1.5 1.5 0 0 0 3.5 11H5" stroke="currentColor" strokeWidth="1.5" />
              </svg>
              <span>Copy</span>
            </>}
        </button>
      </div>

      {}
      <pre className="didit-agent-body"><code>{prompt.trim()}</code></pre>

      {}
      <div className="didit-agent-footer">
        <span className="didit-agent-footer-label">Paste into</span>
        <div className="didit-agent-chips">
          {agents.map(name => <span key={name} className="didit-agent-chip">{name}</span>)}
        </div>
      </div>
    </div>;
};

<AgentPromptAccordion
  title="Install Library Rules API Prompt"
  prompt={`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) - one of:
{ "library_keys": ["structuring-inbound", "structuring-outbound"] }
{ "bundle": "responsible_gaming" }

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).
- 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.`}
/>


## OpenAPI

````yaml POST /v3/transactions/rules/install/
openapi: 3.0.0
info:
  version: 3.0.0
  title: Didit Verification API
  description: Identity verification API. Authenticate with x-api-key header.
servers:
  - url: https://verification.didit.me
security: []
tags: []
paths:
  /v3/transactions/rules/install/:
    post:
      tags:
        - Transactions
      summary: Install library rules
      description: >-
        Install one or more presets onto the application, by `library_keys` or a
        whole `bundle`. Installed presets evaluate immediately in their default
        mode; already-installed keys are skipped.
      operationId: installTransactionRuleLibrary
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TransactionRuleInstallRequest'
            example:
              library_keys:
                - structuring-inbound
                - structuring-outbound
      responses:
        '200':
          description: What was installed.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TransactionRuleInstallResult'
              example:
                installed_library_keys:
                  - structuring-inbound
                  - structuring-outbound
                installed_count: 2
        '400':
          description: Neither library_keys nor bundle provided.
          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"]}'
components:
  schemas:
    TransactionRuleInstallRequest:
      type: object
      properties:
        library_keys:
          type: array
          items:
            type: string
          description: Specific presets to install or uninstall.
        bundle:
          type: string
          description: Install or uninstall every preset in this bundle instead.
      description: Provide library_keys OR bundle.
    TransactionRuleInstallResult:
      type: object
      properties:
        installed_library_keys:
          type: array
          items:
            type: string
          description: 'POST (install) only: presets installed by this call.'
        installed_count:
          type: integer
          description: POST (install) only.
        uninstalled_count:
          type: integer
          description: 'DELETE (uninstall) only: presets removed by this call.'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````