REST API · Business plan
Document conversion API
Every tool on DocShift is available as a simple HTTP endpoint. Send a file, get the converted file back. No SDK needed.
Authentication
Create a key in your dashboard and send it as a bearer token:
Authorization: Bearer dw_live_xxxxxxxxxxxxxxxx
Convert Word to PDF
curl -X POST https://docshift-production-1bdbc9a4.up.railway.app/api/v1/word-to-pdf \ -H "Authorization: Bearer $DOCWILLOW_KEY" \ -F "files=@report.docx" \ -F "quality=balanced" \ -F "page_numbers=1" \ -o report.pdf
Convert PDF to Word
curl -X POST https://docshift-production-1bdbc9a4.up.railway.app/api/v1/pdf-to-word \ -H "Authorization: Bearer $DOCWILLOW_KEY" \ -F "files=@contract.pdf" -o contract.docx
Python
import requests
r = requests.post(
"https://docshift-production-1bdbc9a4.up.railway.app/api/v1/merge-pdf",
headers={"Authorization": f"Bearer {KEY}"},
files=[("files", open("a.pdf", "rb")), ("files", open("b.docx", "rb"))],
)
r.raise_for_status()
open("merged.pdf", "wb").write(r.content)
Endpoints
Send files as multipart/form-data in a field called files (repeat it for multiple files). Options are form fields. GET /api/v1/tools lists everything as JSON.
| Endpoint | Accepts | Options |
|---|---|---|
POST /api/v1/word-to-pdf | .doc .docm .docx .dot .dotx .odt .rtf .txt .wpd | quality, merge, page_range, page_numbers, watermark, password, pdfa, title, author |
POST /api/v1/excel-to-pdf | .csv .ods .xls .xlsm .xlsx | quality, merge, page_range, page_numbers, watermark, password, pdfa, title, author |
POST /api/v1/powerpoint-to-pdf | .odp .pps .ppsx .ppt .pptx | quality, merge, page_range, page_numbers, watermark, password, pdfa, title, author |
POST /api/v1/image-to-pdf | .bmp .gif .heic .heif .jpeg .jpg .png .tif .tiff .webp | page_size, orientation, margin, quality, ocr |
POST /api/v1/html-to-pdf | .htm .html | quality |
POST /api/v1/pdf-to-word | mode, input_password, ocr_lang | |
POST /api/v1/pdf-to-excel | input_password | |
POST /api/v1/pdf-to-powerpoint | input_password | |
POST /api/v1/pdf-to-image | format, dpi, input_password | |
POST /api/v1/pdf-to-text | input_password | |
POST /api/v1/merge-pdf | .bmp .csv .doc .docm .docx .dot .dotx .gif .heic .heif .htm .html .jpeg .jpg .odp .ods .odt .pdf .png .pps .ppsx .ppt .pptx .rtf .tif .tiff .txt .webp .wpd .xls .xlsm .xlsx | page_numbers |
POST /api/v1/split-pdf | mode, ranges, input_password | |
POST /api/v1/edit-pdf | — | |
POST /api/v1/rotate-pdf | angle, pages, input_password | |
POST /api/v1/delete-pages | pages, input_password | |
POST /api/v1/compress-pdf | level, input_password | |
POST /api/v1/ocr-pdf | .bmp .gif .heic .heif .jpeg .jpg .pdf .png .tif .tiff .webp | ocr_lang, input_password |
POST /api/v1/watermark-pdf | watermark, opacity, input_password | |
POST /api/v1/page-numbers | format, input_password | |
POST /api/v1/protect-pdf | password, restrict, input_password | |
POST /api/v1/unlock-pdf | input_password |
Responses
On success you get the file (200) with a Content-Disposition filename, plus X-Pages and X-Warnings headers when relevant. Errors are JSON: {"error": "…"} with status 400 (bad input), 401 (key), 403 (plan), 429 (limit).
Limits
5,000 successful calls per month, 60 requests per minute, 250 MB per file. Need more? Talk to us.