Submits a sitemap to Google for a Search Console property (a change to the connected account).
curl -X POST "https://api.primaryapi.com/v1/run/search-console.submit_sitemap" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"siteUrl":"sc-domain:example.com","sitemapUrl":"https://www.example.com/sitemap.xml"}'{
"output": {
"found": true,
"data": {
"submitted": true,
"siteUrl": "sc-domain:example.com",
"sitemapUrl": "https://www.example.com/sitemap.xml"
}
},
"credits": 1
}Input and output
3 fields
sc-domain:example.com.https://www.example.com/sitemap.xml.3 fields
Good to know
Changes your account. This call creates, edits or deletes something in the connected account, live. Confirm before running it. With an Idempotency-Key it never runs twice, and monitors can’t schedule it.
WRITE: changes the connected Search Console account.
Needs the Manage Search Console capability. And the Google account needs enough permission on the property itself.
The sitemap URL must belong to the property.
Submitting the same sitemap again is safe (it is resubmitted, never duplicated).
Check processing later with search-console.sitemaps.
The same key and credits work for every API.