GET
Request GDPR data export

Overview

The user’s GDPR right of access entry point. Calling this enqueues a gdpr-export worker job that walks every collection the user owns, builds a single JSON blob, ZIPs it, uploads it to private object storage, and emails the user a 24-hour signed download link. The job runs out-of-band — this endpoint returns 202 Accepted immediately with a jobId the client can poll via export status. See GDPR data lifecycle for the full story (what’s included, what’s excluded, why we tombstone, the cron timing).
Rate limit: 1 successful export per 24h per user. A user whose latest export job is in PENDING, PROCESSING, or READY and whose requestedAt is within the last 24h will get 429 RATE_LIMITED with a retryAfterSec field. Failed exports (FAILED) do not count — a user whose export failed can retry immediately.

Authentication

Bearer <accessToken> (user scope) required. The route also gates on requireOnboarded — a user mid-onboarding cannot request an export (they have no listing data yet).

Path parameters

None.

Query parameters

None.

Request body

None — this is a GET.

Response — 202 Accepted

Error responses

Example error — 429 RATE_LIMITED

What’s in the ZIP

Listed in full on GDPR data lifecycle. At a glance:

Side effects

  • A gdpr_export_jobs row is created (status: PENDING, requestedAt: now).
  • A gdpr-export BullMQ job is enqueued onto the worker queue.
  • When no Redis/queue is wired (dev/test), an in-memory no-op enqueuer is used and the call still returns 202 — but the job will never complete in that mode.
  • On READY, the worker mints a 24h signed URL and emails the user. The polling endpoint will also mint a fresh signed URL on each call as long as the row hasn’t expired.

See also

curl

Postman

See docs/postman/swappr.postman_collection.json → Me → Request Export.