Create Session From Extraction
user-extractions
Create Session From Extraction
Create an enrichment session from a saved extraction.
This endpoint converts an extraction (stored as JSON in Supabase storage) into a new enrichment session with associated dataset and dataset_rows.
Flow:
- Fetch user_extractions record (validate ownership)
- Download JSON from extraction-files bucket using storage_path
- Parse JSON array of lead objects
- Create processing_sessions record (pipeline_type=“enrichment”)
- Create datasets record (source_type=“extraction”)
- Create dataset_rows records (one per lead)
- Update user_extractions.session_id to link them
- Return session details
Args: extraction_id: The ID of the extraction to convert current_user: Authenticated user information cache: Redis cache instance settings: Application settings
Returns: CreateSessionResponse with session_id and metadata
Raises: HTTPException: If extraction not found, access denied, or processing fails
POST
Create Session From Extraction
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.