API Key Authentication

Mark2Notion uses API key authentication. Include your API key in the x-api-key header for all requests.
curl -X POST "https://api.mark2notion.com/api/convert" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"markdown": "# Test"}'

Getting Your API Key

  1. Sign up at mark2notion.com
  2. Navigate to your dashboard
  3. Copy your API key from the API section
  4. Keep it secure - never expose it in client-side code
Your API key is sensitive. Never include it in client-side code or commit it to version control.

Usage Limits

API usage is tracked and limited based on your subscription plan. You can check usage in the dashbard

Rate Limiting

The API implements intelligent rate limiting:
  • Respect Notion’s limits: 3 requests per second to Notion API
  • Automatic retries: Built-in exponential backoff for rate limits
  • Usage tracking: Real-time tracking of your quota usage

Error Responses

Authentication Errors

{
  "status": "error",
  "message": "Missing x-api-key"
}

Best Practices

Secure Storage: Store your API key in environment variables, not in your code.
Monitor Usage: Check the usage headers to avoid hitting limits unexpectedly.
Handle Errors: Always implement proper error handling for authentication failures.

Example: Secure Implementation

// ✅ Good - using environment variable
const apiKey = process.env.MARK2NOTION_API_KEY;

// ❌ Bad - hardcoded API key
const apiKey = "mk_live_abcd1234...";