Skip to main content
The Doctly API provides two core capabilities:
  1. Document Conversion — Convert PDFs, DOCX files, and images to clean Markdown
  2. Data Extraction — Use custom extractors to pull structured data from documents

Base URL

All API requests should be made to:

Quick Start

Convert a Document to Markdown

Run an Extractor

API Endpoints

Documents

Extractors

Request Format

Authentication

All requests require a Bearer token in the Authorization header:

Content Types

  • File uploads: multipart/form-data
  • JSON requests: application/json

Response Format

All responses are JSON. Successful responses include the requested data:
List endpoints return paginated results:

Error Handling

The API uses standard HTTP status codes: Error responses include details:
Validation errors provide field-level information:

Processing Flow

Document processing is asynchronous:
  1. Upload — Submit your document via POST /documents or POST /e/{slug}
  2. Queue — Document enters the processing queue (PENDING)
  3. Process — Document is being converted or extracted (PROCESSING)
  4. Complete — Results are ready for download (COMPLETED)
Poll GET /documents/{id} to check status, or provide a callback_url to receive webhook notifications.

Webhooks

Provide a callback_url when creating a document to receive a POST notification when processing completes:
Webhook deliveries retry up to 3 times with 5-second delays.

Rate Limits

API requests are rate-limited based on your plan. If you exceed the limit, requests return 429 Too Many Requests. Wait and retry with exponential backoff.

Support