---
title: "Bulk delete pages"
method: DELETE
path: "/projects/{projectId}/pages"
tags: ["Pages"]
---

# Bulk delete pages

`DELETE /projects/{projectId}/pages`

## Request

- Base URL: `https://studio.weaverse.io/api/v1/content`
- URL: `https://studio.weaverse.io/api/v1/content/projects/{projectId}/pages`
- Auth: HTTP bearer

Deletes page assignments in a project and soft-deletes each underlying page once it has no remaining live assignments; assignments for other locales or resources keep a shared page live. Only assignments in the project named in the URL are touched.

Identify up to 500 targets with one selector per request:

- `pageIds`: page ids, scoped to this project.
- `handles` + `type`: handles of one page type, with an optional `locale`. When `locale` is omitted the legacy `en-us` locale is used; an empty string is rejected. For custom pages, pass the exact handle from the pages list, including any `/`.

If both `pageIds` and `handles` are present and `pageIds` is an array, `pageIds` wins and `handles` is ignored.

A `handles` request naming an internal template-marker handle (`isTemplateMarker: true` on the pages list) is rejected with `400` and deletes nothing, so a bulk delete can never half-apply and strip a custom template's wiring. Delete such a template by its `pageIds` instead.

Deletion is consequential: resolve targets with the pages list first and, when acting through an agent, confirm them with the user. Use the response counts and handle lists to find misses (`notFound`) or per-page failures (`failed`).

Clients or CDNs that strip `DELETE` bodies may send `POST` to the same URL with the same body.

Required scope: `content:write` and `content:delete`. A credential with a stored scope list (any delegated grant or a shop API key minted with scopes) without `content:delete` gets `403 INSUFFICIENT_SCOPE` and nothing is deleted. Only shop API keys minted before scopes existed keep this endpoint's historical delete access.

## Path parameters

- `projectId` string, required

## Request body

- union
  - object
    - `pageIds` string[], required
  - object
    - `handles` string[], required
    - `type` string, required
    - `locale` string: Optional. Defaults to the stored default locale.

## Response `200`

Delete result with per-target accounting

- object
  - `object` 'page_delete'
  - `requested` integer
  - `deleted` integer
  - `notFound` integer
  - `failed` integer
  - `deletedHandles` string[]
  - `notFoundHandles` string[]
  - `failedHandles` string[]

## Other responses

- `400`: Invalid params
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Project not found
- `405`: Method not allowed

---

[API](https://skmtc.dev/weaverse/apis/weaverse-content-api.md) - [All operations](https://skmtc.dev/weaverse/apis/weaverse-content-api/llms.txt) - [OpenAPI document](https://skmtc.dev/weaverse/apis/weaverse-content-api/revisions/d189794169bb?raw)
