PII Masker
text.mask_pii
Overview
Masks common PII patterns (email, phone, credit card, IP, IBAN) using deterministic regex detectors. Supports token and asterisk masking styles. Credit card validation uses Luhn check. Accepts file input via file_ref — no need to extract file content first.
Before you log or share text, we mask common PII patterns deterministically so redaction is reproducible and auditable — not left to model guesswork.
Reliability
BEST_EFFORT and deterministic for a fixed input and detector set — identical input always yields identical masked output. Pattern-based only; coverage is bounded to declared detectors and common (largely US/EU) formats. Expect false negatives for obfuscated values, unlisted formats, and names/addresses without patterns. An unrecognised maskStyle quietly falls back to token, so check the maskStyle and countsByType we echo back. Input validation (not retryable): neither text nor file_ref; both text and file_ref; text longer than 1,048,576 characters; detectors that is not an array of strings, or a detector name outside the five we know.
Context footprint
Accepts inline text up to ~1M chars or file input via file_ref (up to 2 MB). Upload files via POST /v1/files/upload before passing file_ref. Masked output exceeding 100 KB is automatically stored as a downloadable file. A successful call costs 2 execution credits.
When to use it
When you need to redact emails, phones, credit cards, IP addresses, or IBANs before logging, analytics, or third-party sharing.
Do not use as compliance-certified PII removal, for ML-based NER, or when you must catch context-dependent identifiers like personal names or street addresses.
Scope
Non-goals
- Not exhaustive PII detection — regex-based, may miss context-dependent PII
- Does not use ML/NLP-based detection or named entity recognition
- Not suitable as sole compliance mechanism — supplement with manual review
- Locale-bound: phone patterns are tuned for common North American formats and IBAN for European accounts; other national ID or phone schemes are not detected
Properties
Capabilities
Cost & billing
Flat rate per invocation
File handling
File limits
Constraints this skill applies to your input and generated files. The “Limited by” column shows the static source of each cap; none of these can be raised by upgrading your plan.
| Limit | Value | Limited by |
|---|---|---|
| Maximum size per input file | 1.9 MiB | Skill maximum |
How we handle your data
What this means
This skill is designed to detect, mask, redact, validate, or otherwise process sensitive data.
Squillify guarantees
- Runs inside Squillify
- This skill runs inside Squillify.
- Payloads are not sent to an external service by this skill.
- Squillify does not permanently store submitted payloads.
- Telemetry records metadata only, not submitted content.
- Submitted payloads are not used for training.
- Submitted payloads are not reviewed by humans.
- Targets sensitive data
- The response may contain submitted or transformed content.
Your responsibility
Squillify does not determine whether submitted content is sensitive. Your application is responsible for deciding what data it is allowed to submit. Your application is responsible for securing the response.
Input schema
| Field | Type | Required | Description |
|---|---|---|---|
| text | string | No | Bounded inline text source. Required unless file_ref is provided. |
| file_ref | string | No | Tenant-scoped opaque text-file reference. Omit it to use the required inline text; never send both. |
| maskStyle | string | No | Mask style; omit it for placeholder. |
| preserveLength | boolean | No | Whether masks preserve source length; omit it for false. |
| detectors | array | No | Bounded optional detector selector array; omit it to enable every supported PII detector. The item shape is defined by the nested schema and the array contains from 1 through 32 items. |
| outputToFile | boolean | No | Whether a large result is stored as a file; omit it for false. |
Output schema
| Field | Type | Required | Description |
|---|---|---|---|
| maskedText | string | No | Masked inline text when returned inline. |
| file_ref | string | No | Stored masked-text reference when returned by file. |
| download_url | string | No | Temporary platform download URL when returned by file. |
| size_bytes | integer | No | Returned UTF-8 byte size. |
| detectionCount | integer | Yes | Applied PII replacement count. |
| countsByType | object | Yes | Purpose-bound detector-type count map. It contains from 0 through 64 detector-name count properties. |
| maskStyle | string | Yes | Applied PII mask style. |
| warnings | array | Yes | Bounded warning array containing from 0 through 10000 items, where each item is one non-fatal advisory string. |
API contract
POST /v1/executecurl -sS -X POST "$BASE/v1/execute" -H "Authorization: Bearer $KEY" -H 'Content-Type: application/json' -d '{"skillKey":"text.mask_pii","input":{"text":"Email [email protected] or call 555-123-4567"}}'import { Squillify } from "@squillify/sdk";
const sq = new Squillify({ apiKey: process.env.SQUILLIFY_API_KEY });
const { output } = await sq.execute("text.mask_pii", {"text":"Contact me at [email protected] or call 555-123-4567 regarding order #12345"});Errors
| Code | HTTP | Retryable | Description |
|---|---|---|---|
| VALIDATION_ERROR | 400 | No | The request payload failed schema validation. |
| UNAUTHORIZED | 401 | No | Missing or invalid API key. |
| SKILL_NOT_ACCESSIBLE | 403 | No | The API key is not granted access to this skill. |
| SKILL_NOT_AVAILABLE_FOR_PLAN | 403 | No | This skill is not included in your current plan. |
| PLAN_ELIGIBILITY_UNAVAILABLE | 503 | Yes | Plan eligibility could not be decided. Retry after backoff. |
| SKILL_NOT_FOUND | 404 | No | The requested skill or version does not exist. |
| TENANT_RATE_LIMITED | 429 | Yes | Request rate limit exceeded. Retry after backoff. |
| QUOTA_EXCEEDED | 429 | Yes | Plan quota exhausted. Retryable once the quota period resets. |
| EXECUTION_TIMEOUT | 504 | Yes | Execution exceeded the allowed time budget. |
Other limits
| Limit | Value |
|---|---|
| Recommended inline bytes | 32 KiB |
Limitations
- Not exhaustive PII detection — regex-based, may miss context-dependent PII
- Does not use ML/NLP-based detection or named entity recognition
- Not suitable as sole compliance mechanism — supplement with manual review
- Locale-bound: phone patterns are tuned for common North American formats and IBAN for European accounts; other national ID or phone schemes are not detected
- Compliance-grade PII removal requiring legal certification
- Named entity recognition of people, organizations, or locations
- Detecting context-dependent PII like names or addresses without patterns
How to call
POST /v1/execute (requires authentication)
{
"skillKey": "text.mask_pii",
"input": {
"text": "Contact me at [email protected] or call 555-123-4567 regarding order #12345"
}
}Examples
Mask email and phone in support message
{
"text": "Contact me at [email protected] or call 555-123-4567 regarding order #12345"
}{
"warnings": [
"PII detection is regex-based and not exhaustive"
],
"detectionCount": 2,
"countsByType": {
"PHONE": 1,
"EMAIL": 1
},
"maskStyle": "token",
"maskedText": "Contact me at [EMAIL] or call [PHONE] regarding order #12345"
}Asterisks that keep the original width
{
"text": "Server 10.0.14.22 logged [email protected]",
"preserveLength": true,
"maskStyle": "asterisk"
}{
"warnings": [
"PII detection is regex-based and not exhaustive"
],
"detectionCount": 2,
"countsByType": {
"IP_ADDRESS": 1,
"EMAIL": 1
},
"maskStyle": "asterisk",
"maskedText": "Server ********** logged *****************"
}File input with output to file
{
"file_ref": "squillify://files/f-abc123def456",
"outputToFile": true
}{
"maskStyle": "token",
"file_ref": "squillify://files/f-masked-xyz789",
"download_url": "https://api.squillify.com/v1/files/f-masked-xyz789/download",
"detectionCount": 47,
"countsByType": {
"EMAIL": 23,
"PHONE": 15,
"IP_ADDRESS": 9
},
"size_bytes": 154200,
"warnings": [
"PII detection is regex-based and not exhaustive"
]
}Recommended use cases
- Redact PII from text before logging or storing in analytics systems
- Anonymize customer messages before sharing with third parties
- Sanitize training data by masking identifiable patterns
Avoid for
- Compliance-grade PII removal requiring legal certification
- Named entity recognition of people, organizations, or locations
- Detecting context-dependent PII like names or addresses without patterns
Related skills
Composable with
Safety & privacy
- Runs without calling any external service.
- Your payloads are never stored permanently.
- Telemetry captures metadata only — never your payload contents.
- We never train models on your payloads.
- No human reviews your payloads.