Skip to main content

Error Response Format

All Mark2Notion API errors follow a consistent format to help you handle them programmatically.

Response Types

Success Response

Validation Errors (400)

Used when request parameters are invalid or missing.

Authentication Errors (401, 403)

Rate Limit Errors (429)

Server Errors (500)

Common Error Scenarios

Authentication Issues

Cause: No x-api-key header providedSolution: Include your API key in the request headers
Cause: API key is invalid, expired, or deactivatedSolution:
  • Check your API key in the dashboard
  • Generate a new API key if needed
  • Ensure your subscription is active
Cause: Your subscription is inactive or cancelledSolution: Reactivate your subscription in the dashboard

Usage Limits

Cause: You’ve exceeded your monthly request quotaSolution:
  • Wait for your quota to reset next month
  • Upgrade to a higher plan
  • Monitor usage with response headers
Headers to monitor:
Error: "Invalid Notion token or insufficient permissions"Solution:
  1. First, check that your Notion workspace is connected in the dashboard — reconnect if needed
  2. If using a manual notionToken, verify it’s still active at notion.so/my-integrations
  3. Ensure the integration has access to the target workspace
Error: "Page not found or access denied"Causes:
  • Page URL or ID is incorrect
  • Page has been deleted
  • Notion connection doesn’t have access to the page
Solution:
  1. First, check that your Notion workspace is connected in the dashboard and that the connected account has access to this page (or its parent)
  2. Verify the page URL or ID is correct (copy directly from Notion)
  3. If using a manual notionToken, share the page with your integration via ···Connections

Content Validation

Error: {"status": "fail", "data": {"markdown": "Missing or invalid markdown content"}}Causes:
  • Empty markdown string
  • Markdown parameter missing
  • Content too large
Solution: Provide valid markdown content in the request body

Error Handling Best Practices

1. Check Response Status

Always check the HTTP status code and response status field:

2. Implement Retry Logic

For rate limiting and transient errors:

3. Monitor Usage

Track your API usage to avoid hitting limits:

4. Graceful Degradation

Handle errors gracefully in your application:

Getting Help

If you encounter errors not covered here:

Report Issues

Report bugs or unexpected behavior

Give Feedback

Share your experience and suggestions
When reporting issues, include the full error response and the request that caused it (without sensitive data like API keys).