Skip to main content
POST
https://searchcompany-main.up.railway.app
/
api
/
domain
/
complete-google-verification
/
{org_id}
Complete Google Verification
curl --request POST \
  --url https://searchcompany-main.up.railway.app/api/domain/complete-google-verification/{org_id}
{
  "status": "<string>",
  "verified": true,
  "added_to_search_console": true,
  "sitemap_submitted": true,
  "message": "<string>"
}

Overview

This endpoint completes the Google Search Console verification process after the user has added the TXT record via Entri. Call this endpoint in parallel with /complete-certificate after the user has added both TXT records.

Steps Performed

  1. Verify domain ownership with Google Site Verification API
  2. Add site to Google Search Console
  3. Submit sitemap (/sitemap.xml) to Google

Path Parameters

org_id
string
required
The Clerk organization ID (e.g., org_xxx)

Response

status
string
success or error
verified
boolean
Whether domain ownership was verified
added_to_search_console
boolean
Whether the site was added to Search Console
sitemap_submitted
boolean
Whether the sitemap was submitted
message
string
Success or error message

Example Response

{
  "status": "success",
  "verified": true,
  "added_to_search_console": true,
  "sitemap_submitted": true,
  "message": "Domain verified and sitemap submitted to Google Search Console"
}

Database Updates

On success, the following columns are updated in ai_sites:
  • google_verification_status: Set to VERIFIED
  • google_sitemap_submitted_at: Current timestamp
On failure:
  • google_verification_status: Set to FAILED

Prerequisites

Must call /start-google-verification/{org_id} first to get the TXT record token.