Skip to main content

POST /api/domain/complete-google-verification/

Completes Google domain verification and submits the sitemap to Google Search Console.
Deprecated for Frontend UseThis endpoint is no longer called directly by the frontend. Google verification is now handled automatically in the backend during Step 2 completion via mark-step-complete.The backend polls for Google verification every 10 seconds for 2 minutes, giving DNS time to propagate after the user adds the TXT record in Step 1.This endpoint remains available for manual testing and the cron’s resubmit-sitemap flow.

Purpose

This endpoint performs three sequential steps:
  1. Verify domain ownership with Google Site Verification API
  2. Add the site to Google Search Console
  3. Submit the sitemap

New Flow (Backend-Driven)

Internal Services

verify_domain

Verifies domain ownership using the stored token. Location: src/app/shared/google_search_console.py

add_to_search_console

Adds the verified site to Google Search Console. Location: src/app/shared/google_search_console.py

submit_sitemap

Submits the sitemap.xml URL to Google Search Console. Location: src/app/shared/google_search_console.py

Response Fields

FieldTypeDescription
statusstring”success” or β€œerror”
verifiedbooleanWhether domain was verified
added_to_search_consolebooleanWhether site was added
sitemap_submittedbooleanWhether sitemap was submitted
messagestringHuman-readable status

Code Location

src/app/apis/domain/google_verification/routes.py