> ## Documentation Index
> Fetch the complete documentation index at: https://velt-mintlify-e6426361.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# List Extracted Rules

> List the policy rules extracted from a rule-based knowledge source in Velt Memory v2, including rule text, IDs, and source metadata.

Use this API to list the rules extracted from a rule-based knowledge source.

# Endpoint

`POST https://api.velt.dev/v2/memory/knowledge/rules`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="sourceId" type="string" required>
      The knowledge source id returned by Ingest Knowledge.
    </ParamField>
  </Expandable>
</ParamField>

## **Example Requests**

#### List a source's rules

```JSON theme={null}
{
  "data": {
    "sourceId": "src_9a8..."
  }
}
```

# Response

Each rule includes its `id`, the rule `content`, a `category`, and its `index` in the source.

#### Success Response

```JSON theme={null}
{
  "result": [
    {
      "id": "rule_1",
      "content": "Medical claims must cite a source.",
      "category": "compliance",
      "index": 0
    }
  ]
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
```

<ResponseExample>
  ```js theme={null}
  {
    "result": [
      {
        "id": "rule_1",
        "content": "Medical claims must cite a source.",
        "category": "compliance",
        "index": 0
      }
    ]
  }
  ```
</ResponseExample>
