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
    Intent Rules

    Overview

    > ## 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.
    
    # Overview
    
    > Create, version, generate, and publish Intent Rules through the public API.
    
    Intent Rules are the workflows configured under [Automations → Intent Rules](/en/automations/rulebook). They use the `/v2/hc-rules` API family and have their own draft, version, publish, restore, and test-path lifecycle.
    
    Intent rules have a version lifecycle. A rule can have a current published version, draft versions, and archived historical versions. Drafts have no agent assignments and do not run in production until published.
    
    ## Intent-rule endpoints
    
    | Method | Path | Scope | Purpose |
    | - | - | - | - |
    | `GET` | `/v2/hc-rules/public` | `read` | List rules. Use `versionStatus` or `includeVersions` to select lifecycle data. |
    | `GET` | `/v2/hc-rules/fields-context/public` | `read` | Get available fields. |
    | `GET` | `/v2/hc-rules/:id/public` | `read` | Get a draft or published rule tree. |
    | `POST` | `/v2/hc-rules/public` | `write` | Create with `status: "DRAFT"` or `"PUBLISHED"`. |
    | `PATCH` | `/v2/hc-rules/:id/public` | `write` | Create a new draft or published version. |
    | `POST` | `/v2/hc-rules/generate/public` | `write` | Use natural-language instructions and an LLM to generate or refine draft rule content. |
    | `GET` | `/v2/hc-rules/:id/versions/public` | `read` | List draft, published, and archived versions. |
    | `GET` | `/v2/hc-rules/:id/versions/:versionId/public` | `read` | Get one version with its full tree. |
    | `POST` | `/v2/hc-rules/:id/publish/public` | `write` | Publish a selected draft version and assign agents. |
    | `POST` | `/v2/hc-rules/:id/versions/:versionId/restore-as-draft/public` | `write` | Copy any historical version into a new draft. |
    | `DELETE` | `/v2/hc-rules/:id/versions/:versionId/public` | `write` | Delete one unpublished draft version. |
    | `GET` | `/v2/hc-rules/:id/versions/:versionId/test-paths/public` | `read` | Generate deterministic paths through one saved version. |
    | `POST` | `/v2/hc-rules/:id/versions/:versionId/test-paths/run/public` | `read` | Run one generated path against a saved version. |
    | `POST` | `/v2/hc-rules/test-paths/config/public` | `read` | Generate deterministic paths from an unsaved flow config. |
    | `POST` | `/v2/hc-rules/test-paths/config/run/public` | `read` | Run one generated path against an unsaved flow config. |
    | `DELETE` | `/v2/hc-rules/:id/public` | `write` | Delete the rule and its agent assignments. |
    
    ## Typical draft workflow
    
    <Steps>
      <Step title="Generate the draft content">
        Call [Generate intent-rule draft with AI](/en/api-reference/generate-intent-rule-draft) with natural-language instructions. The LLM returns a draft name, description, and rule tree. The response is not persisted yet.
      </Step>
    
      <Step title="Create the draft">
        Call [Create intent rule](/en/api-reference/create-intent-rule) with `status: "DRAFT"` and the generated fields or your own tree. Do not send `botIds` for a draft.
      </Step>
    
      <Step title="Update the draft">
        Call [Update intent rule](/en/api-reference/update-intent-rule) with `status: "DRAFT"`. Sending the status explicitly prevents an existing published version from being updated instead.
      </Step>
    
      <Step title="Publish and assign">
        Read the draft's `versionId`, then call [Publish rule draft](/en/api-reference/publish-rule-draft) with that `draftVersionId` and at least one agent ID.
      </Step>
    
      <Step title="Discard drafts you do not want to publish">
        Call [Delete intent-rule draft version](/en/api-reference/delete-rule-draft-version) to remove an unpublished draft version from normal version-history reads.
      </Step>
    
      <Step title="Generate and run path tests">
        Call [Get rule version test paths](/en/api-reference/get-rule-version-test-paths) to derive paths from the version, then call [Run rule version test path](/en/api-reference/run-rule-version-test-path) with the selected `pathId` and expected terminal node.
      </Step>
    </Steps>
    
    <Warning>
      A draft becomes stale when its `parentVersionId` no longer matches the current published version. The publish route rejects stale drafts. Restore or recreate the draft from the current version before publishing.
    </Warning>
    
    ## Intent-rule response fields
    
    Intent Rule responses include `id`, `companyId`, `name`, `description`, `flowConfig`, `botIds`, and lifecycle fields such as `version`, `versionId`, `status`, `parentVersionId`, `publishedAt`, `isStale`, and `currentPublishedVersionId`.
    
    
    ## Related topics
    
    - [Overview](/en/api-reference/tags.md)
    
    
    This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.
    
    Test external API call
    List intent rules
    Powered byThis documentation is built and hosted on Mintlify, a developer documentation platform