Data Masking API - Dart/Flutter Client

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.

pub package License: MIT

This is the Dart/Flutter client for the Data Masking API.

Installation

Add this to your pubspec.yaml:

dependencies:
  apiverve_datamasking: ^1.2.3

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage

import 'package:apiverve_datamasking/apiverve_datamasking.dart';

void main() async {
  final client = DatamaskingClient('YOUR_API_KEY');

  try {
    final response = await client.execute({
      'text': 'Contact John Doe at john.doe@email.com or call 555-123-4567. His SSN is 123-45-6789.'
    });

    print('Status: ${response.status}');
    print('Data: ${response.data}');
  } catch (e) {
    print('Error: $e');
  }
}

Response

{
  "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
    }
  }
}

API Reference

Authentication

All requests require an API key. Get yours at apiverve.com.

License

MIT License - see LICENSE for details.


Built with Dart for APIVerve

Libraries

apiverve_datamasking
Data Masking API client for Dart/Flutter