md.page API

Markdown in, shareable page out. One endpoint, no config.

paste into any LLM
terminal
$ curl -X POST https://md.page/api/publish \ -H "Content-Type: application/json" \ -d '{"markdown": "# Hello"}' { "url": "https://md.page/a8Xk2m", "expires_at": "2026-04-20T12:00:00Z" }

Overview

md.page turns Markdown into shareable web pages. Two modes:

Base URL

https://md.page

Authentication

Authenticated endpoints need a Bearer token:

Authorization: Bearer mdp_your_api_key_here

Create keys in Settings. Keys start with mdp_ and are shown once.

Anonymous endpoints (POST /api/publish) need no auth.


Publish anonymous page

POST /api/publish

Temporary page, expires in 24h. No auth required.

Request body

FieldTypeRequiredDescription
markdownstringYesMarkdown content (max 500KB)

Example

curl -X POST https://md.page/api/publish \
  -H "Content-Type: application/json" \
  -d '{"markdown": "# Hello World\n\nThis is my page."}'

Response 201

{
  "url": "https://md.page/a8Xk2m",
  "expires_at": "2026-04-20T12:00:00.000Z"
}

Create page

POST /api/pages

Permanent page on your subdomain. Requires auth.

Request body

FieldTypeRequiredDescription
markdownstringYesMarkdown content (max 500KB)
titlestringNoPage title. Auto-extracted from # heading if omitted.
slugstringNoURL name, e.g. my-doc. Auto-generated from title if omitted.
visibilitystringNo"public" (default) or "private"

Example

curl -X POST https://md.page/api/pages \
  -H "Authorization: Bearer mdp_your_key" \
  -H "Content-Type: application/json" \
  -d '{"markdown": "# My Doc", "slug": "my-doc"}'

Response 201

{
  "id": "kR4x9p",
  "url": "https://alice.md.page/my-doc",
  "slug": "my-doc",
  "visibility": "public"
}

List pages

GET /api/pages

Response 200

{
  "pages": [
    {
      "id": "kR4x9p",
      "slug": "my-doc",
      "title": "My Doc",
      "visibility": "public",
      "view_count": 42,
      "revision_count": 3,
      "created_via": "api:claude-code",
      "created_at": "2026-04-19T10:00:00.000Z",
      "updated_at": "2026-04-19T12:00:00.000Z"
    }
  ]
}

Update page

PUT /api/pages/:id

All fields optional — send only what changed.

Request body

FieldTypeDescription
markdownstringNew content
titlestringNew title
slugstringNew URL name (must be unique)
visibilitystring"public" or "private"

Example

curl -X PUT https://md.page/api/pages/kR4x9p \
  -H "Authorization: Bearer mdp_your_key" \
  -H "Content-Type: application/json" \
  -d '{"markdown": "# Updated content"}'

Response 200

{"ok": true}

Delete page

DELETE /api/pages/:id

Example

curl -X DELETE https://md.page/api/pages/kR4x9p \
  -H "Authorization: Bearer mdp_your_key"

Response 200

{"ok": true}

Current user

GET /api/me

Response 200

{
  "id": "abc123",
  "username": "alice",
  "display_name": "Alice Chen",
  "avatar_url": "https://..."
}

Create API key

POST /api/keys

Request body

FieldTypeRequiredDescription
labelstringNoName for this key, e.g. "claude-code"

Response 201

{
  "id": "uuid",
  "key": "mdp_aBcDeFgHiJkLmNoPqRsTuVwXyZ012345",
  "label": "claude-code"
}

The key is shown once. Store it securely.

List keys

GET /api/keys

Response 200

{
  "keys": [
    {
      "id": "uuid",
      "label": "claude-code",
      "last_used_at": "2026-04-19T12:00:00.000Z",
      "created_at": "2026-04-18T10:00:00.000Z"
    }
  ]
}

Rename key

PATCH /api/keys/:id

Request body

{"label": "new-name"}

Response 200

{"ok": true}

Revoke key

DELETE /api/keys/:id

Response 200

{"ok": true}

Limits

ResourceLimit
Pages per account10
API keys per account5
Content size500 KB
Anonymous TTL24 hours

Errors

All errors return JSON with an error field:

{"error": "Missing 'markdown' field"}
StatusMeaning
400Bad request — missing or invalid fields
401Unauthorized — missing or invalid key
404Not found
409Conflict — name already taken
413Content too large (>500KB)