List Sync Configurations
Authentication Required: PARENT role
GET /api/sync-configs
Response
Response Example
Unique sync configuration ID
Parent user ID who owns this configuration
PostgreSQL connection string for the external database
Whether continuous sync is enabled
Current sync status:
IDLE, IN_PROGRESS, COMPLETED, or FAILEDTimestamp of last successful sync (ISO 8601)
Error message if last sync failed
Get Sync Configuration
Authentication Required: PARENT role (must own the configuration)
GET /api/sync-configs/:id
Sync configuration ID
Response
Returns the sync configuration object (same format as list endpoint).Error Codes
404- Sync configuration not found403- Forbidden (configuration belongs to another parent)
Create Sync Configuration
Authentication Required: PARENT role
POST /api/sync-configs
PostgreSQL connection string for the target databaseFormat:
postgresql://username:password@hostname:port/databaseMust match the regex: ^postgresql:\/\/\w+:.*@[\w.-]+:\d+\/\w+(\?.*)?$Enable continuous synchronization (syncs on every data change)
Response
Response 201
Error Codes
400- Missing required field or invalid connection string format500- Failed to create sync configuration
Update Sync Configuration
Authentication Required: PARENT role (must own the configuration)
PUT /api/sync-configs/:id
Sync configuration ID
New PostgreSQL connection string (optional)
Update continuous sync setting (optional)
Response
Returns the updated sync configuration object.Error Codes
400- Invalid connection string format404- Sync configuration not found403- Forbidden (configuration belongs to another parent)
Delete Sync Configuration
Authentication Required: PARENT role (must own the configuration)
DELETE /api/sync-configs/:id
Sync configuration ID
Response
Returns204 No Content on success.
Error Codes
404- Sync configuration not found403- Forbidden (configuration belongs to another parent)500- Failed to delete configuration
Trigger Manual Sync
Authentication Required: PARENT role (must own the configuration)
POST /api/sync-configs/:id/push
Sync configuration ID
Response
Response 200
What Gets Synced
- User records (parents and learners)
- Learner profiles
- Lessons and quiz answers
- Points ledger and achievements
- Rewards and redemptions
Error Codes
404- Sync configuration not found403- Forbidden (configuration belongs to another parent)500- Sync already in progress or connection failed
Use Cases
Data Backup
Data Backup
Configure a sync to your own PostgreSQL database for complete data ownership and backup. Run manual syncs on a schedule (daily, weekly) or enable continuous sync for real-time backup.
Data Portability
Data Portability
Export all your family’s learning data to your own database before canceling service. The sync includes all lessons, progress, achievements, and points history.
Custom Analytics
Custom Analytics
Sync data to your own database to run custom SQL queries, build dashboards, or integrate with other tools. All data is in standard PostgreSQL format.
Multi-Instance Setup
Multi-Instance Setup
Sync data between a production Sunschool instance and a test/development instance for experimentation without affecting live data.