Skip to main content

Squillify development is paused indefinitely. Read why, and discover what this experiment achieved. Read the story

MicroSkills Reference

PII Masker

text.mask_pii

ProductionHeuristic (Class C)Deterministicbest-effortfastv1.0.0
File inputNo network

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

Note
We mask common PII patterns in your text — email, phone, credit card, IP, IBAN — using deterministic regex detectors with token or asterisk styles.

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

IdempotentRetry safeStreaming supportedFile input supportedRequires external service

Capabilities

text-processing

Cost & billing

Flat rate per invocation

MetercallsBillable onsuccessCost per call2 credits

File handling

Accepts file_refProduces file_refMax input1 MBMax file size1.9 MB

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.

LimitValueLimited by
Maximum size per input file1.9 MiBSkill maximum

How we handle your data

Sensitive processing
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.

Read the Microskill Data Handling Policy

Input schema

FieldTypeRequiredDescription
textstringNoBounded inline text source. Required unless file_ref is provided.
file_refstringNoTenant-scoped opaque text-file reference. Omit it to use the required inline text; never send both.
maskStylestringNoMask style; omit it for placeholder.
preserveLengthbooleanNoWhether masks preserve source length; omit it for false.
detectorsarrayNoBounded 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.
outputToFilebooleanNoWhether a large result is stored as a file; omit it for false.

Output schema

FieldTypeRequiredDescription
maskedTextstringNoMasked inline text when returned inline.
file_refstringNoStored masked-text reference when returned by file.
download_urlstringNoTemporary platform download URL when returned by file.
size_bytesintegerNoReturned UTF-8 byte size.
detectionCountintegerYesApplied PII replacement count.
countsByTypeobjectYesPurpose-bound detector-type count map. It contains from 0 through 64 detector-name count properties.
maskStylestringYesApplied PII mask style.
warningsarrayYesBounded warning array containing from 0 through 10000 items, where each item is one non-fatal advisory string.

API contract

POST /v1/execute
curl
curl -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"}}'
Integrations
TypeScript SDK
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

CodeHTTPRetryableDescription
VALIDATION_ERROR400NoThe request payload failed schema validation.
UNAUTHORIZED401NoMissing or invalid API key.
SKILL_NOT_ACCESSIBLE403NoThe API key is not granted access to this skill.
SKILL_NOT_AVAILABLE_FOR_PLAN403NoThis skill is not included in your current plan.
PLAN_ELIGIBILITY_UNAVAILABLE503YesPlan eligibility could not be decided. Retry after backoff.
SKILL_NOT_FOUND404NoThe requested skill or version does not exist.
TENANT_RATE_LIMITED429YesRequest rate limit exceeded. Retry after backoff.
QUOTA_EXCEEDED429YesPlan quota exhausted. Retryable once the quota period resets.
EXECUTION_TIMEOUT504YesExecution exceeded the allowed time budget.

Other limits

LimitValue
Recommended inline bytes32 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)

Request bodyjson
{
  "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

Inputjson
{
  "text": "Contact me at [email protected] or call 555-123-4567 regarding order #12345"
}
Expected outputjson
{
  "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

Inputjson
{
  "text": "Server 10.0.14.22 logged [email protected]",
  "preserveLength": true,
  "maskStyle": "asterisk"
}
Expected outputjson
{
  "warnings": [
    "PII detection is regex-based and not exhaustive"
  ],
  "detectionCount": 2,
  "countsByType": {
    "IP_ADDRESS": 1,
    "EMAIL": 1
  },
  "maskStyle": "asterisk",
  "maskedText": "Server ********** logged *****************"
}
Tip
Drop preserveLength and each value becomes a fixed four asterisks instead

File input with output to file

Inputjson
{
  "file_ref": "squillify://files/f-abc123def456",
  "outputToFile": true
}
Expected outputjson
{
  "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"
  ]
}
Tip
Output over 100 KB is stored for you, so maskedText is replaced by file_ref, download_url, and size_bytes
  • 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

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.

Tags

securitytext