Create Sitemap
Creates a sitemap definition — the Create Sitemap action on the admin Marketing → Search & SEO → Sitemaps screen.
TIP
New here? Read the Sitemaps overview for what a sitemap does and how its fields behave.
Endpoint
| Endpoint | Method |
|---|---|
/api/admin/marketing/sitemaps | POST |
Details
- Requires an admin Bearer token and the
marketing.search_seo.sitemaps.createpermission. - Returns the full sitemap payload.
The XML is not built on save
Creating the row only registers the definition — generatedAt, indexFile, and generatedSitemaps stay empty. Call generate (POST /api/admin/marketing/sitemaps/{id}/generate) to build the XML files.
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
file_name | string | yes | Index file name — letters, digits, -, _, .; must end with .xml |
path | string | yes | Where the index file is written — must start and end with /, no // |

