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.

Endpoint ​

EndpointMethod
/api/admin/marketing/sitemaps/{id}PUT

Details ​

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

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.

No auto-regeneration ​

Changing file_name / path does not rebuild the XML. Call generate (POST /api/admin/marketing/sitemaps/{id}/generate) to refresh the files.

Request body ​

FieldTypeRequiredNotes
file_namestringnoIndex file name — letters, digits, -, _, .; must end with .xml
pathstringnoWhere the index file is written — must start and end with /, no //
channelsinteger[]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.