Skip to main content
Privacy policies catch sensitive user information before it reaches your database, public feed, or other users. They cover detection (does this content contain PII?) as well as masking (redact it from the stored content).

Policies

idTypeSupportedWhat it does
personal_informationclassifiertext, audioFlags content that contains emails, phone numbers, addresses, or other sensitive numbers.
intent_to_shareclassifiertext, audioFlags attempts to share contact details — directly or obfuscated (e.g. “find me on Instagram”).
piientity_matchertext, audioExtracts specific PII entities (email, phone, address, etc.) and can return masked content with those entities redacted.

Reading the result

const pii = response.policies.find(p => p.id === "pii");

pii?.matches?.forEach(match => {
  console.log(`${match.match} at ${match.span[0]}${match.span[1]}`);
});

if (response.content.masked) {
  await store(response.content.modified); // PII redacted
}
See Understanding API responses for the full response shape and masking behavior.