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

# Fetch Rule

> Get a single community rule by its ID

Fetches a single rule by ID. Authentication is optional. In a space the caller can't see (a `private` space they aren't an active member of, or one under it), the rule answers `404`, exactly like a nonexistent rule.

## Path Parameters

**spaceId** `string` *required*

UUID of the space.

**ruleId** `string` *required*

UUID of the rule.

## Response

A single Rule object with all fields.

## Error Responses

> [accordion] Not Found — 404
>
> ```json theme={null}
> { "error": "Rule not found.", "code": "rule/not-found" }
> ```

See also: [useFetchRule](https://docs.sublay.io/v7/hooks/spaces/rules/use-fetch-rule.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.