← DocConvert · M² Designm2-design.net

API documentation

DocConvert is a REST API for converting documents between Markdown, HTML, PDF, and DOCX. Send content in one format, receive the converted file in the response body.

Base URL: https://api-production-7d714.up.railway.app/v1

Overview

The API is JSON-first. Authenticated endpoints require an X-API-Key header. Successful conversions return the raw file bytes with appropriate Content-Type and Content-Disposition headers.

What you can do

Limits

Quick start

Register for an API key, complete Stripe checkout to activate it, then call POST /v1/convert.

1. Register

curl -X POST https://api-production-7d714.up.railway.app/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{"email":"you@company.com","name":"My App"}'

Response includes api_key (save it immediately) and checkout_url. Your key stays inactive until checkout completes.

2. Convert Markdown to PDF

curl -X POST https://api-production-7d714.up.railway.app/v1/convert \
  -H "Content-Type: application/json" \
  -H "X-API-Key: dc_live_YOUR_KEY_HERE" \
  -d '{
    "input_format": "markdown",
    "output_format": "pdf",
    "content": "# Hello World\n\nThis is **DocConvert**."
  }' \
  --output hello.pdf

3. Check API health

curl https://api-production-7d714.up.railway.app/health

Endpoints at a glance

MethodPathAuthDescription
POST/v1/convertYesConvert a document (sync)
POST/v1/auth/registerNoCreate API key + Stripe checkout
POST/v1/billing/checkoutYesUpgrade plan via Stripe
POST/v1/billing/portalYesStripe customer portal URL
GET/healthNoService health check

See POST /convert for full request formats, supported conversions, and error codes.