Choose the property
POST
/v1/sites/{id}/gsc/property
const url = 'https://api.overwatch.weareheavy.dev/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/gsc/property';const options = { method: 'POST', headers: {'x-api-key': '<x-api-key>', 'Content-Type': 'application/json'}, body: '{"property":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.overwatch.weareheavy.dev/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/gsc/property \ --header 'Content-Type: application/json' \ --header 'x-api-key: <x-api-key>' \ --data '{ "property": "example" }'Validated against a fresh list from the connected account - a property the account can’t read is refused. Arms the first sync. Owner/admin only.
Authorizations
Section titled “ Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”id
required
string format: uuid
The site’s UUID.
Request Bodyrequired
Section titled “ Request Bodyrequired ”Media typeapplication/json
object
property
required
string
Examplegenerated
{ "property": "example"}Responses
Section titled “ Responses ”The updated connection status.
Media typeapplication/json
A site’s Search Console connection, projected for display. The OAuth refresh token is sealed at rest and never appears in any response.
object
configured
required
Whether the server has a Google OAuth client configured.
boolean
status
required
string | null
googleEmail
required
string | null
property
required
string | null
analyticsSyncedAt
required
Epoch ms of the last analytics sweep, or null.
integer | null
error
required
string | null
Example
{ "status": "pending-property"}Missing property, or one the account doesn’t hold.
Media typeapplication/json
object
error
required
A human-readable error message.
string
Examplegenerated
{ "error": "example"}Missing or invalid credentials.
Media typeapplication/json
object
error
required
A human-readable error message.
string
Example
{ "error": "invalid api key"}Site not found, SEO app off, or not connected.
Media typeapplication/json
object
error
required
A human-readable error message.
string
Examplegenerated
{ "error": "example"}