---
title: "Update a sitemap"
method: PUT
path: "/marketing/sitemaps/{id}"
tags: ["Admin Marketing: Search & SEO"]
---

# Update a sitemap

`PUT /marketing/sitemaps/{id}`

## Request

- Base URL: `http://localhost:8000/api/admin`
- URL: `http://localhost:8000/api/admin/marketing/sitemaps/{id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/bagisto/apis/bagisto-admin-api/docs/marketing/sitemaps/:id/put.ts> (a function with typed inputs; its response is checked against the schema)

Update a sitemap

## Path parameters

- `id` string, required

## Request body

- object
  - `file_name` string
  - `path` string
  - `channels` integer[]

## Response `200`

Sitemap updated.

## Other responses

- `400`: Invalid input
- `404`: Sitemap not found.
- `422`: Validation failure.

## Changes

- **2026-08-27** `3c859f92343f`: 1 info
  - added the new optional request property `channels`

[Operation history](https://skmtc.dev/bagisto/apis/bagisto-admin-api/changes/marketing/sitemaps/:id/put.md)

---

[API](https://skmtc.dev/bagisto/apis/bagisto-admin-api.md) - [All operations](https://skmtc.dev/bagisto/apis/bagisto-admin-api/llms.txt) - [OpenAPI document](https://skmtc.dev/bagisto/apis/bagisto-admin-api/revisions/3198f11be70f?raw)
