๐Ÿ”’ PII Detection API

Secure RESTful API for Document PII Detection

Version 1.0

โœ… API Status: Operational

๐Ÿ“ก API Endpoints

POST Create Thread

/api/v1/thread_create.php

Create a new thread and receive authentication credentials.

POST Process File

/api/v1/process_file.php

Process a base64-encoded document and detect PII.

GET Thread Info

/api/v1/thread_info.php

Get information about a specific thread.

DELETE Delete Thread

/api/v1/thread_delete.php

Delete a thread and all associated data.

โœจ Features

๐Ÿ”

Secure Authentication

Private key per thread

โšก

Smart Caching

60-80% API reduction

๐Ÿ”’

Data Isolation

Complete segregation

๐Ÿ“Š

PII Detection

AWS Textract + Comprehend

๐Ÿ“š Documentation ๐Ÿงช Run Tests

๐Ÿš€ Quick Example

// 1. Create thread
const response = await fetch('/api/v1/thread_create.php', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({ metadata: { user_id: '12345' } })
});

const { thread_id, private_key } = await response.json();

// 2. Process file
await fetch('/api/v1/process_file.php', {
  method: 'POST',
  body: JSON.stringify({
    thread_id,
    private_key,
    file_data: base64FileData,
    file_name: 'document.pdf'
  })
});

For complete documentation, see README.md