Skip to content

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

EndpointMethod
/api/admin/marketing/sitemapsPOST

Details

  • Requires an admin Bearer token and the marketing.search_seo.sitemaps.create permission.
  • 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

FieldTypeRequiredNotes
file_namestringyesIndex file name — letters, digits, -, _, .; must end with .xml
pathstringyesWhere the index file is written — must start and end with /, no //

Released under the MIT License.