Documentation Index

Fetch the complete documentation index at: /llms.txt

Use this file to discover all available pages before exploring further.

LOCAL DRAFT PREVIEW. Not published. Pages tagged Draft are new, pages tagged Updated have additions. Yellow 'To confirm' boxes are internal questions.

Fini home pagelight logodark logo
    Documentation
    Use cases
    Trust & pricing
    API reference

    API Setup

    • API overview
    • API contract
    • Static IP Addresses
    • Database and Warehouse Connections
    • MCP Connections

    LLM Access

    • Coding agents
    • Claude Plugin

    Agents

    • Overview
    • POST
      Create agent
    • List agents
    • DEL
      Delete agent

    Analytics

    • Overview
    • Get agent analytics
    • Get agent analytics section

    Prompts

    • Overview
    • Get prompts
    • Get prompt history
    • Get prompt version
    • Update prompts
    • POST
      Create prompt draft version
    • Get prompt draft version
    • Publish prompt draft version
    • DEL
      Delete prompt draft version

    Actions

    • Overview
    • List actions
    • Get action
    • POST
      Create action
    • Update action
    • DEL
      Delete action
    • Test action
    • List agent assignments
    • POST
      Assign to agents

    Attributes

    • Overview
    • List attributes
    • Get attribute
    • POST
      Create attribute
    • Update attribute
    • DEL
      Delete attribute
    • Test attribute
    • List agent assignments
    • POST
      Assign to agents

    External API calls

    • Overview
    • List external API calls
    • Get external API call
    • POST
      Create external API call
    • Update external API call
    • DEL
      Delete external API call
    • Test external API call

    Intent Rules

    • Overview
    • List intent rules
    • Get intent rule
    • Get intent-rule fields context
    • POST
      Generate intent-rule draft with AI
    • POST
      Create intent rule
    • Update intent rule
    • List intent-rule versions
    • Get intent-rule version
    • Publish intent-rule draft
    • Restore intent-rule version as draft
    • DEL
      Delete intent-rule draft version
    • Get rule version test paths
    • Preview rule test paths
    • Run rule version test path
    • Run rule test path from config
    • DEL
      Delete intent rule

    Guardrails

    • Overview
    • List guardrail check types
    • List guardrail policies
    • Get guardrail policy
    • POST
      Create guardrail policy
    • Update guardrail policy
    • DEL
      Delete guardrail policy
    • List guardrail runs
    • Get guardrail hits

    Business Rules

    • Overview
    • List Business Rules
    • Get Business Rule
    • Get Business Rule fields context
    • List default Business Rules
    • POST
      Create Business Rule
    • POST
      Duplicate Business Rule
    • POST
      Evaluate Business Rule
    • Get Business Rule test fields
    • Preview Business Rule test fields
    • Update Business Rule
    • DEL
      Delete Business Rule

    Reply Rules

    • Overview
    • Get reply rules
    • Get reply rule fields context
    • Update reply rule

    Tag groups

    • Overview
    • List tag groups
    • Get tag group
    • POST
      Create tag group
    • Update tag group
    • DEL
      Delete tag group

    Tags

    • Overview
    • Get tag
    • List tags in group
    • List tags across groups
    • POST
      Create tag
    • Update tag
    • DEL
      Delete tag

    Conversations

    • Overview
    • List conversations
    • Get conversation
    • Get event metadata
    • POST
      Generate Answer
    • Send conversation feedback
    • Mark feedback resolved
    • POST
      Add feedback note
    • POST
      Evaluate conversation rule
    • DEL
      Delete conversation
    • DEL
      Bulk delete conversations

    Refine with AI

    • Overview
    • POST
      Create Refine with AI iteration
    • Get active Refine with AI session
    • Get Refine with AI session

    Replays

    • Replays
    • POST
      Create replay
    • List replays
    • Get replay
    • Get replay events

    Test Sets

    • Overview
    • List test sets
    • POST
      Create a test set
    • Get fields context
    • Get a test set
    • Update a test set
    • DEL
      Delete a test set
    • POST
      Add criteria
    • Update a criterion
    • DEL
      Delete a criterion
    • List runs
    • Start a run
    • Get a run

    Knowledge

    Updates

    • Changelog
      Draft
    Guardrails

    Get guardrail hits

    > ## Documentation Index
    > Fetch the complete documentation index at: https://docs.usefini.com/llms.txt
    > Use this file to discover all available pages before exploring further.
    
    # Get guardrail hits
    
    > Get guardrail hits through the workspace-scoped public API.
    
    Counts initial failed checks per policy in the selected window and the preceding equal-length window. Rewritten replies count as hits. Policies without failures in either window may be absent; `policies` can be empty.
    
    See the [Guardrails overview](/en/api-reference/guardrails) for shared schemas and runtime limitations.
    
    <ParamField header="Authorization" type="string" required>Bearer workspace API key. The key needs `read` scope.</ParamField>
    <ParamField query="botId" type="string" required>Agent UUID in the authenticated workspace.</ParamField>
    <ParamField query="days" type="integer">1 to 90; defaults to 30.</ParamField>
    
    ## Response
    
    <ResponseField name="days" type="integer">Requested window length.</ResponseField>
    <ResponseField name="from" type="datetime">Current window start.</ResponseField>
    <ResponseField name="to" type="datetime">Current window end.</ResponseField>
    <ResponseField name="bucketSeconds" type="number">Bucket duration: 24 buckets for one day, four per day for 2 to 7 days, and at most 30 buckets for longer windows.</ResponseField>
    <ResponseField name="policies" type="array">Each entry has `policyId`, current `hits`, `previousHits`, and a chronological `series` of current-window bucket counts.</ResponseField>
    
    <RequestExample>
      ~~~bash cURL theme={null}
      curl --request GET \
        --url "https://api-prod.usefini.com/v2/guardrail-policies/hits/public?botId=11111111-1111-4111-8111-111111111111&days=1" \
        --header "Authorization: Bearer $FINI_API_KEY"
      ~~~
    
      ~~~javascript Node.js theme={null}
      const response = await fetch("https://api-prod.usefini.com/v2/guardrail-policies/hits/public?botId=11111111-1111-4111-8111-111111111111&days=1", {
        method: "GET",
        headers: { Authorization: `Bearer ${process.env.FINI_API_KEY}` },
      });
      if (!response.ok) throw new Error(`HTTP ${response.status}`);
      console.log(await response.json());
      ~~~
    
      ~~~python Python theme={null}
      import os
      import requests
    
      response = requests.get(
          "https://api-prod.usefini.com/v2/guardrail-policies/hits/public?botId=11111111-1111-4111-8111-111111111111&days=1",
          headers={"Authorization": f"Bearer {os.environ['FINI_API_KEY']}"},
          timeout=30,
      )
      response.raise_for_status()
      print(response.json())
      ~~~
    </RequestExample>
    
    <ResponseExample>
      ~~~json 200 theme={null}
      {
        "days": 1,
        "from": "2026-09-30T09:00:00.000Z",
        "to": "2026-10-01T09:00:00.000Z",
        "bucketSeconds": 3600,
        "policies": [
          {
            "policyId": "22222222-2222-4222-8222-222222222222",
            "hits": 2,
            "previousHits": 1,
            "series": [
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              0,
              2
            ]
          }
        ]
      }
      ~~~
    </ResponseExample>
    
    
    ## Related topics
    
    - [Overview](/en/api-reference/guardrails.md)
    - [Get guardrail policy](/en/api-reference/get-guardrail-policy.md)
    - [Guardrails](/en/configuration/guardrails.md)
    
    
    This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.
    
    List guardrail runs
    Overview
    Powered byThis documentation is built and hosted on Mintlify, a developer documentation platform