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

# Redaction Templates

> Create reusable sets of redaction patterns and presets, then reference them by slug in API calls.

Redaction templates let you save named sets of patterns and presets that can be applied to any PDF with a single slug reference. Instead of specifying the same patterns in every API call, define them once and reuse them.

***

## Creating a Template

In the dashboard, navigate to **Redaction** in the sidebar. Click **New Template** to create a template with:

* **Name**: Human-readable label (e.g., "HIPAA Patient Record")
* **Slug**: URL-safe identifier, auto-generated from the name (e.g., `hipaa-patient-record`)
* **Description**: Optional notes about what this template redacts
* **Presets**: Check the built-in patterns to include (SSN, email, phone, date of birth, credit card)
* **Custom patterns**: Add literal strings or regex patterns specific to your use case

***

## Available Presets

| Preset        | Matches                                      |
| ------------- | -------------------------------------------- |
| SSN           | US Social Security Numbers (XXX-XX-XXXX)     |
| Email         | Email addresses                              |
| Phone         | US phone numbers                             |
| Date of Birth | Date patterns (MM/DD/YYYY, YYYY-MM-DD, etc.) |
| Credit Card   | Credit card numbers                          |

***

## Using Templates via API

Reference a template by its slug in the `POST /v1/redact` request:

```json theme={null}
{
  "pdf": "<base64>",
  "template": "hipaa-patient-record"
}
```

### Combining with Inline Patterns

Templates can be combined with additional patterns and presets in the same request. All sources are merged:

```json theme={null}
{
  "pdf": "<base64>",
  "template": "hipaa-patient-record",
  "patterns": [
    {"pattern": "Dr. Smith", "pattern_type": "Literal"}
  ],
  "presets": ["credit-card"]
}
```

The template's patterns and presets are expanded and merged with the inline patterns and presets. Duplicates are not applied twice.

***

## Loading in the Dashboard

When editing a document in the Document Editor, switch to **Search** mode in the Redact panel. Use the **Load template** dropdown to apply a saved template's patterns to the current document.

***

## Managing Templates

Templates are scoped to your user account (or organization on Team+ plans). You can:

* **List** all templates from the dashboard Redaction page
* **Edit** a template to update its patterns, presets, or description
* **Delete** templates that are no longer needed

Templates are also available via the [resource listing API](/api-reference/render#list-redaction-templates).

***

<Note>Redaction templates require the hosted API. Self-hosted users should pass `patterns` and `presets` directly in each request.</Note>

***

## Related

* [Redaction](/concepts/redaction) — how Forme redaction works
* [Redact API](/api-reference/redact) — endpoint reference
