Overview
1. Connect your Microsoft account
Check Microsoft connection
curl https://api.mddoc.app/api/settings/microsoft \
-H "Authorization: Bearer mddoc_YOUR_KEY"Response
{
"connected": true,
"email": "you@company.com"
}2. Set up a destination
Create a SharePoint destination
curl -X POST https://api.mddoc.app/api/projects/PROJECT_ID/destinations \
-H "Authorization: Bearer mddoc_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Engineering Docs",
"type": "sharepoint",
"config": {
"site_url": "https://company.sharepoint.com/sites/engineering",
"library": "Documents",
"folder": "Specs"
}
}'3. Export a conversion
Export to SharePoint
curl -X POST https://api.mddoc.app/api/conversions/CONVERSION_ID/export \
-H "Authorization: Bearer mddoc_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "destination_id": "your-destination-uuid" }'Response
{
"id": "export-uuid",
"conversion_id": "conversion-uuid",
"destination_id": "destination-uuid",
"status": "exporting",
"created_at": "2026-02-25T10:35:00Z"
}Check export status
curl https://api.mddoc.app/api/exports/EXPORT_ID \
-H "Authorization: Bearer mddoc_YOUR_KEY"Destination types
| Type | Description | Plan |
|---|---|---|
| sharepoint | Microsoft SharePoint document library | Team+ |
| supabase | Supabase Storage bucket | Team+ |
| local | Local file system (self-hosted only) | All |
Full pipeline example
1. Convert
CONV_ID=$(curl -s -X POST https://api.mddoc.app/api/v1/convert \
-H "Authorization: Bearer mddoc_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"markdown": "# Quarterly Report\n\n...",
"template_id": "TEMPLATE_ID",
"mapping_id": "MAPPING_ID",
"response_format": "json"
}' | jq -r '.conversion_id')2. Export
curl -X POST https://api.mddoc.app/api/conversions/$CONV_ID/export \
-H "Authorization: Bearer mddoc_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{ "destination_id": "DEST_ID" }'3. Check status
curl https://api.mddoc.app/api/exports/EXPORT_ID \
-H "Authorization: Bearer mddoc_YOUR_KEY"