> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replyke.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch rule

> Fetch a single rule by its ID

## Overview

`useFetchRule` returns a callable function that fetches a single community rule by ID. Rules are publicly readable — no authentication is required.

## Usage Example

```tsx theme={null}
import { useFetchRule } from "@replyke/react-js";

function RuleDetail({ spaceId, ruleId }: { spaceId: string; ruleId: string }) {
  const fetchRule = useFetchRule();

  const loadRule = async () => {
    const rule = await fetchRule({ spaceId, ruleId });
    console.log(rule.title, rule.description);
  };
}
```

## Parameters

<ParamField path="spaceId" type="string" required>
  UUID of the space.
</ParamField>

<ParamField path="ruleId" type="string" required>
  UUID of the rule to fetch.
</ParamField>

## Returns

A single Rule object with `id`, `projectId`, `spaceId`, `title`, `description`, `order`, `lastApprovedBy`, `createdAt`, and `updatedAt`.
