Overview
The GDPR Compliance API provides endpoints that implement data subject rights under the General Data Protection Regulation (GDPR). These endpoints enable users to exercise their privacy rights including access, rectification, erasure, data portability, and consent management.All GDPR endpoints require user authentication and operate on the authenticated user’s data only. These endpoints are designed to meet EU GDPR compliance requirements (Articles 15-21).
Base URL
Endpoints
Get User Data (Article 15: Right to Access)
GDPR Article 15: The data subject shall have the right to obtain from the controller confirmation as to whether or not personal data concerning him or her are being processed, and access to the personal data. Request:Export User Data (Article 20: Right to Data Portability)
GDPR Article 20: The data subject shall have the right to receive the personal data concerning him or her in a structured, commonly used and machine-readable format. Query Parameters:format(string, optional): Export format -jsonorcsv. Default:json
Update User Profile (Article 16: Right to Rectification)
GDPR Article 16: The data subject shall have the right to obtain from the controller without undue delay the rectification of inaccurate personal data concerning him or her. Request Body:name(string): User’s full name (1-100 characters)email(string): User’s email addresspreferences(object): User preferences and settings
Delete User Account (Article 17: Right to Erasure)
GDPR Article 17: The data subject shall have the right to obtain from the controller the erasure of personal data concerning him or her without undue delay. Query Parameters:confirm(boolean, required): Must betrueto confirm deletion
- User profile and account
- All sessions
- All conversations and messages
- All preferences and settings
- All authorization tuples (OpenFGA)
- All consent records
- Audit logs (user_id replaced with cryptographic hash)
Update Consent (Article 21: Right to Object)
GDPR Article 21: The data subject shall have the right to object at any time to processing of personal data concerning him or her. Request Body:analytics: Analytics and usage trackingmarketing: Marketing communications and promotionsthird_party: Third-party data sharingprofiling: Automated profiling and decision-making
Get Consent Status (Article 21: Right to Object)
Request:Authentication
All GDPR endpoints require authentication. Include a valid JWT token in theAuthorization header:
Error Responses
GDPR endpoints return standard HTTP status codes:SDK Examples
Python
JavaScript/TypeScript
cURL
Storage Backend Configuration
GDPR compliance data is stored in PostgreSQL for production deployments. Configure the storage backend in your environment:Compliance Notes
GDPR Compliant: These endpoints implement EU GDPR requirements for data subject rights (Articles 15-21).
- User ID
- Timestamp
- IP address (where applicable)
- GDPR article reference
- Consent records: Retained indefinitely (append-only audit trail)
- Deletion records: Retained for 7 years for compliance
- Anonymized audit logs: Retained for compliance (user IDs hashed)
- Right to Access: Immediate (real-time API response)
- Right to Erasure: Immediate (synchronous deletion)
- Data Export: Immediate for JSON, may take longer for large CSV exports
Next Steps
GDPR Storage Setup
Configure PostgreSQL storage for GDPR compliance
Authentication
Get authentication tokens
GDPR Compliance Guide
Complete GDPR compliance implementation guide
Architecture Decision
ADR-0041: PostgreSQL GDPR Storage
Privacy First: Empower users with full control over their personal data!