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

# List Rule Library

> Browse the full preset rule library (150+ rules) with each entry's complete configuration and an `is_installed` flag for this application. Filter by bundle, category, or free-text search.

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="List Rule Library API Prompt"
  prompt={`Browse Didit's preset transaction-monitoring rule library.

Endpoint:
GET https://verification.didit.me/v3/transactions/rules/library/

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

Query parameters (all optional): bundle, category, search, limit, offset.

Behavior:
- Returns every library preset with its full configuration (conditions, aggregation, actions) and an is_installed flag for this application.
- Check the library before building a custom rule: if an equivalent preset exists, install it via POST /v3/transactions/rules/install/ instead of recreating its logic.
- Bundles group related presets, e.g. finance, aml_ctf, anomaly_detection, fatf, device_intelligence, crypto_monitoring, travel_rule, responsible_gaming, e_commerce.`}
/>


## OpenAPI

````yaml GET /v3/transactions/rules/library/
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/library/:
    get:
      tags:
        - Transactions
      summary: List rule library
      description: >-
        Browse the full preset rule library (150+ rules) with each entry's
        complete configuration and an `is_installed` flag for this application.
        Filter by bundle, category, or free-text search.
      operationId: listTransactionRuleLibrary
      parameters:
        - name: bundle
          in: query
          required: false
          schema:
            type: string
          description: >-
            Filter by bundle, e.g. finance, aml_ctf, crypto_monitoring,
            travel_rule
        - name: category
          in: query
          required: false
          schema:
            type: string
          description: Filter by category
        - name: search
          in: query
          required: false
          schema:
            type: string
          description: Case-insensitive match against title and description
        - name: limit
          in: query
          required: false
          schema:
            type: integer
          description: Page size
        - name: offset
          in: query
          required: false
          schema:
            type: integer
          description: Page offset
      responses:
        '200':
          description: Paginated library entries.
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                  next:
                    type: string
                    nullable: true
                  previous:
                    type: string
                    nullable: true
                  results:
                    type: array
                    items:
                      $ref: '#/components/schemas/TransactionRuleLibraryEntry'
      security:
        - ApiKeyAuth: []
      x-codeSamples:
        - lang: curl
          label: curl
          source: >-
            curl -X GET
            'https://verification.didit.me/v3/transactions/rules/library/?bundle=finance'
            \
              -H 'x-api-key: YOUR_API_KEY'
