Overview
This is the main endpoint called during onboarding. It triggers all necessary background processes to set up a business and its products.
All processes run in parallel for maximum speed:
| Process | Description |
|---|
| A - Business Prompts | Generate 100 prompts + analyze visibility |
| B - Business Live Site | Create AI-optimized site at {business}.searchcompany.dev |
| C - Product Prompts | For each product: generate prompts + analyze visibility |
| D - Product Live Sites | For each product: create site at {product}.{business}.searchcompany.dev |
Domain Patterns
Business: nike-com.searchcompany.dev
Product: running-shoes.nike-com.searchcompany.dev (nested subdomain)
Request
The business website URL to analyze (e.g., https://nike.com)
Clerk organization slug, used as the business identifier
List of products to also process. Each product object contains: - item_id
(string, required): Unique product identifier (slug) - url (string,
required): Product page URL - name (string, optional): Product display name
Maximum pages to crawl per site
If true, recreate assets even if they already exist
Response
Returns immediately with acceptance status. All processing happens in background.
Always "accepted" on success
Details of what will be processed: - business.prompts_visibility: true -
business.live_identity: true - products: array of product processes
Example
Request
curl -X POST https://api.yourbackend.com/api/generate-all \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"url": "https://nike.com",
"org_slug": "nike",
"products": [
{
"item_id": "running-shoes",
"url": "https://nike.com/running-shoes",
"name": "Running Shoes"
},
{
"item_id": "air-jordan",
"url": "https://nike.com/air-jordan",
"name": "Air Jordan"
}
]
}'
Response
{
"status": "accepted",
"message": "Generate All started - processing in background",
"processes": {
"business": {
"prompts_visibility": true,
"live_identity": true
},
"products": [
{
"item_id": "running-shoes",
"prompts_visibility": true,
"live_identity": true
},
{
"item_id": "air-jordan",
"prompts_visibility": true,
"live_identity": true
}
]
}
}
What Gets Created
After processing completes (background):
For the Business
- 100 prompts in
business_prompts table
- Visibility analysis results in
visibility_tracker, visibility_scores, visibility_scores_history
- AI-optimized live site deployed to Vercel at
nike-com.searchcompany.dev
For Each Product
- 100 prompts specific to the product
- Visibility analysis for product-specific queries
- AI-optimized live site at nested subdomain (e.g.,
running-shoes.nike-com.searchcompany.dev)
Notes
- This endpoint returns immediately (fire-and-forget)
- Processing time varies: 30 seconds to several minutes depending on site size
- Check the dashboard for completion - data will populate as processes finish
- Products get their own isolated data (separate prompts, visibility scores, etc.)