Skip to main content
POST
Internal endpoint for the Cron service to batch deploy files to Vercel.
Terminology: The code uses “boosted” internally (e.g., boosted_path, BoostedPageMeta) while user-facing documentation uses “AI Articles”. Both refer to the same feature.
This endpoint deploys all files at once in a single Vercel deployment. It also syncs the FAQ section with AI articles from the database and regenerates sitemap.xml.

FAQ Sync: Auto-Add Missing AI Articles

When existing_posts OR new_posts is provided (along with business_name), this endpoint automatically:
  1. Checks the current homepage (index.js) for article sections
  2. Creates missing H3 sections (e.g., “Website Arena - Articles”, “Remix Tool - Articles”)
  3. Adds missing AI article links to each section
  4. Regenerates sitemap.xml with all AI articles
This ensures that even if an AI article was created but somehow missing from the FAQ section, it will be added on the next deployment.

Why Single Deployment?

Previously, each AI article triggered its own Vercel deployment. When creating 8 pages:
  • 8 parallel deployments to the same project
  • Vercel’s edge network gets overwhelmed
  • SSL errors (DECRYPTION_FAILED_OR_BAD_RECORD_MAC)
New approach:
  1. Generate all content in parallel (fast, no deployment)
  2. Collect all files + post metadata
  3. Single deployment with all files + auto-synced homepage/sitemap

Request Body

string
required
Vercel project name (e.g. “ai-website-arena”)
array
required
Array of AI article files to deploy. Each file must have: - path: File path (e.g. “public/expert-review/index.html”) - content: File content as string
string
required
AI site URL for internal navigation links (e.g. “https://website-arena-123.searchcompany.dev”)
string
required
Customer’s real domain for canonical URLs in sitemap (e.g. “https://www.websitearena.dev”)
string
Business name for homepage section headers (e.g. “Website Arena”). Required for FAQ sync.
array
List of product names for product-specific article sections
array
Array of newly created AI article metadata. Each post must have:
  • title: Post title
  • boosted_path: Path (e.g. “/expert-review/”)
  • published_date: ISO date (e.g. “2025-12-22”)
  • boosted_type: Type of post (optional, default: “article”)
  • faq_category: Category for homepage grouping (“business_boosted” or “product_boosted”)
  • product_name: Product name (required if faq_category is “product_boosted”)
array
Array of all existing AI articles from database. Used for:
  • FAQ sync (adding missing links to homepage)
  • Sitemap generation (include all AI articles)
Tip: Pass this even when not creating new posts to ensure FAQ stays in sync.
array
Optional array of paths to verify after deployment

Response

string
“success” or “error”
string
Vercel deployment URL
integer
Number of files deployed
array
Paths that were successfully verified as accessible

Auto-Generated/Updated Files

When existing_posts OR new_posts is provided (with business_name), this endpoint automatically:

Homepage FAQ Sync

The endpoint checks the existing index.js and:
  1. Creates missing H3 sections for each category with AI articles
  2. Adds missing links within each section
Article section links use ai_site_url for navigation (so they work on the deployed site). Sitemap URLs use source_url for SEO canonical references.

Deployment Process

  1. Collect files from request
  2. Preserve existing article sections when deploying new index.js
  3. Sync FAQ with AI articles (if existing_posts OR new_posts provided)
    • Create missing H3 sections
    • Add missing AI article links
  4. Regenerate sitemap with all URLs using source_url for canonical
  5. Upload all files to Vercel’s file store
  6. Create deployment with merged file list
  7. Wait for READY state (up to 5 minutes)
  8. Edge propagation wait (10 seconds)
  9. Verify paths are accessible (optional)

Error Handling

Workflow

Canonical URLs vs Navigation URLs

Important distinction:
  • source_url → Customer’s real domain for SEO (sitemap, data.json, llms.txt footer)
  • ai_site_url → Deployment URL for internal navigation (homepage links, FAQ links)
Links must work on the deployed site, so they use ai_site_url. Search engines should see the canonical domain, so sitemap uses source_url.