---
title: "Create a sitemap"
method: POST
path: "/marketing/sitemaps"
tags: ["Admin Marketing: Search & SEO"]
---

# Create a sitemap

`POST /marketing/sitemaps`

## Request

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

Create a sitemap

## Request body

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

## Response `201`

Sitemap created. Use POST /generate to build the XML.

## Other responses

- `400`: Invalid input
- `422`: Validation failure.

## Changes

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

[Operation history](https://skmtc.dev/bagisto/apis/bagisto-admin-api/changes/marketing/sitemaps/post.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)
