DraftRight API
AI-powered legal document generation, audio transcription, file conversion, contract analysis, and agreement building. One API key, one integration.
Base URL: https://draftright.co.uk/api
Authentication
API Key (Business)
Include your key in the x-api-key header.
curl -H "x-api-key: dr_your_api_key_here" \
https://draftright.co.uk/api/invoice/scan \
-F "file=@invoice.pdf"
Bearer Token (Consumer)
From /api/auth/login.
curl -H "Authorization: Bearer eyJhbG..." \
https://draftright.co.uk/api/documents/generate \
-d '{"templateId":"nda","answers":{...}}'
dr_.Plans & Pricing
Consumer
Free
- 1 document/mo (watermarked)
- 3 transcriptions/day (10min)
- File conversion (100MB)
- Agreement preview only
- No diarise/summarise
Pro
- Unlimited documents
- 20 transcriptions/day (60min)
- 500MB uploads
- Diarise, summarise, translate
- 5 agreements/month
- PDF & DOCX downloads
Elite
- Everything in Pro
- 50 transcriptions/day (2hr)
- 1GB uploads
- Unlimited agreements
- Regenerate with edits
- Priority AI models
Business API
Starter
- 200 calls/month
- Invoice scanning
- Bulk conversion
- No contract analysis
- No agreements
Growth
- 1,000 calls/month
- 10 agreements/month
- Contract analysis
- Transcription API
- Company search
Scale
- 5,000 calls/month
- 50 agreements/month
- Expense scanning
- Company monitoring
- HR packs
Enterprise
- 15,000 calls/month
- 200 agreements/month
- Custom integrations
- Dedicated support
- SLA guarantee
Quick Start
1. Get your API key
POST /api/business/onboard
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json
{ "companyName": "Acme Ltd", "email": "dev@acme.com" }
2. Scan an invoice
curl -X POST https://draftright.co.uk/api/invoice/scan \
-H "x-api-key: dr_your_key" \
-F "file=@invoice.pdf"
3. Check usage
curl https://draftright.co.uk/api/biz-dashboard \
-H "Authorization: Bearer YOUR_TOKEN"
Errors
All errors return JSON with an error field.
{ "error": "Monthly API limit reached", "used": 200, "limit": 200, "upgrade": true }
| Code | Meaning | Action |
|---|---|---|
400 | Bad request | Check required params |
401 | Invalid auth | Check API key or token |
403 | Feature not on plan | Upgrade |
429 | Rate limit hit | Wait or upgrade |
500 | Server error | Retry or contact support |
Document Generator
Generate UK legal documents from 14 templates. AI-powered with legislation references.
Free: 1/mo Pro: Unlimited Elite: Unlimitedcurl -X POST https://draftright.co.uk/api/documents/generate \
-H "Authorization: Bearer TOKEN" \
-H "Content-Type: application/json" \
-d '{
"templateId": "nda",
"answers": {
"party1_name": "Acme Ltd",
"party2_name": "Jane Smith",
"purpose": "Partnership discussion",
"duration": "2 years"
}
}'
Response:
{
"content": "NON-DISCLOSURE AGREEMENT\n\nDate: 13 March 2026...",
"templateId": "nda",
"wordCount": 1247
}
Transcriber
Transcribe audio/video up to 1GB. Smart-splits long recordings at silence breaks, processes chunks with context continuity.
Free: 3/day 10min Pro: 20/day 60min Elite: 50/day 2hrcurl -X POST https://draftright.co.uk/api/transcribe \
-H "Authorization: Bearer TOKEN" \
-F "file=@meeting.mp3" \
-F "timestamps=true" \
-F "diarise=true" \
-F "summarise=true"
Response:
{
"text": "Welcome to the masterclass...",
"duration": 5586,
"srt": "1\n00:00:00,000 --> 00:00:13,640\nWelcome...",
"summary": "A 90-minute NLP masterclass covering...",
"diarised_text": "[Speaker 1] Welcome..."
}
File Converter
Convert between 15+ formats. Documents, images, audio, video.
curl -X POST https://draftright.co.uk/api/converter/pdf_to_word \
-H "Authorization: Bearer TOKEN" \
-F "files=@document.pdf" --output converted.docx
Returns binary file download.
Smart Doc Reader
Upload any document and chat with it. AI extracts data, answers questions, provides summaries.
Pro+After upload, use /api/smart-doc/chat to ask questions about the document.
Agreement Builder
Upload meeting recordings or transcripts. AI extracts parties, terms, obligations, deadlines, financial terms — then generates a professional legal agreement.
Free: Preview Pro: 5/mo Elite: Unlimitedcurl -X POST https://draftright.co.uk/api/agreement/create \
-H "Authorization: Bearer TOKEN" \
-F "files=@meeting.mp3" \
-F "title=Service Agreement" \
-F "templateType=service_agreement"
Response:
{
"draftId": 42,
"status": "processing",
"message": "Analysing transcripts..."
}
Poll GET /api/agreement/:id for status. When ready, the full agreement is in generated_content.
curl https://draftright.co.uk/api/agreement/42 \
-H "Authorization: Bearer TOKEN"
Returns parties, agreed terms, obligations, deadlines, financial terms, and generated content.
curl https://draftright.co.uk/api/agreement/42/download?format=pdf \
-H "Authorization: Bearer TOKEN" --output agreement.pdf
Invoice Scanner
Extract structured data from PDF/image invoices using OCR + AI.
Starter+curl -X POST https://draftright.co.uk/api/invoice/scan \
-H "x-api-key: dr_your_key" \
-F "file=@invoice.pdf"
{
"vendor": "Acme Supplies Ltd",
"invoiceNumber": "INV-2026-0142",
"date": "2026-03-01",
"dueDate": "2026-03-31",
"total": 1250.00,
"tax": 250.00,
"currency": "GBP",
"lineItems": [
{ "description": "Web Development", "qty": 1, "unitPrice": 1000, "total": 1000 }
]
}
Contract Analysis
AI analysis of contracts: clause breakdown, red flags, compliance score, key dates.
Growth+curl -X POST https://draftright.co.uk/api/contract/analyse \
-H "x-api-key: dr_your_key" \
-F "file=@contract.pdf"
{
"summary": "12-month service agreement...",
"complianceScore": 78,
"clauses": [...],
"redFlags": [
{ "clause": "4.2", "risk": "Unlimited liability", "severity": "high" }
],
"keyDates": [
{ "date": "2026-04-01", "event": "Start date" }
]
}
File Conversion (API)
Convert files via API key.
Starter+curl -X POST https://draftright.co.uk/api/converter/pdf_to_word \
-H "x-api-key: dr_your_key" \
-F "files=@document.pdf" --output converted.docx
Transcription (API)
Full transcription via API key. Same capabilities as consumer.
Growth+curl -X POST https://draftright.co.uk/api/transcribe \
-H "x-api-key: dr_your_key" \
-F "file=@recording.mp3" \
-F "timestamps=true" \
-F "summarise=true"
Agreement Builder (API)
Programmatically generate legal agreements from transcripts via API.
Growth: 10/mo Scale: 50/mo Enterprise: 200/mocurl -X POST https://draftright.co.uk/api/agreement/api/create \
-H "x-api-key: dr_your_key" \
-F "files=@meeting.mp3" \
-F "title=Service Agreement" \
-F "templateType=service_agreement"
{
"draftId": 42,
"status": "ready",
"parties": [
{ "name": "Sarah", "role": "provider", "organisation": "The Coaching Corner" }
],
"agreedTerms": [
{ "term": "500/month coaching", "confidence": "high", "category": "payment" }
],
"generatedContent": "SERVICE AGREEMENT\n\nDate: 13 March 2026...",
"usage": { "used": 3, "limit": 10 }
}
Company Search
Search UK Companies House.
Growth+curl "https://draftright.co.uk/api/company/search?q=Tesco" \
-H "x-api-key: dr_your_key"
curl "https://draftright.co.uk/api/company/profile/00445790" \
-H "x-api-key: dr_your_key"
Usage Stats
Real-time usage by endpoint, daily breakdown, recent activity.
curl https://draftright.co.uk/api/biz-dashboard \
-H "Authorization: Bearer TOKEN"
Document Templates
| ID | Name | Category |
|---|---|---|
tenancy | Tenancy Agreement (AST) | Property |
section21 | Section 21 Response | Property |
noise_complaint | Noise Complaint Letter | Property |
deposit_dispute | Deposit Dispute Letter | Property |
employment_contract | Employment Contract | Employment |
resignation | Resignation Letter | Employment |
grievance | Grievance Letter | Employment |
nda | Non-Disclosure Agreement | Business |
freelance_contract | Freelance Contract | Business |
loan_agreement | Loan Agreement | Business |
refund_request | Refund Request Letter | Personal |
council_tax_appeal | Council Tax Appeal | Personal |
flight_delay | Flight Delay Claim | Personal |
parking_appeal | Parking Fine Appeal | Personal |
Conversion Formats
| Type ID | From | To |
|---|---|---|
pdf_to_word | DOCX | |
word_to_pdf | DOCX | |
excel_to_pdf | XLSX | |
csv_to_excel | CSV | XLSX |
jpg_to_pdf | JPG | |
png_to_pdf | PNG | |
mp4_to_mp3 | MP4 | MP3 |
mov_to_mp4 | MOV | MP4 |
avi_to_mp4 | AVI | MP4 |
mkv_to_mp4 | MKV | MP4 |
mp3_to_wav | MP3 | WAV |
wav_to_mp3 | WAV | MP3 |
m4a_to_mp3 | M4A | MP3 |
png_to_jpg | PNG | JPG |
jpg_to_png | JPG | PNG |
Rate Limits
Monthly. Resets on the 1st.
| Plan | API Calls | Agreements | Max File |
|---|---|---|---|
| Starter | 200/mo | — | 25MB |
| Growth | 1,000/mo | 10/mo | 500MB |
| Scale | 5,000/mo | 50/mo | 500MB |
| Enterprise | 15,000/mo | 200/mo | 1GB |