Skip to main content
The Blindfold REST API provides direct HTTP access to all privacy protection features. Use any programming language or HTTP client to integrate with Blindfold.

Base URL

Regional Endpoints

See Regions for details on data residency and region selection.

Authentication

All API requests require authentication using an API key in the X-API-Key header:

Getting Your API Key

  1. Sign up at app.blindfold.dev
  2. Navigate to API Keys in the dashboard
  3. Click Create API Key
  4. Copy and securely store your key
Keep your API key secure. Never commit it to version control or expose it in client-side code.

Request Format

All requests must:
  • Use Content-Type: application/json
  • Include the X-API-Key header
  • Send data as JSON in the request body

Response Format

All successful responses return JSON with:
  • text: The processed text
  • detected_entities: Array of detected entities (if applicable)
  • entities_count: Number of entities detected
  • Additional method-specific fields

Success Response (200 OK)

Error Response (4xx, 5xx)

Policy-Based Detection

Blindfold supports policy-based PII detection for simplified configuration and compliance. Instead of manually specifying entities and thresholds for each request, use pre-configured policies or create custom ones.

Available Global Policies

Using Policies in API Calls

All detection endpoints (/detect, /tokenize, /mask, /redact, /hash, /encrypt) support an optional policy parameter:
Using policies simplifies your code and ensures consistent PII detection across your application. Policies can be managed through the dashboard.

Batch Processing

All privacy method endpoints support batch processing — send multiple texts in a single request by using texts (array) instead of text (string). Configuration parameters (policy, entities, score_threshold) apply to all texts in the batch.

Batch Request Format

Batch Response Format

Batch Limits

You must provide either text (single) or texts (batch), not both. Each text in the batch must be non-empty.

Batch Example

Batch processing is available on all 7 privacy methods: tokenize, detect, redact, mask, synthesize, hash, and encrypt. The /detokenize and /discover endpoints do not support batch mode.

API Endpoints

Privacy Methods

Tokenize, mask, redact, hash, encrypt, synthesize

Utilities

Detokenization and health checks

Best Practices

Security, rate limiting, examples

Privacy Method Endpoints

These endpoints apply different privacy-preserving transformations to your text.

Method Comparison

Choose the right privacy method for your use case:
For AI applications: Use tokenize + detokenize to protect PII while maintaining context for the AI model.For compliance: Use policies like gdpr_eu, hipaa_us, or pci_dss to automatically apply the correct entity types and thresholds.

POST /detect

Detect PII in text without modifying it. Returns only the detected entities.
Request Body: Response:
Unlike other methods, /detect does not return a text field — it only returns the detected entities. Use this when you need to know what PII exists without transforming the text.

POST /tokenize

Replace sensitive data with reversible tokens. Returns a mapping to restore original values.
Request Body: Policy Usage Example:
Response:

Utility Endpoints

These endpoints provide utility functions and service information.

POST /detokenize

Restore original values from tokens using the mapping from /tokenize. Use with: /tokenize endpoint to complete the privacy-preserving workflow.
Request Body: Response:

POST /mask

Partially hide sensitive data (e.g., ****-****-****-1234).
Request Body: Response:

POST /redact

Permanently remove sensitive data.
Request Body: Response:

POST /hash

Replace data with deterministic hashes.
Request Body: Response:

POST /synthesize

Replace real data with realistic fake data.
Request Body: Response:

POST /encrypt

Encrypt sensitive data using AES encryption.
Request Body: Response:

GET /health

Health check endpoint.
Response:

Supported Entity Types

All detection endpoints support filtering by entity type using natural language names (lowercase). Blindfold supports 60+ pre-trained entity types.

View All Entities

See the complete list of 60+ entity types organized by category

Quick Reference

Personal Information

  • person - Person names
  • email / email address - Email addresses
  • phone number / mobile phone number - Phone numbers
  • date of birth - Birth dates
  • blood type - Blood type classification

Contact Information

  • address / postal code - Physical addresses and postal codes
  • landline phone number - Fixed-line phone numbers
  • fax number - Fax numbers

Financial

  • credit card number - Credit card numbers
  • credit card brand - Card issuer (Visa, Mastercard, etc.)
  • credit card expiration date - Card expiration dates
  • cvv / cvc - Card verification codes
  • bank account number - Bank account numbers
  • iban - International Bank Account Numbers
  • tax identification number - Tax IDs

Government IDs

  • social security number - Social security numbers
  • passport number - Passport numbers
  • driver's license number - Driver’s licenses
  • national id number - National ID cards
  • cpf - Brazilian individual taxpayer ID
  • cnpj - Brazilian company registry

Healthcare

  • health insurance number - Health insurance IDs
  • medical condition - Medical diagnoses
  • medication - Medication names
  • insurance company - Insurance provider names

Digital & Technical

  • ip address - IPv4 and IPv6 addresses
  • username - User identifiers
  • social media handle - Social media usernames

Travel & Transactions

  • flight number - Airline flight numbers
  • reservation number - Booking confirmations
  • transaction number - Transaction IDs

Registration

  • license plate number - Vehicle plates
  • student id number - Student IDs
  • serial number - Product serial numbers
See the complete list of 60+ entity types in the Supported Entities documentation.

Plans & Limits

The API returns a 429 Too Many Requests response when you exceed your plan limits. Implement retry logic with exponential backoff for production use.

Error Codes

Best Practices

1. Store API Keys Securely

2. Handle Rate Limits

Implement exponential backoff for rate limit errors:

3. Validate Responses

Always check the response status and handle errors:

4. Use Connection Pooling

For high-throughput applications, use connection pooling:

Complete Examples

Real-world integration patterns using the Blindfold REST API.

AI Integration

Complete tokenize → AI → detokenize workflow

Compliance

GDPR, HIPAA, PCI DSS policy usage

Example 1: AI Integration with GDPR Compliance

Example 2: Healthcare Data with HIPAA Policy

Example 3: Payment Card Data with PCI DSS Policy

Need Help?