API Reference
Developer API
Programmatic access to MDSpin's conversion engine. Convert PDF, DOCX, Google Docs, Google Slides, and more to clean Markdown.
Authentication
All API requests require an API key sent via the Authorization header. Keys start with mdspin_ and can be generated from your API Keys dashboard.
Authorization: Bearer mdspin_your_api_key
Base URL
https://api.mdspin.appScopes & Permissions
Each API key carries a set of scopes that determine which endpoints it can access. All API keys include all scopes by default.
| Scope | Description | Endpoints |
|---|---|---|
| convert | Convert documents to Markdown | /v1/convert/* |
| drive | Save files to Google Drive | /v1/save/drive |
| read:account | Verify API key and read account info | /oauth/me |
Endpoints
/oauth/meVerify API Key
Validates an API key and returns the associated account email. Use this to confirm a key is active before making conversion requests.
Parameters
No request body — authentication is via the header.
curl -X GET https://api.mdspin.app/oauth/me \ -H "Authorization: Bearer mdspin_your_api_key"
/v1/convert/google-docConvert Google Doc (Deprecated)
Deprecated. This endpoint relied on Google Drive/Docs scopes that are no longer requested at sign-in. New users will not have a usable Google token on file. Workaround: export the Doc yourself (e.g. via Google's API or Make.com's Google Docs/Drive modules) and convert the resulting file with /v1/convert/attachment or /v1/convert/url.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| doc_id_or_url | string | Yes | Full Google Docs URL (e.g. https://docs.google.com/document/d/...) or the document ID. |
| include_metadata | boolean | No | When true, response includes character count and heading count. Defaults to false. |
curl -X POST https://api.mdspin.app/v1/convert/google-doc \
-H "Authorization: Bearer mdspin_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"doc_id_or_url": "https://docs.google.com/document/d/1aBcDeFgHiJkLmNoPqRsTuVwXyZ",
"include_metadata": false
}'/v1/convert/google-slidesConvert Google Slides (Deprecated)
Deprecated. This endpoint relied on Google Drive/Docs scopes that are no longer requested at sign-in. New users will not have a usable Google token on file. Workaround: export the deck as PDF or PPTX yourself (e.g. via Google's API or Make.com's Google Drive module) and convert the resulting file with /v1/convert/attachment or /v1/convert/url.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| presentation_id_or_url | string | Yes | Full Google Slides URL or just the presentation ID. |
| include_notes | boolean | No | When true, speaker notes are included under each slide. Defaults to false. |
| include_metadata | boolean | No | When true, response includes character count and heading count. Defaults to false. |
curl -X POST https://api.mdspin.app/v1/convert/google-slides \
-H "Authorization: Bearer mdspin_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"presentation_id_or_url": "https://docs.google.com/presentation/d/1xYzAbCdEfGhIjKlMnOpQrStUvWxYz",
"include_notes": true,
"include_metadata": false
}'/v1/convert/attachmentConvert Attachment
Converts a Base64-encoded PDF or DOCX file to Markdown. Ideal for processing email attachments or files already in memory.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| file_data | string | Yes | The file content encoded as a Base64 string. |
| filename | string | Yes | Full filename including extension, e.g. 'report.pdf' or 'notes.docx'. |
| mime_type | string | No | MIME type, e.g. 'application/pdf'. Auto-detected from filename if omitted. |
curl -X POST https://api.mdspin.app/v1/convert/attachment \
-H "Authorization: Bearer mdspin_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"file_data": "JVBERi0xLjQKMSAwIG9iago8PCAvVHlwZS...",
"filename": "report.pdf",
"mime_type": "application/pdf"
}'/v1/convert/urlConvert File from URL
Fetches a file from a public URL and converts it to Markdown. Works with S3 pre-signed URLs, Dropbox links, and any direct download link.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| file_url | string | Yes | Public URL pointing to a PDF, DOCX, or other supported file. |
| filename | string | No | Override the auto-detected filename. Include extension, e.g. 'report.pdf'. |
curl -X POST https://api.mdspin.app/v1/convert/url \
-H "Authorization: Bearer mdspin_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"file_url": "https://example.com/files/report.pdf",
"filename": "report.pdf"
}'/v1/convert/attachments/batchBatch Convert Attachments
Converts up to 20 Base64-encoded files to Markdown in a single request. Each file is processed independently — one failure does not affect the others.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| files | array | Yes | Array of file objects (max 20). Each object must include file_data and filename, with an optional mime_type. |
curl -X POST https://api.mdspin.app/v1/convert/attachments/batch \
-H "Authorization: Bearer mdspin_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"files": [
{
"file_data": "JVBERi0xLjQK...",
"filename": "report.pdf"
},
{
"file_data": "UEsDBBQAAAAI...",
"filename": "notes.docx",
"mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document"
}
]
}'/v1/save/driveSave Markdown to Google Drive (Deprecated)
Deprecated. This endpoint relied on Google Drive scopes that are no longer requested at sign-in. New users will not have a usable Google token on file. Workaround: take the markdown_text returned by any conversion endpoint and upload it to Drive yourself (e.g. via Google's API or Make.com's Google Drive 'Upload a File' module).
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| markdown_text | string | Yes | The Markdown content to save. |
| folder_id | string | Yes | Google Drive folder ID (the last segment of the folder's URL). |
| filename | string | No | Filename without extension. Defaults to 'converted-document'. The .md extension is added automatically. |
| overwrite | boolean | No | When false (default), a timestamp is appended to avoid overwriting existing files. |
curl -X POST https://api.mdspin.app/v1/save/drive \
-H "Authorization: Bearer mdspin_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"markdown_text": "# Meeting Notes\n\nAttendees: Alice, Bob...",
"folder_id": "1aBcDeFgHiJkLmNoPqRsTuVwXyZ",
"filename": "meeting-notes-q1",
"overwrite": false
}'Error Codes
The REST API returns standard HTTP status codes with a JSON body of the shape { "error": "...", "message": "..." }. The Make error type column shows which class our Make.com custom app raises for that status — useful if you are branching on error type inside a Make scenario.
| Status | Meaning | Make error type | What to do |
|---|---|---|---|
| 400 | Bad Request | DataError | Check your request body — a required parameter is missing or malformed. |
| 401 | Unauthorized | InvalidConnectionError | Your API key is missing, invalid, or expired. In Make, the scenario prompts a reconnect. |
| 403 | Forbidden | InvalidAccessTokenError | Your API key does not have access to this resource, or the Drive folder is not shared with the connected account. |
| 404 | Not Found | DataError | The document, folder, or endpoint does not exist. Check the URL or ID. |
| 413 | Payload Too Large | DataError | The file exceeds the size limit. Reduce file size or use the batch endpoint for multiple smaller files. |
| 429 | Too Many Requests | RateLimitError | Rate limit exceeded. Wait and retry with exponential backoff. Make retries automatically. |
| 500 | Internal Server Error | RuntimeError | Unexpected server error. Retry the request. If it persists, contact support. |
| 502 | Bad Gateway | RuntimeError | Upstream error. Retry. |
| 503 | Service Unavailable | RuntimeError | Temporary outage or maintenance. Retry after a short delay. |
Partial failures in batch conversion
POST /v1/convert/attachments/batch always returns 200, even when some files fail. Inspect the response body to handle them:
- •
total,succeeded,failed— summary counts - •
results[].success— per-file boolean - •
results[].error,results[].message— populated whensuccessis false
Inside the Make app, this module raises a DataError whenfailed > 0, surfacing the first failure's message so the scenario halts rather than silently passing partial data downstream.
Example error response
HTTP/1.1 401 Unauthorized
Content-Type: application/json
{
"error": "invalid_api_key",
"message": "API key invalid or expired. Reconnect your MDSpin account."
}Supported Formats
application/pdf
DOCX
application/vnd.openxmlformats-...
DOC
application/msword
PPTX
application/vnd.openxmlformats-...
Google Docs
via URL or ID
Google Slides
via URL or ID
TXT
text/plain
RTF
application/rtf