Overview
After creating segments, populate them with audience data using two methods:- Real-time API - Live data streaming with immediate updates
- CSV Upload - Batch processing for larger datasets
Data Operations
All data operations use these commands:- ADD - Add segments to a key
- REM - Remove specific segments from a key
- DEL - Delete all segments from a key
- SET - Overwrite all segments for a key (replaces existing)
Method 1: Real-time API
API Endpoint
[seat]
- Brand agent seat ID[keydef]
- Key definition, either simple (maid
) or composite (domain,daypart
)
The keydef must match what the segment was configured with during creation.
Request Format
Send operations in the request body, one per line:Example Requests
Single Key Type (MAID):Method 2: CSV Upload
CSV File Format
CSV files use the same operation syntax:Alternative: Action in Filename
If CSV lacks the operation column, specify action in filename: Filenames:audience_add_20241201.csv
- ADD operationaudience_rem_20241201.csv
- REM operationaudience_del_20241201.csv
- DEL operationaudience_set_20241201.csv
- SET operation
Upload Process
For CSV file uploads, follow the Scope3 API documentation: Scope3 File Upload GuideData Retrieval
Check what segments are assigned to a key:All keys have a 30-day TTL. Keys not accessed within 30 days are automatically removed.
Best Practices
Real-time API
- Batch multiple operations in a single request when possible
- Use SET operations sparingly - they replace all existing segments
- Monitor API response codes for processing status
CSV Upload
- Use clear filenames indicating operation type and date
- Include header rows in CSV files
- Split large datasets into manageable batches
- Use gzip compression for large files (.csv.gz)
Data Management
- Regular cleanup using DEL operations for inactive keys
- Monitor the 30-day TTL for key retention
- Track segment record counts for billing purposes
Error Handling
Common scenarios:- Invalid keydef: Ensure keydef matches segment configuration
- Seat not found: Verify seat ID exists and is accessible
- Segment not found: Check segment exists for the specified seat
- Format errors: Validate operation syntax and CSV structure
Next Steps
After populating segments:- Data is processed and available for targeting within 15 minutes
- Monitor segment record counts via
signals/list
- Segments become available in campaign targeting options