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.app

Scopes & Permissions

Each API key carries a set of scopes that determine which endpoints it can access. All API keys include all scopes by default.

ScopeDescriptionEndpoints
convertConvert documents to Markdown/v1/convert/*
driveSave files to Google Drive/v1/save/drive
read:accountVerify API key and read account info/oauth/me

Endpoints

GET/oauth/me

Verify 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"
POST/v1/convert/google-doc

Convert 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

ParameterTypeRequiredDescription
doc_id_or_urlstringYesFull Google Docs URL (e.g. https://docs.google.com/document/d/...) or the document ID.
include_metadatabooleanNoWhen 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
  }'
POST/v1/convert/google-slides

Convert 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

ParameterTypeRequiredDescription
presentation_id_or_urlstringYesFull Google Slides URL or just the presentation ID.
include_notesbooleanNoWhen true, speaker notes are included under each slide. Defaults to false.
include_metadatabooleanNoWhen 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
  }'
POST/v1/convert/attachment

Convert Attachment

Converts a Base64-encoded PDF or DOCX file to Markdown. Ideal for processing email attachments or files already in memory.

Parameters

ParameterTypeRequiredDescription
file_datastringYesThe file content encoded as a Base64 string.
filenamestringYesFull filename including extension, e.g. 'report.pdf' or 'notes.docx'.
mime_typestringNoMIME 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"
  }'
POST/v1/convert/url

Convert 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

ParameterTypeRequiredDescription
file_urlstringYesPublic URL pointing to a PDF, DOCX, or other supported file.
filenamestringNoOverride 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"
  }'
POST/v1/convert/attachments/batch

Batch 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

ParameterTypeRequiredDescription
filesarrayYesArray 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"
      }
    ]
  }'
POST/v1/save/drive

Save 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

ParameterTypeRequiredDescription
markdown_textstringYesThe Markdown content to save.
folder_idstringYesGoogle Drive folder ID (the last segment of the folder's URL).
filenamestringNoFilename without extension. Defaults to 'converted-document'. The .md extension is added automatically.
overwritebooleanNoWhen 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.

StatusMeaningMake error typeWhat to do
400Bad RequestDataErrorCheck your request body — a required parameter is missing or malformed.
401UnauthorizedInvalidConnectionErrorYour API key is missing, invalid, or expired. In Make, the scenario prompts a reconnect.
403ForbiddenInvalidAccessTokenErrorYour API key does not have access to this resource, or the Drive folder is not shared with the connected account.
404Not FoundDataErrorThe document, folder, or endpoint does not exist. Check the URL or ID.
413Payload Too LargeDataErrorThe file exceeds the size limit. Reduce file size or use the batch endpoint for multiple smaller files.
429Too Many RequestsRateLimitErrorRate limit exceeded. Wait and retry with exponential backoff. Make retries automatically.
500Internal Server ErrorRuntimeErrorUnexpected server error. Retry the request. If it persists, contact support.
502Bad GatewayRuntimeErrorUpstream error. Retry.
503Service UnavailableRuntimeErrorTemporary 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 when success is 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

PDF

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