---
title: "Verify a site or domain in Google Search Console"
method: POST
path: "/search-console/verify"
tags: ["Sites"]
---

# Verify a site or domain in Google Search Console

`POST /search-console/verify`

## Request

- Base URL: `https://api.hypamoon.com/api/v1`
- URL: `https://api.hypamoon.com/api/v1/search-console/verify`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://app.hypamoon.com/oauth/authorize`, token URL `https://api.hypamoon.com/oauth/token`, scopes: `sites:write`)

Proves to Google Search Console that a site or domain belongs to the user, with the token from Search Console (the value alone, google-site-verification=..., or the whole meta tag). method dns adds the TXT record google-site-verification=<token> to a domain connected in this project with nameservers (Search Console property type Domain). method meta adds the meta tag to /index.html as a new site version labelled "search console verification" (property type URL prefix; also on <slug>.hypamoon.app). A site that is unlisted, behind a password or paid access, or offline is refused: Google cannot read it. Give site_id or domain. Calling it again with the same token changes nothing. Returns the property, the next steps for the user in Search Console and the sitemap to submit.

## Request body

- SearchConsoleVerifyInput
  - `site_id` string, uuid: The site to verify. For method meta this is the site that gets the tag; for dns the domain connected to this site is used.
  - `domain` string: A domain connected in this project (connect_domain), like example.com. For method dns; for meta, the site on this domain.
  - `method` 'dns' | 'meta', required: dns: a TXT record on the connected domain (a domain property in Search Console). meta: a meta tag on the home page (property type URL prefix).
  - `token` string, required: The verification token from Search Console: the value alone, google-site-verification=..., or the whole meta tag.

## Response `200`

What was added and what the user does next.

- SearchConsoleVerification
  - `method` 'dns' | 'meta', required
  - `status` 'added' | 'already_present' | 'waiting_for_approval', required: added: done now. already_present: it was there already. waiting_for_approval: the project needs a second person to approve the new version first.
  - `site_id` string, nullable, required
  - `domain` string, nullable, required
  - `property` string, required: What to enter in Search Console: sc-domain:<domain> for a domain property, or the address for a URL prefix property.
  - `record` object
    - `type` 'TXT', required
    - `name` string, required
    - `content` string, required
  - `version` integer, nullable: The new site version with the tag (meta), when versions are on.
  - `sitemap` string, required: The sitemap to submit in Search Console under Sitemaps; the site serves it automatically.
  - `next_steps` string[], required

## Other responses

- `400`: Bad Request: invalid_json.
- `401`: Unauthorized: unauthorized, missing_api_key, invalid_api_key, api_key_revoked, project_deleted.
- `403`: Forbidden: project_not_enabled, key_mode_mismatch, missing_scope, verification_required.
- `404`: Not Found: not_found.
- `409`: Conflict: conflict.
- `422`: Unprocessable Content: validation_failed.
- `429`: Too Many Requests: rate_limited.
- `500`: Internal Server Error: internal_error.
- `503`: Service Unavailable: service_unavailable.

---

[API](https://skmtc.dev/hypamoon/apis/hypamoon-api.md) · [All operations](https://skmtc.dev/hypamoon/apis/hypamoon-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hypamoon/apis/hypamoon-api/revisions/9f0b90004c06?raw)
