Data Masking API

POST

Strip personal details, credit cards, and SSNs from raw text.

Data Masking redacts sensitive data like emails, phone numbers, payment cards, IP addresses, and dates using placeholder tokens. It returns the sanitized string and detection counts for each pattern found.

Try it — live request, no key required

Request
POSTapi.apiverve.com/v1/datamasking
Body
Verification
Format

No key required to try it. Get a key to use it in your app.

Example
{
  "status": "ok",
  "error": null,
  "data": {
    "masked": "Contact John Doe at [EMAIL] or call [PHONE]. His SSN is [SSN].",
    "detected": {
      "email": 1,
      "phone": 1,
      "ssn": 1,
      "credit_card": 0,
      "ip_address": 0,
      "url": 0,
      "date": 0
    }
  }
}

About the Data Masking API

Data Masking works by scanning text for sensitive data patterns and replacing them with masked placeholders. Returns both the masked text and detection statistics for multiple data types.

What people use it for

GDPR Compliance
Automatically mask PII in logs, documents, and communications to comply with GDPR and privacy regulations
Data Anonymization
Anonymize sensitive customer data in datasets before sharing with third parties or using for testing
Log Sanitization
Remove sensitive information from application logs and error messages before storing or analyzing
Content Moderation
Mask sensitive data in user-generated content, support tickets, or public forums to protect privacy

Ways to call it

One endpoint, many ways in — REST with JSON, XML, YAML and CSV, plus GraphQL and an MCP interface for AI agents.

JSON
Default REST response
XML
Markup format
YAML
Human-readable
CSV
Tabular export
Beta
GraphQL
Query language
New
MCP
For AI agents

Other ways to use Data Masking

Same data, same APIVerve account, same credit balance — one key works on all of them.

Questions.

Common questions about the Data Masking API.

Read the docs →
What types of sensitive data can be detected and redacted?
It detects and redacts emails, phone numbers, Social Security numbers, credit card numbers, IP addresses, URLs, and dates. Each identified item is replaced with a clear masking placeholder in the returned text.
What would redacting 10,000 text snippets a month cost me?
At 10 credits per call, 10,000 requests require 100,000 credits, which uses half of the Starter plan's 200,000 monthly credits. That works out to about $0.0015 per call, or $1.50 per 1,000 requests. The Free plan includes 20 calls per month for testing.
Can I choose which specific data types to mask on the Free plan?
Selecting specific data types to mask requires a paid plan. On the Free plan, Data Masking automatically redacts all supported data types across your text. Upgrading to Starter or above unlocks the types parameter so you can restrict masking to only chosen categories.
Does the response tell me how many items were redacted?
Yes, every response returns an object with detection counts alongside the masked text. It breaks down the exact count for each category, including email addresses, phone numbers, SSNs, credit cards, IP addresses, URLs, and dates.
What does the response look like if no sensitive data is found?
The masked text will match your input string exactly without changes. The detection count statistics will simply show zero for each individual data category.

Ready to build with Data Masking? Start with 200 free credits — one key unlocks all 300+ APIs.

Explore the catalog

300+ APIs on the same key and the same response shape.

Browse all APIs