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
| Endpoint | Method |
|---|---|
/api/admin/marketing/sitemaps/{id} | PUT |
Details
- Requires an admin Bearer token and the
marketing.search_seo.sitemaps.editpermission. - 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
| Field | Type | Required | Notes |
|---|---|---|---|
file_name | string | no | Index file name — letters, digits, -, _, .; must end with .xml |
path | string | no | Where the index file is written — must start and end with /, no // |
channels | integer[] | no | Channel ids the sitemap covers. The list you send replaces the current one; omit it to keep the channels the sitemap already covers |

