Skip to content

GDPR

intermediate

Manage consent, data export, erasure requests, and processing registry for GDPR compliance.

List consents

GET/v1/gdpr/consents

List all consent records for the authenticated user.

200Response
{
  "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}")

POST/v1/gdpr/consents

Grant consent for a specific processing purpose.

purposestringrequired

Consent purpose: memory_storage, analytics, marketing, or third_party_sharing.

expires_in_daysinteger

Optional consent expiration in days.

201Response
{
  "id": "consent_abc123",
  "purpose": "analytics",
  "granted": true,
  "granted_at": "2026-01-15T10:00:00Z",
  "expires_at": "2026-01-15T10:00:00Z"
}

DELETE/v1/gdpr/consents/{consent_id}

Revoke a previously granted consent.

consent_idstringrequired

The consent record ID (path parameter).

200Response
{
  "id": "consent_abc123",
  "purpose": "analytics",
  "revoked": true,
  "revoked_at": "2026-01-16T09:00:00Z",
  "impact": "Analytics data collection will stop within 24 hours"
}
Info

Revoking memory_storage consent triggers an automatic data erasure request. Your memories will be queued for deletion.


PATCH/v1/gdpr/consents/{consent_id}

Update consent settings (e.g., extend or shorten expiration).

expires_in_daysinteger

New expiration period in days from now.

200Response
{
  "id": "consent_abc123",
  "purpose": "analytics",
  "granted": true,
  "expires_at": "2026-06-15T10:00:00Z"
}

Request data export

POST/v1/gdpr/export

Request a full export of all your data (GDPR Article 20 — Right to data portability).

formatstringDefault: json

Export format: json or csv.

includearrayDefault: ['memories', 'metadata', 'causal_links', 'usage']

Data categories to include.

202Response
{
  "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

GET/v1/gdpr/export/{export_id}

Check the status of a data export request.

200Response
{
  "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"
}
Warning

Download links expire after 24 hours. Request a new export if the link has expired.


Request erasure

POST/v1/gdpr/erasure

Request permanent deletion of all your data (GDPR Article 17 — Right to erasure).

confirmbooleanrequired

Must be true to proceed. Safety check.

reasonstring

Optional reason for the erasure request.

202Response
{
  "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
  }
}
Danger

Erasure is permanent and irreversible after the execution date. You have 7 days to cancel the request.


Cancel erasure

POST/v1/gdpr/erasure/{erasure_id}/cancel

Cancel a pending erasure request before the execution date.

200Response
{
  "erasure_id": "era_abc123",
  "status": "cancelled",
  "cancelled_at": "2026-01-16T09:00:00Z"
}

Processing registry

GET/v1/gdpr/processing-registry

View the complete registry of how your data is processed (GDPR Article 30).

200Response
{
  "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