Skip to main content

Available Endpoints

Mark2Notion provides a simple REST API for converting Markdown to Notion blocks and managing Notion page content.

Content Creation & Management

Content Extraction

Notion to Markdown

Extract content from a Notion page and convert it to Markdown

Authentication

All API endpoints require authentication using an API key passed in the x-api-key header:
curl -X POST "https://api.mark2notion.com/api/convert" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"markdown": "# Hello World"}'
Get your API key from the Mark2Notion dashboard.

Common Workflows

Replace Page Content

Clear and update a page in one workflow:
// 1. Clear existing content
await fetch('https://api.mark2notion.com/api/clear-page', {
  method: 'POST',
  headers: { 'x-api-key': 'YOUR_KEY' },
  body: JSON.stringify({
    notionToken: 'secret_TOKEN',
    pageId: 'your-page-id'
  })
});

// 2. Add fresh content
await fetch('https://api.mark2notion.com/api/append', {
  method: 'POST',
  headers: { 'x-api-key': 'YOUR_KEY' },
  body: JSON.stringify({
    markdown: '# New Content',
    notionToken: 'secret_TOKEN',
    pageId: 'your-page-id'
  })
});

Convert Once, Append Multiple Times

Optimize by converting once and appending to multiple pages:
// 1. Convert Markdown to blocks
const convertRes = await fetch('https://api.mark2notion.com/api/convert', {
  method: 'POST',
  headers: { 'x-api-key': 'YOUR_KEY' },
  body: JSON.stringify({ markdown: '# Report\n\nData here...' })
});
const { blocks } = (await convertRes.json()).data;

// 2. Append to multiple pages
for (const pageId of ['page1', 'page2', 'page3']) {
  await fetch('https://api.mark2notion.com/api/append-blocks', {
    method: 'POST',
    headers: { 'x-api-key': 'YOUR_KEY' },
    body: JSON.stringify({
      blocks,
      notionToken: 'secret_TOKEN',
      pageId
    })
  });
}

Rate Limits

All endpoints include automatic retry logic and respect Notion’s rate limits. The API handles:
  • Rate limit responses (429)
  • Transient network errors
  • Notion API throttling
You don’t need to implement retry logic in your code - it’s handled automatically.

Need Help?