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

# Rule templates

> Browse pre-built transaction monitoring rule templates for common compliance scenarios and copy them into your workspace as customizable drafts.

Rule templates are pre-built rules that cover common compliance scenarios — high-value transactions, velocity anomalies, cross-border patterns, and more. Instead of authoring conditions from scratch, you can copy a template into your workspace and customize it.

***

## Browsing templates

### In the dashboard

Open **Transaction Monitoring** → **Templates** to see the full catalog. Each template card shows its name, description, the products it applies to (e.g., crypto, fiat), and the typologies it covers (e.g., structuring, money laundering).

Use the search bar and product/typology filters to narrow the list.

### Via API

**Endpoint:** `GET /v1/rule-templates`

<CodeGroup>
  ```bash REST API theme={null}
  GET /v1/rule-templates?limit=20&page=1
  ```

  ```typescript Javascript theme={null}
  const templates = await corsa.ruleTemplates.listRuleTemplates(
    1,  // page
    20  // limit
  );
  ```

  ```python Python theme={null}
  from corsa_sdk.api.rule_templates.list_rule_templates import _get_kwargs

  resp = http.request(**_get_kwargs(limit=20, page=1))
  templates = resp.json()
  ```
</CodeGroup>

Filter templates by name, products, or typologies:

```
GET /v1/rule-templates?search=withdrawal&filter.products=$eq:crypto
```

***

## Viewing template details

Click any template to inspect its conditions and actions before copying.

**Endpoint:** `GET /v1/rule-templates/{id}`

<CodeGroup>
  ```bash REST API theme={null}
  GET /v1/rule-templates/template-uuid
  ```

  ```typescript Javascript theme={null}
  const template = await corsa.ruleTemplates.getRuleTemplate("template-uuid");
  ```

  ```python Python theme={null}
  from corsa_sdk.api.rule_templates.get_rule_template import _get_kwargs

  resp = http.request(**_get_kwargs(id="template-uuid"))
  template = resp.json()
  ```
</CodeGroup>

The response includes the full `conditions` tree and `actions` array so you can review the rule logic before copying.

***

## Copying a template

Copying creates a **draft** rule in your workspace with the template's conditions and actions pre-filled. You can then modify anything — name, conditions, actions, priority — before activating.

### In the dashboard

Click **Use Template** on any template card. The Rule Builder opens with the template's conditions already populated.

### Via API

**Endpoint:** `POST /v1/rule-templates/{id}/copy`

<CodeGroup>
  ```bash REST API theme={null}
  POST /v1/rule-templates/template-uuid/copy
  ```

  ```typescript Javascript theme={null}
  const draftRule = await corsa.ruleTemplates.copyRuleTemplate("template-uuid");
  ```

  ```python Python theme={null}
  from corsa_sdk.api.rule_templates.copy_rule_template import _get_kwargs

  resp = http.request(**_get_kwargs(id="template-uuid"))
  draft_rule = resp.json()
  ```
</CodeGroup>

The response contains the `ruleId` of the newly created draft. From here you can [customize the rule](/transaction-monitoring/building-rules) and [activate it](/transaction-monitoring/rules-api#activate-a-rule) when ready.

***

## What's next?

<CardGroup cols={2}>
  <Card title="Building rules" icon="pen-ruler" href="/transaction-monitoring/building-rules">
    Customize the copied template or build a rule from scratch.
  </Card>

  <Card title="Conditions reference" icon="code" href="/transaction-monitoring/conditions-reference">
    See every operator, entity, aggregation, and time window you can use in conditions.
  </Card>
</CardGroup>
