Skip to content

Update Sitemap ​

Updates an existing sitemap — the Edit Sitemap action on the admin Marketing → Search & SEO → Sitemaps screen.

New here? Read the Sitemaps overview for what a sitemap does and how its fields behave.

Channels are replaced, not merged ​

Sending channels sets the sitemap's channels to exactly that list, so include every channel it should cover. Leaving it out keeps the current ones, which is what makes renaming a file safe.

Updating does not regenerate the XML ​

Editing the definition does not rebuild the XML files. Call the generate mutation explicitly after an update.

Operation ​

OperationTypePurpose
updateAdminMarketingSitemapMutationUpdate a sitemap definition

Details ​

  • Requires an admin Bearer token and the marketing.search_seo.sitemaps.edit permission.
  • Pass the sitemap's IRI as id. The update is a partial merge — send only the fields you want to change; omitted fields keep their existing values.
  • The mutation returns the full updated sitemap payload.

Input fields ​

FieldTypeRequiredNotes
idIDYesThe sitemap's IRI
fileNameStringNoIndex file name — letters, digits, -, _, .; must end with .xml
pathStringNoDirectory the index file lives in — must start and end with /, no //
channels[Int]NoChannel ids the sitemap covers. The list you send replaces the current one; omit it to keep the channels the sitemap already covers

Released under the MIT License.