Start import
Permission:
subscribers:import
Request Body
CSV or ZIP file containing subscriber data (multipart/form-data)
JSON string with import parameters
Import Parameters (params)
Import mode:
subscribe: Import and subscribe to listsblocklist: Import and blocklist subscribers
Array of list IDs to subscribe/manage (filtered by user permissions)
Status for new subscriptions:
unconfirmed: Requires opt-in confirmationconfirmed: Active subscriptionunsubscribed: Unsubscribed status
unconfirmed for subscribe mode, unsubscribed for blocklist modeCSV delimiter character (must be a single character)
If true, updates existing subscribers with imported data
CSV Format
The CSV file must have a header row with the following columns: Required columns:email: Email address (required)
name: Subscriber namestatus: Subscriber status (enabled,disabled,blocklisted)attributes: JSON object with custom attributes
Response
Returns the import status object
Get import status
Permission:
subscribers:import
Response
Get import logs
Permission:
subscribers:import
Response
Returns import log messages as plain text
Stop import
Permission:
subscribers:import
Response
Returns the updated import status
Import Examples
Subscribe Mode
Import subscribers and add them to lists:Blocklist Mode
Import and blocklist email addresses:Update Existing Subscribers
Update subscriber data with overwrite:Import from ZIP
Import multiple CSV files from a ZIP archive:When importing from ZIP, only the first CSV file in the archive is processed.
Monitoring Import Progress
Poll the import status endpoint to monitor progress:Import Behavior
New Subscribers
- Creates new subscriber records
- Subscribes to specified lists
- Sets the specified subscription status
Existing Subscribers
Without overwrite (overwrite: false):
- Skips existing subscribers
- Logs as “already exists”
overwrite: true):
- Updates name if provided
- Updates attributes (merges with existing)
- Updates status if provided
- Adds to new lists without removing from existing lists
Attributes Handling
Attributes in CSV must be valid JSON:- New attributes are merged with existing
- Existing attribute values are updated
- Attributes not in CSV are preserved
Validation and Errors
Email Validation
- Email addresses are validated and sanitized
- Invalid emails are skipped and logged
- Duplicate emails in the CSV are ignored
Common Errors
Invalid file format:Performance Considerations
Batch Size
Imports are processed in batches (default batch size configured by admin). Large imports may take time.Concurrent Imports
Only one import can run at a time. Wait for the current import to finish before starting a new one.Resource Usage
- Large CSV files are processed line-by-line to minimize memory usage
- Database writes are batched for efficiency
- Import progress is persisted and can survive server restarts
Best Practices
- Test with small files first: Validate CSV format with a small sample
- Clean data: Remove duplicates and invalid emails before import
- Use compression: ZIP large CSV files to reduce upload time
- Monitor logs: Check logs for errors and warnings
- Schedule imports: Run large imports during off-peak hours