1. Install the SDK
2. Get your API key
Go to DataFerry Dashboard → Settings → API Keys → Create Key. Add it to your environment:3. Create a portal session
When a user clicks “Download My Data” in your app, create a session and redirect them:What happens next
- User lands on the portal
- They see what data is available (based on your schema config)
- They click “Download my data”
- Export runs in the background
- They get a ZIP file with clean, labeled CSVs
Configuration (done once in the dashboard)
Before the SDK works, you need to configure DataFerry in the dashboard:- Add a connection — Your database credentials (read-only)
- Scan schema — We detect your tables and relationships
- Confirm schema — Set labels, exclude sensitive columns
- Set tenancy mode — Single-tenant or multi-tenant
Single-tenant vs multi-tenant
Depending on your architecture, you will provide eitherscopeId or connectionId — not both.
Multi-tenant (most SaaS apps): Users share a database, filtered by user_id or organization_id.
Full example (Express)
Full example (Next.js App Router)
Next steps
- Concepts — How connections, schema, and exports work
- SDK Reference — All available methods
- Portal Customization — Add your logo and colors