> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mark2notion.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Start using Mark2Notion API in under 5 minutes

## Get Your API Key

First, you'll need to get your API key from the Mark2Notion dashboard.

<Steps>
  <Step title="Sign Up">
    Visit [mark2notion.com](https://mark2notion.com) and create an account.
  </Step>

  <Step title="Get API Key">
    Navigate to your dashboard and copy your API key.
  </Step>

  <Step title="Connect Notion (for page operations)">
    Click "Connect Notion" in your [dashboard](https://dashboard.mark2notion.com) to authorize access to your workspace via OAuth. Required for `/append`, `/append-blocks`, `/clear-page`, and `/notion-to-markdown`.
  </Step>
</Steps>

## Get the Page URL or ID

Pass a URL or page ID as the `pageId` parameter:

* Full Notion page URL: `https://notion.so/Your-Page-Title-abc123def456`
* Or just the page ID: `abc123def456`

Both formats are accepted — the API normalizes them automatically.

## Using a Manual Notion Token (Advanced)

If you prefer not to use OAuth, you can pass a `notionToken` directly in each request instead.

<Steps>
  <Step title="Create a Notion Integration">
    Go to [notion.so/my-integrations](https://notion.so/my-integrations), click "New integration", select your workspace, and copy the Internal Integration Token (starts with `ntn_`).
  </Step>

  <Step title="Share the Target Page">
    Open your Notion page, click the **···** menu → **Connections** → **Add connection**, then select your integration. Repeat for each page you want to access.
  </Step>

  <Step title="Pass the Token in Requests">
    Include `notionToken` in your request body alongside `pageId`. The OAuth connection is not needed when a token is provided directly.
  </Step>
</Steps>

## Make Your First Request

Let's convert some Markdown to Notion blocks:

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST "https://api.mark2notion.com/api/convert" \
    -H "Content-Type: application/json" \
    -H "x-api-key: YOUR_API_KEY" \
    -d '{
      "markdown": "# Hello World\n\nThis is my **first** API call!"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.mark2notion.com/api/convert', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'x-api-key': 'YOUR_API_KEY'
    },
    body: JSON.stringify({
      markdown: '# Hello World\n\nThis is my **first** API call!'
    })
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      'https://api.mark2notion.com/api/convert',
      headers={
          'Content-Type': 'application/json',
          'x-api-key': 'YOUR_API_KEY'
      },
      json={
          'markdown': '# Hello World\n\nThis is my **first** API call!'
      }
  )

  data = response.json()
  print(data)
  ```
</CodeGroup>

## Try with Postman

Prefer using Postman? We've got you covered with a ready-to-use collection:

<Steps>
  <Step title="Fork the Collection">
    Visit our [Postman collection](https://www.postman.com/mark2notion-1/m2n-workspace/collection/47892602-d93cd1d2-e8ee-4eee-a8b3-4e4e14cec3a1/?action=share\&creator=47892602) on the Postman API Network and fork it to your workspace.
  </Step>

  <Step title="Watch for Updates">
    Click **"Watch"** on the collection to get notified when we add new endpoints and examples.
  </Step>

  <Step title="Configure Your API Key">
    Set your Mark2Notion API key in the collection's environment variables.
  </Step>
</Steps>

## Expected Response

```json theme={null}
{
  "status": "success",
  "data": {
    "blocks": [
      {
        "type": "heading_1",
        "heading_1": {
          "rich_text": [
            {
              "type": "text",
              "text": {
                "content": "Hello World"
              }
            }
          ]
        }
      },
      {
        "type": "paragraph",
        "paragraph": {
          "rich_text": [
            {
              "type": "text",
              "text": {
                "content": "This is my "
              }
            },
            {
              "type": "text",
              "text": {
                "content": "first"
              },
              "annotations": {
                "bold": true
              }
            },
            {
              "type": "text",
              "text": {
                "content": " API call!"
              }
            }
          ]
        }
      }
    ],
    "blockCount": 2
  }
}
```

## Next Steps

Now that you've made your first request, you can:

<CardGroup cols={2}>
  <Card title="Append to Notion" icon="plus" href="/api-reference/append">
    Learn how to append content directly to Notion pages.
  </Card>

  <Card title="Handle Errors" icon="triangle-exclamation" href="/errors">
    Understand error responses and how to handle them.
  </Card>

  <Card title="Authentication" icon="key" href="/authentication">
    Learn more about API authentication and rate limits.
  </Card>

  <Card title="Give Feedback" icon="message" href="/feedback">
    Share your experience and help us improve.
  </Card>
</CardGroup>
