API Overview
RESTful API
Standard HTTP methods (GET, POST, PUT, DELETE) with JSON request and response bodies
API Key Authentication
Secure API key authentication with role-based permissions and rate limiting
Webhook-ready API
Webhook patterns for compliance events, DSR status changes, and risk updates; availability is route-specific
Base URLs
https://api.privabase.com/v1Quick Start Guide
Get API Key
Generate an API key in your dashboard settings
Choose Environment
Use the production API for verified live calls; sandbox DNS is not currently advertised as live
Make First Request
Test authentication with a simple GET request
Handle Responses
Process JSON responses and handle errors properly
Authentication Example
curl -X GET "https://api.privabase.com/v1/account" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json"
Expected Response:
{
"id": "acc_123456789",
"name": "Your Company",
"plan": "professional",
"status": "active"
}API Categories
Data Mapping
Discover and map personal data across your systems
GET /api/v1/data-sourcesPOST /api/v1/data-discoveryGET /api/v1/data-mapConsent Management
Manage consent records and preferences
POST /api/v1/consentGET /api/v1/consent/recordsDELETE /api/v1/consentData Subject Requests
Process access, deletion, and portability requests
POST /api/v1/dsrGET /api/v1/dsr/statusPUT /api/v1/dsr/responseRisk Assessment
Create and manage privacy risk assessments
POST /api/v1/risk-assessmentsGET /api/v1/risksPUT /api/v1/risks/{id}Compliance Monitoring
Monitor compliance status and generate reports
GET /api/v1/compliance/statusGET /api/v1/reportsPOST /api/v1/auditsWebhooks
Real-time notifications for compliance events
POST /api/v1/webhooksGET /api/v1/webhooksPUT /api/v1/webhooks/{id}Common API Examples
Submit a Data Subject Request
Create a new DSR for access, deletion, or portability requests.
POST /api/v1/dsr
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"type": "access",
"subject_email": "user@example.com",
"subject_name": "John Doe",
"description": "Request for data access",
"due_date": "2026-03-18T00:00:00Z"
}{
"id": "dsr_123456789",
"status": "pending",
"type": "access",
"subject_email": "user@example.com",
"created_at": "2026-02-16T12:00:00Z",
"due_date": "2026-03-18T00:00:00Z",
"estimated_completion": "2026-02-25T12:00:00Z"
}Record User Consent
Store consent records for GDPR and CCPA compliance.
POST /api/v1/consent
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY
{
"user_id": "user_123456789",
"consent_types": [
"marketing",
"analytics",
"essential"
],
"granted": true,
"timestamp": "2026-02-16T12:00:00Z",
"ip_address": "192.168.1.100",
"user_agent": "Mozilla/5.0..."
}{
"id": "consent_123456789",
"user_id": "user_123456789",
"status": "recorded",
"consent_types": [
"marketing",
"analytics",
"essential"
],
"granted": true,
"recorded_at": "2026-02-16T12:00:00Z"
}Check Compliance Status
Get real-time compliance scores and framework status.
GET /api/v1/compliance/status Authorization: Bearer YOUR_API_KEY
{
"overall_score": 92,
"frameworks": {
"gdpr": {
"score": 94,
"status": "compliant",
"last_assessment": "2026-02-15T10:00:00Z"
},
"ccpa": {
"score": 89,
"status": "mostly_compliant",
"last_assessment": "2026-02-15T10:00:00Z"
}
},
"active_dsrs": 3,
"risk_level": "low"
}Rate Limits
Rate limit information is included in response headers: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
Error Responses
REST API today
Use any HTTP client.
PrivaBase is API-first, and no PrivaBase package is required to integrate. SDKs are planned after the REST contract and package publishing workflow are verified.
JavaScript fetch
Works in Node.js, Next.js route handlers, and browser apps that call your server-side proxy.
await fetch('/api/v1/dsr', { method: 'POST' })Python requests
Use standard HTTP clients while Python package support remains on the roadmap.
requests.get(f'{base_url}/api/v1/reports')cURL / CI jobs
Automate privacy and compliance workflows from scripts without waiting for a package release.
curl https://api.privabase.com/api/v1/reports
Need Help with Integration?
The AI Concierge helps you integrate PrivaBase APIs with examples, diagnostics, and setup checklists. Get code examples and integration guidance without a human support queue.