Redact / Masking / Placeholder
Redaction is the strictest Guardian Layer output style. Instead of replacing sensitive values with readable alternatives, it hides detected values with masking marks.
Use this page when you want to understand the difference between readable transformation and visible masking.
Redact vs Masking vs Placeholder
These terms are closely related, but they are useful in slightly different ways.
| Term | What it means in this context | Example output |
|---|---|---|
| Redact | Hide the detected sensitive value. | Dr. ***** called *****. |
| Masking | The visible masking style used by redaction. | ***** |
| Placeholder | A label-style replacement that describes the entity type. | [PERSON], [PHONE_NUMBER] |
In the current Guardian Layer API, redaction is selected with masking_type: "redact" on the text de-identification endpoint.
Placeholder-style output is useful for documentation and product design discussions, but it should not be treated as a separate request mode unless it is exposed by the API.
When to Use Redact
Use redact when you want to:
- Clearly show that sensitive data was removed or hidden.
- Avoid generating replacement values that could be mistaken for real data.
- Review sensitive content in a compliance or audit workflow.
- Build a safer first pass before deciding whether transformed output is appropriate.
Use transform instead when you need readable de-identified text that still feels natural.
Endpoint
POST /api/v1/deidentify/text/proprietary/outputs
Redaction uses the same endpoint as Transform. The difference is the masking_type value.
Request
Set masking_type to redact.
{
"text": "Dr. Emily Chen called Alex at 555-0100 about the appointment in Auckland.",
"domain": "General",
"pca_dimension": 2,
"masking_type": "redact",
"pii_entities": ["PERSON", "PHONE_NUMBER", "LOCATION"]
}
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | The input text you want to de-identify. |
domain | string | No | Detection domain. Supported values are General, Medical, Finance, and Custom. Defaults to General. |
pca_dimension | integer | No | Detection setting used by the endpoint. Supported values are 1, 2, and 3. Defaults to 2. |
masking_type | string | Yes | Use redact to replace detected sensitive values with masking marks. |
pii_entities | array | No | Limits which entity categories are redacted. Omit this field, pass an empty list, or pass ["ALL"] to process all supported entities. |
For supported entity values, see Supported Entities.
Response
The response shape is the same as Transform. In redaction mode, the returned outputs may contain the same redacted text.
{
"original_text": "Dr. Emily Chen called Alex at 555-0100 about the appointment in Auckland.",
"outputs": [
{
"id": 1,
"text": "Dr. ***** called ***** at ***** about the appointment in *****."
},
{
"id": 2,
"text": "Dr. ***** called ***** at ***** about the appointment in *****."
}
],
"mode": "PROPRIETARY_OUTPUTS",
"meta": {
"masking_type": "redact",
"domain": "General",
"pca_dimension": 2
}
}
Choosing the Right Output Style
| Need | Recommended mode |
|---|---|
| Make sensitive content unreadable | redact |
| Preserve a natural-looking sentence | transform |
| Create sample data for demos or AI workflows | transform |
| Make removed values obvious to reviewers | redact |
Show entity labels such as [PERSON] | Placeholder-style output, if supported by your implementation |
Notes
- Redaction hides detected sensitive values with masking marks.
- Entity filtering works the same way as Transform.
- The API response still uses the
outputsarray, even when both redacted outputs are identical. - Redaction is usually easier to audit because hidden values are visually obvious.
- Placeholder-style labels should be documented separately if they become an exposed API option.