Removes a submitted sitemap from a Search Console property (a change to the connected account).
curl -X POST "https://api.primaryapi.com/v1/run/search-console.delete_sitemap" \
-H "Authorization: Bearer $PRIMARYAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"siteUrl":"https://www.example.com/","sitemapUrl":"https://www.example.com/old-sitemap.xml"}'{
"output": {
"found": true,
"data": {
"deleted": true,
"siteUrl": "https://www.example.com/",
"sitemapUrl": "https://www.example.com/old-sitemap…"
}
},
"credits": 1
}Input and output
3 fields
https://www.example.com/.https://www.example.com/old-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.
It removes the sitemap from the property’s sitemap list in Search Console. The sitemap file on your server is not touched.
A sitemap that is not submitted is a miss with reason sitemap_not_found. So running it twice is safe.
A property the account cannot manage is a miss with reason no_access. Nothing changes.
The same key and credits work for every API.