Mask Data
AI-generatedSummary
Mask sensitive data in provided content
Inputs
- maskContent (required) — The content to scan for sensitive data; if detected it will be masked
- scanMode — Scan mode; sync for immediate results (2MB limit) or async for larger content (5MB limit) with polling
- aiModel — AI model identifier for metadata
- aiProfileOverride — Override the default AI profile using name or UUID
- applicationName — Application name for audit trails
- environment — Environment identifier for attribution (optional)
- maxPollingDuration — Maximum wait time for async scan completion (default 300000 ms)
- maxRetries — Maximum retry attempts for failed requests
- pollingInterval — Polling interval for async results (minimum 1000 ms)
- timeout — Request timeout in milliseconds
- transactionId — Custom transaction ID for tracking
- userId — User identifier for audit trails
Output shape
array of result objects containing operation metadata, original content, masked content, DLP detection flag, and audit information
Sync mode returns immediately; async mode returns after completion or timeout, may include retry logic
Examples
Example 1: Mask an SSN in a user-provided string
scanMode: sync, maskContent: "SSN: 123-45-6789", additionalOptions: {applicationName: "my-workflow"}
Example 2: Mask large document content asynchronously
scanMode: async, maskContent: "[large text]", additionalOptions: {maxPollingDuration: 600000, maxRetries: 5}
Example 3: Mask content with custom profile and environment tracking
scanMode: sync, maskContent: "Payment details: $500", additionalOptions: {aiProfileOverride: "production-profile", environment: "production", transactionId: "tx-001"}