> ## Documentation Index
> Fetch the complete documentation index at: https://docs.searchcompany.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Technical overview of the Start Google Verification endpoint

# POST /api/domain/start-google-verification/{org_id}

Gets a TXT verification token from Google Site Verification API. This runs in parallel with the SSL certificate flow during Step 1.

## Purpose

This endpoint:

1. Requests a verification token from Google
2. Returns the TXT record for the user to add via Entri
3. Stores the token for later verification (in Step 2)

## When It's Called

**Step 1 (Frontend):**

* Called in parallel with `/start-certificate`
* Both TXT records (SSL + Google) are shown to user via Entri
* User adds both records at once

**Step 2 (Backend):**

* `mark-step-complete` polls Google verification using the stored token
* This gives DNS time to propagate (up to 2 minutes of polling)

## Architecture

```mermaid theme={null}
flowchart TD
    A[Frontend: Step 1] --> B[Parallel API Calls]
    B --> C[start-certificate]
    B --> D[start-google-verification]
    C --> E[SSL TXT Record]
    D --> F[Google TXT Record]
    E --> G[Entri shows both records]
    F --> G
    G --> H[User adds both TXT records]
    H --> I[Step 2: mark-step-complete]
    I --> J[Backend polls Google verification]


## Internal Services

### get_verification_token
Requests a verification token from Google Site Verification API.

**Location:** `src/app/shared/google_search_console.py`

**Returns:**
- `token` - The verification token
- `name` - TXT record name (usually "@")
- `value` - TXT record value (e.g., "google-site-verification=xxx")

## Response Fields

| Field | Type | Description |
|-------|------|-------------|
| `status` | string | "success" or "error" |
| `txt_record` | object | Contains `name` and `value` for DNS |
| `message` | string | Error message if applicable |

## Parallel Execution

This endpoint is designed to be called in parallel with `/start-certificate` to minimize user wait time. Both TXT records can be added to DNS simultaneously via Entri.

## Code Location

```

src/app/apis/domain/google\_verification/routes.py

```
```