components:
  schemas:
    TransactionRuleLibraryEntry:
      type: object
      properties:
        library_key:
          type: string
        title:
          type: string
        description:
          type: string
          nullable: true
        category:
          type: string
        evaluation_mode:
          type: string
          enum:
            - ALL
            - ANY
        scope:
          $ref: '#/components/schemas/TransactionRuleScope'
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/TransactionRuleCondition'
        aggregation:
          type: array
          items:
            $ref: '#/components/schemas/TransactionRuleAggregation'
        actions:
          type: array
          items:
            $ref: '#/components/schemas/TransactionRuleAction'
        metadata:
          type: object
        bundle:
          type: string
          nullable: true
          description: >-
            Functional family, e.g. finance, aml_ctf, crypto_monitoring,
            travel_rule, responsible_gaming.
        tags:
          type: array
          items:
            type: string
        industries:
          type: array
          items:
            type: string
        source:
          type: string
        is_installed:
          type: boolean
          description: Whether this preset is currently installed on the application.
    TransactionRuleScope:
      type: object
      properties:
        transaction_types:
          type: array
          items:
            type: string
          description: >-
            Restrict to transaction types, e.g. finance, kyc, travel_rule,
            user_event. Empty or missing = no restriction.
        directions:
          type: array
          items:
            type: string
            enum:
              - INBOUND
              - OUTBOUND
          description: Restrict to transaction directions (case-insensitive on write).
        action_types:
          type: array
          items:
            type: string
          description: Restrict to your action_type values, e.g. withdrawal, deposit.
      description: >-
        Which transactions the rule applies to. Only these three keys are
        accepted.
    TransactionRuleCondition:
      type: object
      required:
        - field
        - operator
      properties:
        field:
          type: string
          description: >-
            Transaction field path to evaluate. Core fields: amount, currency,
            direction, action_type, score, severity, transaction_type,
            payment_details, preferred_currency_amount (falls back to
            amount_in_default_currency), default_currency_code, subject_country,
            counterparty_country, subject_vendor_data, counterparty_vendor_data,
            subject_device_fingerprint, counterparty_device_fingerprint,
            subject_browser_family, subject_browser_version, subject_platform,
            subject_accept_language, subject_session_age_ms, subject_ip_country,
            counterparty_ip_country, subject_ip_address,
            counterparty_ip_address, subject_payment_method_type,
            subject_payment_method_country, subject_payment_method_fingerprint,
            subject_payment_method_account_id (and the
            counterparty_payment_method_* equivalents), travel_rule_status,
            travel_rule_required, travel_rule_obligations_count,
            subject_days_since_previous_transaction, tags, and
            custom_values.<key> for any key submitted in custom_properties on
            transaction create. Country-code fields accept ISO-2 or ISO-3; both
            sides are normalized to ISO-3 before comparison.
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
            - in
            - not_in
            - contains
            - not_contains
            - contains_any
            - regex
            - fuzzy_match
            - exists
            - is_not_empty
            - is_not_null
            - not_exists
            - is_empty
            - is_null
          description: >-
            Comparison operator. in/not_in test membership (value may be a list
            or a single scalar). contains/not_contains are case-insensitive
            substring checks against a string value. contains_any takes a list
            of strings and matches when any is a case-insensitive substring of
            the field value. regex matches the value pattern against the field.
            fuzzy_match compares against the value string with the required
            `score` threshold (0-100). gt/gte/lt/lte never match when either
            side is missing. exists/is_not_empty/is_not_null (aliases) and
            not_exists/is_empty/is_null (aliases) are presence checks that
            ignore `value`.
        value:
          description: >-
            Comparison value. Its shape depends on the operator and value_type;
            omit for the presence-check operators.
        value_type:
          type: string
          enum:
            - list
            - field
            - relative_date
          description: >-
            Optional value interpretation. `list`: value is a List UUID and the
            list's entries become the comparison value. `field`: value is
            another field path, compared field-to-field. `relative_date`: value
            is a relative-date object, e.g. {"direction": "past", "unit":
            "days", "amount": 30}.
        score:
          type: number
          minimum: 0
          maximum: 100
          description: >-
            Required when operator is fuzzy_match: the 0-100 similarity
            threshold.
        group_index:
          type: integer
          description: >-
            Optional grouped logic. When any condition carries group_index,
            conditions sharing an index form a group and grouped evaluation
            replaces evaluation_mode.
        group_logic:
          type: string
          enum:
            - AND
            - OR
          default: AND
          description: How conditions combine WITHIN a group.
        groups_logic:
          type: string
          enum:
            - AND
            - OR
          default: OR
          description: >-
            How group outcomes combine ACROSS groups. Read from the first
            condition.
    TransactionRuleAggregation:
      type: object
      required:
        - value
      properties:
        metric:
          type: string
          enum:
            - count
            - sum
            - max
            - min
            - avg
            - distinct_count
          default: count
          description: >-
            How the matching historical transactions are aggregated.
            unique_count is accepted as an alias of distinct_count.
        field:
          type: string
          default: amount
          description: >-
            Field aggregated by sum/max/min/avg/distinct_count. Ignored for
            count.
        operator:
          type: string
          enum:
            - eq
            - ne
            - gt
            - gte
            - lt
            - lte
          default: eq
          description: Comparison applied to the computed metric.
        value:
          type: number
          description: Threshold the computed metric is compared against.
        window:
          type: string
          pattern: ^\d+(m|h|d)$
          default: 1d
          description: >-
            Look-back window ending at the transaction's txn_date: <N>m
            (MINUTES, not months), <N>h (hours) or <N>d (days), e.g. 30m, 24h,
            7d, 30d.
        filters:
          type: object
          additionalProperties: true
          description: >-
            Narrows which historical transactions are aggregated. Keys are field
            paths from the condition field catalog; a value of "__current__"
            resolves to the same field's value on the transaction being
            evaluated (e.g. {"subject_vendor_data": "__current__"} scopes the
            window to the same subject), and a list value means membership.
      description: >-
        Velocity check over the application's historical transactions inside the
        window. Every aggregation entry must match for the rule to match,
        regardless of evaluation_mode.
    TransactionRuleAction:
      oneOf:
        - type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - add_score
            value:
              type: integer
              description: Points added to the transaction's risk score. May be negative.
          description: >-
            Add points to the transaction's cumulative risk score; the total
            decides the status via the application's review/decline thresholds.
        - type: object
          required:
            - type
            - value
          properties:
            type:
              type: string
              enum:
                - change_status
            value:
              type: string
              enum:
                - APPROVED
                - IN_REVIEW
                - DECLINED
                - AWAITING_USER
              description: >-
                Status to set immediately, regardless of score. Alias key:
                status.
            workflow_id:
              type: string
              format: uuid
              description: >-
                REQUIRED when value is AWAITING_USER: the verification workflow
                the subject is asked to complete. Alias key:
                remediation_workflow_id. Didit creates a hosted remediation
                session for the subject when the rule fires.
          description: >-
            Directly set the transaction status. DECLINED always wins across
            matched rules.
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - add_tags
            tag_uuid:
              type: string
              format: uuid
              description: Existing application tag to attach.
            tag_name:
              type: string
              description: >-
                Tag name to attach; created on first use (stored uppercased).
                Provide tag_uuid or tag_name.
            tag_color:
              type: string
              description: 'Hex color used when tag_name creates a new tag, e.g. #007AFE.'
          description: Attach an application tag to the matched transaction.
        - type: object
          required:
            - type
            - note
          properties:
            type:
              type: string
              enum:
                - add_note
            note:
              type: string
              description: >-
                Note text attached to the transaction (author: Rule Engine).
                Alias key: value.
          description: Attach an automated analyst note to the matched transaction.
        - type: object
          required:
            - type
            - list_id
          properties:
            type:
              type: string
              enum:
                - add_to_list
            list_id:
              type: string
              format: uuid
              description: List to add the subject's vendor_data to.
          description: >-
            Add the subject's vendor_data to a blocklist, allowlist or custom
            list.
        - type: object
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - open_case
            blueprint:
              type: string
              format: uuid
              description: >-
                Case blueprint UUID; defaults to the application's default
                blueprint.
            grouping:
              type: string
              enum:
                - by_applicant
                - by_rule_and_applicant
              description: >-
                Whether repeat matches join one case per applicant or one per
                rule+applicant.
            attach_matched_transaction:
              type: boolean
              description: Attach the matched transaction to the case.
          description: >-
            Open (or add to) an investigation case. Only the first open_case
            action on a rule is applied.
      description: >-
        One rule action. A rule can carry several; all are applied together when
        it matches. Rules in TEST mode record what they would have done without
        applying any action.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````