Clear Notion Page
API Reference
Clear Notion Page
Archive all top-level blocks from a Notion page
POST
Clear Notion Page
Overview
The clear-page endpoint archives all top-level content blocks from a Notion page, effectively clearing it. This is useful for:- Resetting a page before adding new content
- Cleaning up test or temporary pages
- Automating page content replacement workflows
- Uses Notion’s archive functionality (blocks can be recovered from trash)
- Only deletes top-level blocks; child blocks are automatically archived with their parents
- Does NOT delete the page itself, only its content
- Preserves page properties and title
Request
Your Mark2Notion API key
Your Notion integration token. Optional when your workspace is connected via OAuth in the dashboard. Pass this if you prefer to authenticate with a manual integration token instead. See Using a Manual Notion Token.
The URL or page ID of the Notion page to clear. Pass the full
notion.so page URL or just the page ID — both are accepted.Response
Will be “success” for successful requests
Examples
Response Example
Common Use Cases
Clear and Replace Page Content
Combine with the/append endpoint to replace page content:
Automated Report Generation
Clear and regenerate daily reports:Error Handling
The endpoint follows standard error responses. See the Errors page for details.Common Errors
| Status | Meaning |
|---|---|
400 | Missing or invalid pageId parameter |
401 | Invalid Notion token or no access to the specified page |
403 | Invalid API key |
404 | Page does not exist or has been deleted |
429 | Too many requests. Automatic retry logic is built in, but very high volumes may still hit limits |
Usage & Pricing
Each successful clear-page request counts as 1 API usage regardless of how many blocks are deleted.- Empty pages (0 blocks): Still counts as 1 usage
- Pages with many blocks: Still counts as 1 usage
- Failed requests: Do not count towards usage
Pro Tip: Since clearing a page costs 1 credit regardless of size, it’s efficient for pages with lots of content. Use this when you need a clean slate!
Idempotency
The clear-page endpoint implements idempotency to prevent duplicate operations:- Concurrent identical requests return
202 Acceptedwith “in_progress” status - Once completed, subsequent clear requests are processed normally
- Each request is tracked based on API key, page ID, and Notion token
Performance
- Average response time: 2-5 seconds for typical pages
- Large pages (100+ blocks): Up to 10-15 seconds
- The endpoint processes blocks sequentially with built-in rate limit handling
- Automatic retries ensure reliability even during Notion API throttling
Integration Examples
n8n Workflow
Create a workflow node that clears a page before updating:- HTTP Request node →
POST /api/clear-page - Wait 2 seconds (optional, for safety)
- HTTP Request node →
POST /api/appendwith new content
Make (Integromat)
Add a “Clear Page” action:- HTTP module → Make a request
- Method: POST
- URL:
https://api.mark2notion.com/api/clear-page - Headers:
x-api-keywith your API key - Body: JSON with
pageId
Zapier
Use the Webhooks by Zapier action:- Choose “POST” method
- URL:
https://api.mark2notion.com/api/clear-page - Add header:
x-api-key - Payload Type: JSON
- Add data:
pageId(URL or page ID)