gsc_submit_sitemaps
Submit sitemaps to Google Search Console. Provide specific sitemap URLs or resubmit all previously recorded ones. Idempotent and safe for known sitemaps.
Instructions
Submit one or more sitemaps to Search Console (PUT, idempotent -- safe to resubmit an already-known sitemap).
sitemaps is an optional list of sitemap URLs; each is routed to its
covering property via the same host-matching gsc_check_status
uses. Omit it to resubmit every sitemap already on
record for every property (the same list gsc_list_sites carries
forward on refresh).
REFUSES TO GUESS: when sitemaps is omitted and the store has no
sitemap recorded for any property, this returns {"ok": False, "note": "No sitemaps known. Pass sitemaps=[...] explicitly."} rather than
trying /sitemap.xml -- submitting a URL nobody named is an
outward-facing action against the caller's Search Console property, and
a wrong guess leaves a permanent failed submission in their sitemap
list for no reason.
Returns a list of {"site", "sitemap", "http_status", "ok", "note"}
(api.submit_sitemap's shape) -- one entry per sitemap attempted, plus one
{"site": None, "sitemap", "http_status": None, "ok": False, "note"}
entry for any URL that matched no known property. Every successful
submission is recorded back onto its property's row (merged with,
never replacing, whatever sitemaps were already there), so a later bare
call resubmits it too.
On a missing, expired, or rejected token, returns {"ok": False, "error": "auth_required", "fix": ...} instead of raising, once real
work is about to start (nothing has been submitted yet at that point);
if no OAuth client is configured at all, {"ok": False, "error": "not_configured", "fix": ...}. Any other failure comes back as
{"ok": False, "error": "unexpected", "detail": <exception type>, "fix": ...}.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sitemaps | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |