Skip to content
Concepts

Consent and privacy

Consent purposes and how each is enforced, user data export, account deletion across modules, and how long AppCore keeps each kind of data.

On this page

AppCore stores a consent ledger for each user, gives users a self-service export and account deletion, and applies fixed retention windows to the data it holds. You are still the controller of your users' data. AppCore gives you the mechanisms, but which purposes need opt-in, what your privacy notice says and which policy_version applies are your decisions.

PurposeWhat it gatesDefault when the user never chose
optional_analyticsClient product telemetry (POST /v1/analytics/events)Accepted. Only an explicit withdrawn blocks intake.
marketing_pushEngagement (campaign) push and in-app messagesNot withdrawn, but engagement messages also need the user's notification preference engagement_enabled, which is off by default.
marketing_whatsappEngagement over WhatsAppBlocked. It requires an explicit granted.
marketing_emailMarketing emailRecorded only. Marketing email is not sent by AppCore at all (transactional email only).
personalizationRecorded, and available as a segment filterNo module changes behavior on it today.

Security and transactional messages (OTP codes, receipts, account notices) are not consent-gated. They are a separate category, and campaigns can never use it.

POST /v1/privacy/consent (consumer session):

JSON
{ "purpose": "marketing_push", "status": "granted", "policy_version": "privacy-2026-11" }
  • The ledger is append-only. Every change is a new record with purpose, status, policy_version, time, source and an evidence reference. The latest record per purpose wins.
  • Each change emits identity.consent.changed.v1. Messaging, engagement and analytics update their own copies, and the newest recorded_at wins even if events arrive out of order.
  • Signing in never creates marketing consent.
  • Consent given on a device as a guest is not carried over when the guest signs in to an account. Ask again, or record it again after sign-in.

Warning

Not yet enabled: reading consent back from the server. The contract has no consent read endpoint, so the SDK keeps a local display cache of the last choice made on that device, while the server ledger stays authoritative.

If your users must opt in to analytics (for example under GDPR or similar rules), gate telemetry in the app: do not send product events until the user agrees. The server treats "no record" as allowed for optional_analytics, including for guest installations that never recorded a choice.

Data export

  1. POST /v1/privacy/export requires a recent sign-in on this session (otherwise 401 REAUTHENTICATION_REQUIRED). It returns 202 with a Job. While a job is open, repeating the call returns the same job.
  2. The export is produced by the runtime's scheduled maintenance, up to 20 privacy jobs per tick.
  3. GET /v1/privacy/export/{job_id}/download streams a JSON attachment. It also requires recent sign-in on this session and is only for the owner. It answers 404 until the export is ready and 410 EXPORT_EXPIRED after 24 hours. Every download is audited. There is no public file URL.

The export contains the user profile (ID, display name, status, created time), linked sign-in methods without secrets or raw contact values, the full consent history, and retention notes.

Warning

Not yet enabled: exporting data held by other modules (purchases, entitlements and credit history, inbox, devices, analytics). The export covers identity data only. A user-facing job status endpoint (GET /v1/jobs/{job_id} in the contract) is also not served yet. Poll the download URL instead.

Account deletion

DELETE /v1/privacy/account requires recent sign-in on this session and returns 202 with a Job. Repeating it returns the same open job.

Diagram (Mermaid source)
flowchart LR
  D["DELETE /v1/privacy/account"] --> I["Immediately: status = deleting,<br/>all sessions revoked"]
  I --> E["identity.user.deletion_requested.v1"]
  E --> M["Messaging: unbind devices, purge inbox<br/>and preferences, cancel pending sends"]
  E --> G["Engagement: suppress pending campaign sends,<br/>never re-target"]
  E --> A["Analytics: suppress, delete raw event objects<br/>and per-user rows; keep anonymous aggregates"]
  I --> C["Identity cleanup (resumable steps):<br/>sessions → methods → devices → consents<br/>→ exports → profile tombstone"]
  • From the first request, the user can no longer sign in, even with a session that still exists, and no new events are accepted for them (subject_erased).
  • Identity keeps a tombstone with the immutable user_id, so retained records elsewhere still resolve. Personal fields are removed.
  • Financial records are kept in minimized form (purchases, refunds, journal entries), because tax and store obligations require them.
  • Store subscriptions are not cancelled. Apple or Google keeps billing until the user cancels in the store. Tell users this in your deletion screen and link to the store's subscription settings.
  • Analytics reports a user as physically_erased only once no raw object remains. Until then it reports suppressed.
  • Monthly active-user counts for already closed months are not lowered by a deletion.

Retention

DataKept for
OTP challengeValid 5 minutes. The raw destination is cleared once the challenge ends. Only a keyed hash of the code is stored.
Session30 days, or until logout, revocation, block or deletion
Rate-limit countersAbout 2 days
Idempotency records7 days by default
User export file24 hours
Raw client events (object storage)30 days
Event de-duplication keys30 days
Daily per-user activity rows90 days, folded into anonymous aggregates first
Monthly per-user activity rows400 days
Analytics report exports24 hours
Anonymous aggregates (no subject reference)Kept
Push device tokenDropped after 90 days without the device being seen (configurable 7–730). Revoked, unbound device rows are deleted after 30 days.
Purchases, refunds, finance journalKept (financial evidence)
Audit recordsKept

Warning

Not yet enabled: automatic expiry of delivery-attempt history and inbox items. No purge job exists for them yet, so they stay until account deletion.

Every privacy job records the retention policy version it ran under.

What this means for your app

  • Ask for consent in your own UI, then record it with POST /v1/privacy/consent, passing your current privacy-notice version as policy_version.
  • Gate analytics locally if your users must opt in. Withdrawal always works server-side.
  • Put "Export my data" and "Delete my account" in settings. Both need a fresh sign-in, so prompt for it first. The SDK can do the step-up.
  • On deletion, warn that store subscriptions continue until the user cancels them with Apple or Google.
  • Keep personal data out of event properties and template parameters. The server rejects it, and it would then fall outside the deletion flow.