Secure API: PII/PHI/KYC Database for User Records

This example demonstrates how to securely manage user records using our specialized API. It showcases how to:

  • Team Management: Create and manage team groups with role-based access control
  • Data Masking: Automatically mask sensitive data while exposing only the necessary fields
  • Bulk Operations: Secure listing of team members with automatic data protection
  • Access Control: Enable manager-level access with field-level security
  • Audit Trail: Track all access to team member data

ℹ️ All requests are executed in the sandbox environment (show/hide configuration).

Step 1: Create Team Group and Roles

Set up the team structure with manager and member roles.

Output (press on "Run code in sandbox" to see result):

Step 2: Create Team Members

Create multiple team members with various data fields.

Output (press on "Run code" to see result):

Step 3: Create Manager and Add to Team

Create a manager user and add them to the team with manager role.

Output (press on "Run code" to see result):

Step 4: Create Manager Access Policy

Create policy that allows managers to see team members' names and phones while masking other data.
✱ Access is granted only to name and phone number. All other fields will be masked.

Output:

Step 5: Initialize Bulk Operations

Get an unlock UUID token for bulk operations.
✱ The bulk unlock UUID is valid for only a few seconds and expires automatically. You must include it in every bulk* request.

Output:

Step 6: Create Manager Access Token

Create an access token for the manager to use in subsequent operations.

Output:

Step 7: List Team Members with Manager Token

Use manager's token to list team members, demonstrating data masking.
✱ Access is granted only to name and phone number. All other fields will be masked.

Output:

Step 8: Reset Access Token

Reset the API token back to the original admin token.

Output:

👋 Databunker team is here