Skip to main content
POST
https://searchcompany-main.up.railway.app
/
api
/
domain
/
resubmit-sitemap
/
{org_id}
Resubmit Sitemap
curl --request POST \
  --url https://searchcompany-main.up.railway.app/api/domain/resubmit-sitemap/{org_id}
{
  "status": "<string>",
  "sitemap_submitted": true,
  "message": "<string>"
}

Overview

This endpoint resubmits the sitemap to Google Search Console to notify Google that new pages have been added. Called by the cron service after deploying new boosted pages.

Path Parameters

org_id
string
required
The organization identifier. Can be either:
  • Clerk organization ID (e.g., org_xxx)
  • Organization slug / business_id (e.g., acme-corp)
The cron service uses the org_slug (business_id).

Response

status
string
success, skipped, or error
sitemap_submitted
boolean
Whether the sitemap was successfully submitted
message
string
Success, skip reason, or error message

Example Responses

Success

{
  "status": "success",
  "sitemap_submitted": true,
  "message": "Sitemap resubmitted to Google Search Console"
}

Skipped (Not Verified)

{
  "status": "skipped",
  "sitemap_submitted": false,
  "message": "Domain not verified with Google. Complete verification first."
}

Prerequisites

The domain must already be verified with Google Search Console (google_verification_status = 'VERIFIED'). If the domain is not verified, the endpoint returns status: "skipped" (non-blocking for cron).

Database Updates

On success:
  • google_sitemap_submitted_at: Updated to current timestamp

Usage in Cron

# In Cron/src/jobs/boosted_pages.py
sitemap_result = await resubmit_sitemap(business_id)
if sitemap_result.get("status") == "success":
    print(f"📤 Google: Sitemap resubmitted")