GDPR
intermediateManage consent, data export, erasure requests, and processing registry for GDPR compliance.
List consents
/v1/gdpr/consentsList all consent records for the authenticated user.
{
"consents": [
{
"id": "consent_abc123",
"purpose": "memory_storage",
"description": "Store and process memories for retrieval",
"granted": true,
"granted_at": "2026-01-15T10:00:00Z",
"expires_at": null
},
{
"id": "consent_def456",
"purpose": "analytics",
"description": "Anonymous usage analytics for service improvement",
"granted": true,
"granted_at": "2026-01-15T10:00:00Z",
"expires_at": "2026-01-15T10:00:00Z"
},
{
"id": "consent_ghi789",
"purpose": "marketing",
"description": "Product updates and feature announcements",
"granted": false,
"granted_at": null,
"expires_at": null
}
]
}import os
from engramma_cloud import EngrammaClient
client = EngrammaClient(api_key=os.environ["ENGRAMMA_API_KEY"])
consents = client.gdpr.consents()
for c in consents:
status = "granted" if c.granted else "not granted"
print(f"{c.purpose}: {status}")Grant consent
/v1/gdpr/consentsGrant consent for a specific processing purpose.
purposestringrequiredConsent purpose: memory_storage, analytics, marketing, or third_party_sharing.
expires_in_daysintegerOptional consent expiration in days.
{
"id": "consent_abc123",
"purpose": "analytics",
"granted": true,
"granted_at": "2026-01-15T10:00:00Z",
"expires_at": "2026-01-15T10:00:00Z"
}Revoke consent
/v1/gdpr/consents/{consent_id}Revoke a previously granted consent.
consent_idstringrequiredThe consent record ID (path parameter).
{
"id": "consent_abc123",
"purpose": "analytics",
"revoked": true,
"revoked_at": "2026-01-16T09:00:00Z",
"impact": "Analytics data collection will stop within 24 hours"
}Revoking memory_storage consent triggers an automatic data erasure request. Your memories will be queued for deletion.
Update consent
/v1/gdpr/consents/{consent_id}Update consent settings (e.g., extend or shorten expiration).
expires_in_daysintegerNew expiration period in days from now.
{
"id": "consent_abc123",
"purpose": "analytics",
"granted": true,
"expires_at": "2026-06-15T10:00:00Z"
}Request data export
/v1/gdpr/exportRequest a full export of all your data (GDPR Article 20 — Right to data portability).
formatstringDefault: jsonExport format: json or csv.
includearrayDefault: ['memories', 'metadata', 'causal_links', 'usage']Data categories to include.
{
"export_id": "exp_abc123",
"status": "processing",
"format": "json",
"estimated_time_minutes": 15,
"notify_email": "[email protected]",
"created_at": "2026-01-15T10:00:00Z"
}# Request export
export_req = client.gdpr.export(
format="json",
include=["memories", "metadata", "causal_links"]
)
print(f"Export ID: {export_req.export_id}")
print(f"ETA: {export_req.estimated_time_minutes} minutes")Check export status
/v1/gdpr/export/{export_id}Check the status of a data export request.
{
"export_id": "exp_abc123",
"status": "completed",
"format": "json",
"download_url": "https://exports.engramma-memory.com/exp_abc123.json.gz",
"download_expires_at": "2026-01-16T10:00:00Z",
"size_mb": 12.4,
"created_at": "2026-01-15T10:00:00Z",
"completed_at": "2026-01-15T10:12:00Z"
}Download links expire after 24 hours. Request a new export if the link has expired.
Request erasure
/v1/gdpr/erasureRequest permanent deletion of all your data (GDPR Article 17 — Right to erasure).
confirmbooleanrequiredMust be true to proceed. Safety check.
reasonstringOptional reason for the erasure request.
{
"erasure_id": "era_abc123",
"status": "scheduled",
"scheduled_at": "2026-01-15T10:00:00Z",
"execution_at": "2026-01-22T00:00:00Z",
"cancellation_deadline": "2026-01-21T23:59:59Z",
"data_affected": {
"memories": 4523,
"causal_links": 834,
"metadata_records": 4523,
"export_files": 2
}
}Erasure is permanent and irreversible after the execution date. You have 7 days to cancel the request.
Cancel erasure
/v1/gdpr/erasure/{erasure_id}/cancelCancel a pending erasure request before the execution date.
{
"erasure_id": "era_abc123",
"status": "cancelled",
"cancelled_at": "2026-01-16T09:00:00Z"
}Processing registry
/v1/gdpr/processing-registryView the complete registry of how your data is processed (GDPR Article 30).
{
"controller": "Engramma Memory Cloud SAS",
"dpo_contact": "[email protected]",
"processing_activities": [
{
"purpose": "Memory storage and retrieval",
"legal_basis": "consent",
"data_categories": [
"text content",
"metadata",
"usage patterns"
],
"retention": "Until account deletion or erasure request",
"recipients": [
"Internal processing systems"
],
"transfers_outside_eu": false
},
{
"purpose": "Service improvement and analytics",
"legal_basis": "legitimate_interest",
"data_categories": [
"anonymized usage statistics"
],
"retention": "24 months",
"recipients": [
"Internal analytics"
],
"transfers_outside_eu": false
}
],
"your_rights": [
"Right of access (Art. 15)",
"Right to rectification (Art. 16)",
"Right to erasure (Art. 17)",
"Right to restrict processing (Art. 18)",
"Right to data portability (Art. 20)",
"Right to object (Art. 21)"
]
}Next steps
- Security — Audit logs and session management
- Your Data Rights Guide — Exercise your GDPR rights step by step
- Errors — GDPR-related error codes