> ## 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 intent rule

> Fetch a draft or published intent rule with its full tree.

Returns one intent rule as a full [`Rule`](/en/api-reference/rules#rule-object).

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token containing your Fini workspace API key. Format: `Bearer fini_...` The key needs `read` scope.
</ParamField>

## Path parameters

<ParamField path="id" type="string" required>
  Intent-rule ID.
</ParamField>

## Query parameters

<ParamField query="versionStatus" type="string">
  Version to fetch. Use `DRAFT` or `PUBLISHED`. If omitted, the route returns the published version when one exists, otherwise the latest draft.
</ParamField>

## Response

Returns the rule with its `flowConfig` and lifecycle fields. Draft responses have `botIds: []`.

<Note>
  Fetch archived snapshots by `versionId` through [Get intent-rule version](/en/api-reference/get-rule-version).
</Note>

## Errors

<AccordionGroup>
  <Accordion title="400 Bad Request" icon="circle-exclamation">
    `versionStatus` is unsupported.
  </Accordion>

  <Accordion title="401 Unauthorized" icon="lock">
    The API key is missing, malformed, revoked, or invalid.
  </Accordion>

  <Accordion title="403 Forbidden" icon="shield-halved">
    The API key does not include the `read` scope required for this route.
  </Accordion>

  <Accordion title="404 Not Found" icon="ghost">
    The intent rule or requested version does not exist in your workspace.
  </Accordion>
</AccordionGroup>
