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
    Prompts

    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
    
    > Section hub for reading prompt configuration and saving prompt versions through Fini's public API.
    
    Prompts are the instruction layers behind [Configuration → Prompts](/en/configuration/prompts): planning, main guidelines, and channel-specific overrides. Use these public routes to read one agent's current prompt configuration, inspect saved prompt history, save a new prompt version, or stage a draft prompt version for review.
    
    <Info>
      The wire-format paths still use `/hc-prompt` because that is the current controller contract. In this reference, we call them **prompts** because they manage the agent instructions you configure in the product.
    </Info>
    
    <Note>
      The read routes return a merged view: Fini overlays the agent's saved prompt version on top of the workspace template prompt. That is why read responses include helper fields like `defaultPrompt` and `custom`. The write route stores a raw version payload and does not perform that merge in its response.
    </Note>
    
    ## Reference pages
    
    <CardGroup cols={2}>
      <Card title="Get prompts" icon="eye" href="/en/api-reference/get-prompts">
        `GET /v2/bots/{id}/hc-prompt/public` - fetch the agent's current merged prompt configuration.
      </Card>
    
      <Card title="Get prompt history" icon="clock-rotate-left" href="/en/api-reference/get-prompt-history">
        `GET /v2/bots/{id}/hc-prompt/history/public` - list metadata for saved prompt versions.
      </Card>
    
      <Card title="Get prompt version" icon="code-commit" href="/en/api-reference/get-prompt-version">
        `GET /v2/bots/{id}/hc-prompt/{promptId}/public` - fetch one saved prompt version as a merged prompt object.
      </Card>
    
      <Card title="Update prompts" icon="pen" href="/en/api-reference/update-prompts">
        `POST /v2/bots/{id}/hc-prompt/public` - save a new prompt version for one agent.
      </Card>
    
      <Card title="Create prompt draft version" icon="file-pen" href="/en/api-reference/create-prompt-draft-version">
        `POST /v2/bots/{id}/hc-prompt/versions/public` - create a draft prompt version without publishing it.
      </Card>
    
      <Card title="Get prompt draft version" icon="file-magnifying-glass" href="/en/api-reference/get-prompt-draft-version">
        `GET /v2/bots/{id}/hc-prompt/versions/{versionId}/public` - fetch one exact stored draft version for review.
      </Card>
    
      <Card title="Publish prompt draft version" icon="paper-plane" href="/en/api-reference/publish-prompt-draft-version">
        `POST /v2/bots/{id}/hc-prompt/versions/{versionId}/publish/public` - publish one reviewed draft version.
      </Card>
    
      <Card title="Delete prompt draft version" icon="trash" href="/en/api-reference/delete-prompt-draft-version">
        `DELETE /v2/bots/{id}/hc-prompt/versions/{versionId}/public` - discard one unpublished draft version.
      </Card>
    </CardGroup>
    
    ## Endpoint map
    
    | Method | Path | Scope | Purpose |
    | - | - | - | - |
    | `GET` | `/v2/bots/:id/hc-prompt/public` | `read` | Fetch the current merged prompts for one agent. |
    | `GET` | `/v2/bots/:id/hc-prompt/history/public` | `read` | List saved prompt-version metadata for one agent, newest first. |
    | `GET` | `/v2/bots/:id/hc-prompt/:promptId/public` | `read` | Fetch one saved prompt version as a merged prompt object. |
    | `POST` | `/v2/bots/:id/hc-prompt/public` | `write` | Save a new prompt version for one agent. |
    | `POST` | `/v2/bots/:id/hc-prompt/versions/public` | `write` | Create a draft prompt version for one agent. |
    | `GET` | `/v2/bots/:id/hc-prompt/versions/:versionId/public` | `read` | Fetch one exact stored draft version for review. |
    | `POST` | `/v2/bots/:id/hc-prompt/versions/:versionId/publish/public` | `write` | Publish one reviewed, non-stale draft version. |
    | `DELETE` | `/v2/bots/:id/hc-prompt/versions/:versionId/public` | `write` | Delete one unpublished draft version. |
    
    ## Prompt object
    
    <ResponseField name="id" type="string">
      Prompt version ID. On read routes, this is the saved version ID when one exists, otherwise the template prompt ID.
    </ResponseField>
    
    <ResponseField name="botId" type="string">
      Agent ID the prompt is scoped to.
    </ResponseField>
    
    <ResponseField name="createdAt" type="string">
      ISO 8601 timestamp for when this prompt version was created.
    </ResponseField>
    
    <ResponseField name="createdBy" type="string">
      Creator identifier recorded for the saved version.
    </ResponseField>
    
    <ResponseField name="hcPlanningPrompt" type="PromptSection[]">
      Planning Prompt sections.
    </ResponseField>
    
    <ResponseField name="hcGuidelinePrompt" type="PromptSection[]">
      Main Guidelines sections.
    </ResponseField>
    
    <ResponseField name="hcChannelPrompt" type="PromptSection[]">
      Channel Prompt sections.
    </ResponseField>
    
    ## PromptSection object
    
    <ResponseField name="id" type="string">
      Section ID.
    </ResponseField>
    
    <ResponseField name="name" type="string">
      Section name shown in the dashboard.
    </ResponseField>
    
    <ResponseField name="description" type="string">
      Section description.
    </ResponseField>
    
    <ResponseField name="enabled" type="boolean">
      Whether the section is enabled.
    </ResponseField>
    
    <ResponseField name="custom" type="boolean">
      Present on merged read responses. `true` means this section does not come from the default template.
    </ResponseField>
    
    <ResponseField name="subsections" type="PromptSubsection[]">
      Subsections inside the section.
    </ResponseField>
    
    ## PromptSubsection object
    
    <ResponseField name="id" type="string">
      Subsection ID.
    </ResponseField>
    
    <ResponseField name="name" type="string">
      Subsection name shown in the dashboard.
    </ResponseField>
    
    <ResponseField name="prompt" type="string">
      The saved custom prompt text for this subsection. On merged read responses, this can be an empty string when `useDefault` is `true`.
    </ResponseField>
    
    <ResponseField name="defaultPrompt" type="string">
      Present on merged read responses. The default template text Fini would use if `useDefault` is `true`.
    </ResponseField>
    
    <ResponseField name="useDefault" type="boolean">
      Whether this subsection should use the template prompt text instead of the custom `prompt` value.
    </ResponseField>
    
    <ResponseField name="enabled" type="boolean">
      Whether the subsection is enabled.
    </ResponseField>
    
    <ResponseField name="custom" type="boolean">
      Present on merged read responses. `true` means this subsection does not come from the default template.
    </ResponseField>
    
    <Note>
      If you want to edit prompts safely through the API, the simplest workflow is: call [Get prompts](/en/api-reference/get-prompts), modify the returned arrays, then send those arrays back to [Update prompts](/en/api-reference/update-prompts). That preserves section IDs and ordering.
    </Note>
    
    
    ## Related topics
    
    - [Overview](/en/api-reference/tags.md)
    
    
    This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.
    
    Get agent analytics section
    Get prompts
    Powered byThis documentation is built and hosted on Mintlify, a developer documentation platform