Skip to content

Delete Sitemap

Deletes a sitemap — the Delete row action on the admin Marketing → Search & SEO → Sitemaps screen. Removing a sitemap also deletes its generated index and per-batch XML files from storage.

TIP

New here? Read the Sitemaps overview for what a sitemap does and how its fields behave.

Operation

OperationTypePurpose
deleteAdminMarketingSitemapMutationDelete a sitemap

Details

  • Requires an admin Bearer token and the marketing.search_seo.sitemaps.delete permission.
  • Pass the sitemap's IRI as id. Use the list query to discover valid ids.

Confirm success via the absence of errors

The delete mutation returns a success acknowledgement, not the deleted sitemap's data — adminMarketingSitemap resolves to null on the payload. Treat a response with no errors[] as a successful delete. If you need a confirmation message in the body, use the REST endpoint (DELETE /api/admin/marketing/sitemaps/{id}), which returns { "message": "Sitemap deleted." }.

Input fields

FieldTypeRequiredNotes
idIDYesThe sitemap's IRI

Released under the MIT License.