Sites

Verify a site or domain in Google Search Console

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.

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)

Request body

site_idstring 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.

domainstring

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).

tokenstring required

The verification token from Search Console: the value alone, google-site-verification=..., or the whole meta tag.

Response

What was added and what the user does next.

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_idstring nullable required
domainstring nullable required
propertystring required

What to enter in Search Console: sc-domain:<domain> for a domain property, or the address for a URL prefix property.

versioninteger nullable

The new site version with the tag (meta), when versions are on.

sitemapstring required

The sitemap to submit in Search Console under Sitemaps; the site serves it automatically.

next_stepsstring[] required

Changes

No recorded changes to this operation across all 1 revision of this API.