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.

EndpointAcceptsOptions
POST /api/v1/word-to-pdf.doc .docm .docx .dot .dotx .odt .rtf .txt .wpdquality, merge, page_range, page_numbers, watermark, password, pdfa, title, author
POST /api/v1/excel-to-pdf.csv .ods .xls .xlsm .xlsxquality, merge, page_range, page_numbers, watermark, password, pdfa, title, author
POST /api/v1/powerpoint-to-pdf.odp .pps .ppsx .ppt .pptxquality, 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 .webppage_size, orientation, margin, quality, ocr
POST /api/v1/html-to-pdf.htm .htmlquality
POST /api/v1/pdf-to-word.pdfmode, input_password, ocr_lang
POST /api/v1/pdf-to-excel.pdfinput_password
POST /api/v1/pdf-to-powerpoint.pdfinput_password
POST /api/v1/pdf-to-image.pdfformat, dpi, input_password
POST /api/v1/pdf-to-text.pdfinput_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 .xlsxpage_numbers
POST /api/v1/split-pdf.pdfmode, ranges, input_password
POST /api/v1/edit-pdf.pdf—
POST /api/v1/rotate-pdf.pdfangle, pages, input_password
POST /api/v1/delete-pages.pdfpages, input_password
POST /api/v1/compress-pdf.pdflevel, input_password
POST /api/v1/ocr-pdf.bmp .gif .heic .heif .jpeg .jpg .pdf .png .tif .tiff .webpocr_lang, input_password
POST /api/v1/watermark-pdf.pdfwatermark, opacity, input_password
POST /api/v1/page-numbers.pdfformat, input_password
POST /api/v1/protect-pdf.pdfpassword, restrict, input_password
POST /api/v1/unlock-pdf.pdfinput_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.

Get the Business plan