PrivaBase API
Privacy compliance infrastructure for modern applications. GDPR, CCPA, HIPAA — automated.
Base URL: https://privacy-compliance-api.vercel.app/api/v1
Quick Start
1. Install the SDK
npm install privabase
2. Initialize
const { PrivaBase } = require('privabase');
const pb = new PrivaBase({ apiKey: 'your-api-key' });
3. Run a compliance check
const result = await pb.compliance.check({
jurisdiction: 'GDPR',
dataCategories: ['personal'],
processingPurposes: ['marketing'],
dataSubjects: 1000
});
console.log(result.data);
Authentication
PrivaBase supports two authentication methods:
JWT Bearer Token
Obtain a token via /auth/login or /auth/register, then pass it in the Authorization header:
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
API Key
Create an API key via the dashboard or /api-keys endpoint, then pass it as a header:
x-api-key: pk_live_your_key_here
SDKs
Node.js SDK
npm install privabase
Full API wrapper with TypeScript support. View on npm →
Browser Consent SDK
npm install @privabase/consent
Drop-in GDPR/CCPA cookie consent banner. View on npm →
import { PrivaBaseConsent } from '@privabase/consent';
new PrivaBaseConsent({ theme: 'dark', privacyPolicyUrl: '/privacy' }).show();
Auth — Register
Create a new account and receive a JWT token.
Request Body
{
"email": "user@example.com",
"password": "securePassword123",
"name": "Jane Doe"
}
Response
{
"data": {
"token": "eyJhbGciOi...",
"account": { "id": "...", "email": "user@example.com", "name": "Jane Doe" }
}
}
▶ Try it with curl
curl -X POST https://privacy-compliance-api.vercel.app/api/v1/auth/register \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","password":"securePassword123","name":"Jane Doe"}'
Auth — Login
Authenticate and receive a JWT token.
{
"email": "user@example.com",
"password": "securePassword123"
}
▶ Try it with curl
curl -X POST https://privacy-compliance-api.vercel.app/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email":"user@example.com","password":"securePassword123"}'
Auth — Get Account
Get the authenticated user's account details. Requires Bearer token.
▶ Try it with curl
curl https://privacy-compliance-api.vercel.app/api/v1/auth/me \
-H "Authorization: Bearer YOUR_TOKEN"
API Keys — Create
{ "name": "Production Key" }
▶ Try it with curl
curl -X POST https://privacy-compliance-api.vercel.app/api/v1/api-keys \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Production Key"}'
API Keys — List
▶ Try it with curl
curl https://privacy-compliance-api.vercel.app/api/v1/api-keys \
-H "Authorization: Bearer YOUR_TOKEN"
API Keys — Revoke
▶ Try it with curl
curl -X DELETE https://privacy-compliance-api.vercel.app/api/v1/api-keys/KEY_ID \
-H "Authorization: Bearer YOUR_TOKEN"
Compliance Check
Analyze data processing activities against regulatory frameworks.
{
"jurisdiction": "GDPR",
"dataCategories": ["personal"],
"processingPurposes": ["marketing"],
"dataSubjects": 1000
}
▶ Try it with curl
curl -X POST https://privacy-compliance-api.vercel.app/api/v1/compliance/check \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"jurisdiction":"GDPR","dataCategories":["personal"],"processingPurposes":["marketing"],"dataSubjects":1000}'
DSR — Create Request
Submit a Data Subject Request (access, deletion, portability, etc).
{
"type": "access",
"subject_email": "subject@example.com",
"framework": "gdpr"
}
▶ Try it with curl
curl -X POST https://privacy-compliance-api.vercel.app/api/v1/dsr/requests \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type":"access","subject_email":"subject@example.com","framework":"gdpr"}'
DSR — List Requests
▶ Try it with curl
curl https://privacy-compliance-api.vercel.app/api/v1/dsr/requests \
-H "Authorization: Bearer YOUR_TOKEN"
Documents — Templates
List 50+ privacy document templates. Template IDs are prefixed (e.g., pp-gdpr-full, pp-ccpa).
▶ Try it with curl
curl https://privacy-compliance-api.vercel.app/api/v1/documents/templates \
-H "Authorization: Bearer YOUR_TOKEN"
Documents — Generate
{
"template_id": "pp-gdpr-full",
"variables": {
"company_name": "Acme Inc",
"company_email": "privacy@acme.com",
"company_website": "https://acme.com",
"effective_date": "2026-01-01"
}
}
▶ Try it with curl
curl -X POST https://privacy-compliance-api.vercel.app/api/v1/documents/generate \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"template_id":"pp-gdpr-full","variables":{"company_name":"Acme Inc","company_email":"privacy@acme.com","company_website":"https://acme.com","effective_date":"2026-01-01"}}'
Discovery — Connectors
List available data source connectors.
Discovery — Classification Rules
Get PII classification rules used for data discovery.
Discovery — Frameworks
Get data mapping frameworks.
Discovery — Inventory
Get the data inventory.
Discovery — Workflows
Get alerts and scheduled workflows.
// Response
{ "data": { "alerts": [], "schedules": [] } }
HIPAA — Risk Assessments
HIPAA — Privacy Check
{ "entity_type": "healthcare_provider" }
▶ Try it with curl
curl -X POST https://privacy-compliance-api.vercel.app/api/v1/hipaa/privacy/check \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"entity_type":"healthcare_provider"}'
HIPAA — Training
HIPAA — BAA
HIPAA — PHI Detection
Detect Protected Health Information in text.
{ "text": "Patient John Smith SSN 123-45-6789" }
▶ Try it with curl
curl -X POST https://privacy-compliance-api.vercel.app/api/v1/hipaa/phi/detect \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"text":"Patient John Smith SSN 123-45-6789"}'
Policies — Templates
Policies — Generate
Generate a policy document. Types: privacy_policy, cookie_policy, dpa, retention_schedule.
{
"policy_type": "privacy_policy",
"frameworks": ["gdpr"],
"company_name": "Acme Inc"
}
▶ Try it with curl
curl -X POST https://privacy-compliance-api.vercel.app/api/v1/policies/generate \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"policy_type":"privacy_policy","frameworks":["gdpr"],"company_name":"Acme Inc"}'
Billing — Pricing
Get available plan tiers and pricing.
Billing — Customer
Create a Stripe customer for the authenticated account.
Get current customer details.
Billing — Usage
Record a usage event.
{ "metric": "api_calls", "quantity": 1 }
Get usage counters for the current billing period.
Enterprise — Evidence
Get compliance evidence records for auditing.
Enterprise — Monitoring
Get real-time compliance monitoring dashboard data.
Enterprise — Vendors
List third-party vendors and their compliance status.
Enterprise — Webhooks
List configured webhook endpoints.
Enterprise — Reports
Get compliance reports.
© 2026 PrivaBase. All rights reserved. | privabase.com