Aveiro API
Authentication
Sites
List Sites
List Templates
Create Site
Pages
Create a Page
Delete a Page
List Pages
Reorder Pages
Update a Page
Site Media
Publish Site
Audience
Newsletter API Overview
Newsletter Campaigns
Social
Social API Overview
Social Accounts
Social Media
Social Posts
Social Performance
Website Mockup Video
TrademarkTrademark
Ctrl k
Search…
Sign up
Aveiro API
Authentication
Sites
List Sites
List Templates
Create Site
Pages
Create a Page
Delete a Page
List Pages
Reorder Pages
Update a Page
Site Media
Publish Site
Audience
Newsletter API Overview
Newsletter Campaigns
Social
Social API Overview
Social Accounts
Social Media
Social Posts
Social Performance
Website Mockup Video
Sponsored
Aveiro
aveiro.app
Sponsored
Aveiro
aveiro.app
TrademarkTrademark
AveiroBlogContact
© Aveiro. All rights reserved.
Built with Aveiro

Delete a Page

DELETE /api/v1/sites/{siteId}/pages/{contentId} — soft-delete a draft page.
Updated 2mo ago
Create a Page
List Pages
In short
DELETE /api/v1/sites/{siteId}/pages/{contentId} soft-deletes a page. The homepage (/index.mdx) cannot be deleted. Requires content:delete scope.

Request

DELETE /api/v1/sites/{siteId}/pages/{contentId} Authorization: Bearer av_live_…
Required scope: content:delete Use the page id from List pages or from a create/update response.

Example (curl)

curl -s -X DELETE 'https://help.aveiro.app/api/v1/sites/SITE_ID/pages/CONTENT_ID' \ -H 'Authorization: Bearer av_live_…'

Example (fetch)

const res = await fetch( `https://help.aveiro.app/api/v1/sites/${siteId}/pages/${contentId}`, { method: "DELETE", headers: { Authorization: `Bearer ${process.env.AVEIRO_API_TOKEN}` }, }, ); const body = await res.json();

Response

200 OK Deletion is a soft delete — the page is removed from list/get endpoints and the editor file tree. It does not unpublish live content that was already published; use the editor to unpublish if needed.

Homepage protection

The site homepage (/index.mdx) cannot be deleted. Attempts return: Update the homepage with PATCH instead.

Errors

HTTP
Code
When
401UNAUTHORIZEDToken missing or invalid
403FORBIDDENMissing content:delete, site access denied, or homepage delete
404NOT_FOUNDPage does not exist or was already deleted

Bulk cleanup pattern

To remove every page except the homepage (for example when re-seeding a docs site):
  • GET /api/v1/sites/{siteId}/pages
  • For each page where path !== "/index.mdx", call DELETE …/pages/{id}
  • POST new pages at the desired paths

Related

  • Create a page
  • List pages
  • List sites
{
  "deleted": true,
  "id": "343550cc-4b41-4beb-8082-f302766003cf",
  "path": "/old-page.mdx"
}
{
  "error": {
    "code": "FORBIDDEN",
    "message": "The homepage cannot be deleted"
  }
}