CMS Page — Delete
Deletes a CMS page. Equivalent to DELETE /api/admin/cms/pages/{id}.
Replace the example id with a CMS page that exists in your store — adminCmsPages lists valid ids.
Operation
| Operation | Type |
|---|---|
deleteAdminCmsPage | Mutation |
Input
| Field | Type | Required | Notes |
|---|---|---|---|
id | ID! | yes | Resource IRI — /api/admin/cms/pages/{id}. |
What it returns
The mutation returns a snapshot of the deleted page, captured just before removal, so you can confirm what was deleted in the same round trip. The scalar fields all resolve — id, _id, urlKey, pageTitle, htmlContent, metaTitle, metaKeywords, metaDescription, locale. Select the fields you want to log or display.
Confirming success vs. failure
Select the message field to get the human-readable success confirmation ("CMS page deleted successfully."). The contract:
- Success →
data.deleteAdminCmsPage.adminCmsPageis non-null,messagecarries the confirmation, anderrorsis absent. - Failure →
data.deleteAdminCmsPageisnulland the reason is in the top-levelerrorsarray (page not found, no permission, or a deletion failure).messageis only populated on success.
(message is null on read / list / detail queries — it is an action result, meaningful only on the delete mutation.)
What Resolves on the Delete Payload
Scalars come from an in-memory snapshot taken before the row was removed, so urlKey, pageTitle, and the rest still resolve — and message carries the confirmation text, which it does not on a read.
The translations and channels connections are re-read from the database instead, and the rows are already gone by then, so both return empty edges. Capture per-locale content with the detail query before deleting if you need it.
Any 301 redirects created earlier by renaming the page's url_key are left in place — deleting the page does not remove them, so an old slug keeps redirecting to a URL that no longer resolves. Remove them through URL Rewrites if that matters.
Errors
| Condition | Result |
|---|---|
| Page ID not found | not-found error |
Admin role lacks cms.delete | permission error |

