Dott API Documentation
AI-powered contract risk analysis with optional licensed attorney review. Get instant risk scores on the free tier, or upgrade for attorney-validated results.
Instant Results
Free tier returns AI analysis in seconds. No waiting.
Attorney Validated
Upgrade tier: every analysis reviewed by a licensed NY attorney.
Secure by Design
HTTPS only, signed webhooks, and comprehensive audit logging.
API Tiers
AI Contract Analysis
Instant AI-powered risk assessment. No attorney review.
Consent required: Terms of Service, Privacy Policy. No engagement letter needed.
Best for: Quick risk assessment, triage, initial screening.
Full Legal Review
Licensed attorney reviews every analysis before delivery.
Consent required: Terms of Service, Privacy Policy, Engagement Letter, E-Signature.
Attorney-Validated tier requires a partnership agreement. Contact api@dott.legal for access.
Base URL
https://api.dott.legal/api/v1Authentication
All API requests require authentication using a Bearer token in the Authorization header.
Request Header
Authorization: Bearer dott_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxKeep your API key secure. Never expose it in client-side code or public repositories. Contact api@dott.legal to request API access.
Rate Limiting
| Tier | Endpoint | Limit |
|---|---|---|
| Free (AI Analysis) | POST /analyze | 10 requests / day |
| Attorney-Validated | POST /documents/submit | 100 requests / minute |
| Read endpoints | GET /status, /result, etc. | 200 requests / minute |
When rate limited, the API returns 429 with a Retry-After header. Free tier limits reset daily at midnight UTC.
Endpoints
/analyzeFREE TIERSubmit a contract for instant AI-powered risk analysis. Returns results synchronously. This is a software analysis tool — no attorney reviews the output.
Request Body
{
"document": {
"content": "Your contract text or base64 PDF...",
"contentType": "text/plain",
"filename": "contract.txt",
"documentType": "Service Agreement"
},
"client": {
"email": "user@example.com"
},
"consent": {
"termsAccepted": true,
"termsVersion": "2025-02-01",
"privacyPolicyAccepted": true,
"privacyPolicyVersion": "2025-02-01"
}
}Response (200 OK)
{
"id": "analysis_abc123def456",
"tier": "free",
"disclaimer": "This analysis was generated by AI software and has NOT been reviewed by a licensed attorney...",
"summary": {
"documentType": "Service Agreement",
"totalIssues": 7,
"highRisk": 2,
"mediumRisk": 3,
"lowRisk": 2,
"overallRiskLevel": "HIGH",
"riskScore": 72
},
"issues": [
{
"title": "No Limitation of Liability",
"riskLevel": "HIGH",
"category": "Liability & Risk Allocation",
"description": "This contract does not contain a limitation of liability clause...",
"section": "Missing",
"pageReference": null
}
],
"upgrade": {
"message": "Want attorney-verified analysis with case law citations and a legal memo?",
"url": "https://dott.legal/pricing",
"features": ["Licensed attorney review", "Contract language revisions", "..."]
},
"metadata": {
"analyzedAt": "2025-02-10T15:30:00Z",
"model": "ai-analysis-v1",
"processingTimeMs": 4500
}
}Note: Free tier requires only Terms of Service and Privacy Policy acceptance. No engagement letter or e-signature consent needed (no attorney relationship is formed). Size limits: 50KB text, 10MB PDF.
/documents/submitATTORNEY-VALIDATEDSubmit a document for attorney validation. Returns immediately with a tracking ID. Results delivered after licensed attorney review (typically within 24 hours).
Request Body
{
"document": {
"content": "base64-encoded-content-or-plain-text",
"contentType": "application/pdf" | "text/plain",
"filename": "contract.pdf",
"documentType": "Service Agreement"
},
"client": {
"name": "Jane Doe",
"email": "jane@example.com",
"company": "Acme Inc"
},
"consent": {
"termsAccepted": true,
"termsVersion": "2025-02-01",
"privacyPolicyAccepted": true,
"privacyPolicyVersion": "2025-02-01",
"engagementLetterAccepted": true,
"engagementLetterVersion": "2025-02-01",
"eSignatureConsent": true
},
"options": {
"priority": "standard" | "expedited",
"callbackUrl": "https://your-app.com/webhooks/dott",
"includeRedlines": true,
"includeMemo": true
}
}Response (202 Accepted)
{
"id": "doc_abc123def456",
"status": "pending",
"estimatedCompletion": "2025-02-11T12:00:00Z",
"statusUrl": "/api/v1/documents/doc_abc123def456/status",
"message": "Document received. Attorney validation in progress."
}Partnership required. Attorney-Validated tier requires a partnership agreement. Contact api@dott.legal for access. All consent fields must be true.
/documents/:id/statusATTORNEY-VALIDATEDCheck the current processing status of a submitted document.
Status Values
| pending | Document received, queued for processing |
| analyzing | AI analysis in progress |
| attorney_review | Attorney reviewing and validating |
| completed | Review complete, results available |
| delivered | Memo delivered to client email |
| failed | Processing failed |
/documents/:id/resultATTORNEY-VALIDATEDGet the completed analysis results. Only available when status is "completed" or "delivered".
Note: Returns the issue summary (technology output) but does NOT include the full attorney memo. The memo is delivered directly to the client via email to protect attorney-client privilege.
/healthPUBLICHealth check endpoint. No authentication required.
{
"status": "operational",
"version": "1.0.0",
"timestamp": "2025-02-10T10:00:00Z"
}/legal/terms | /legal/privacy | /legal/engagementPUBLICRetrieve the current legal documents. No authentication required.
{
"version": "2025-02-01",
"effectiveDate": "2025-02-01",
"content": "... full document text ...",
"url": "https://dott.legal/legal/terms"
}Webhooks
Attorney-Validated tier only
When a document review is completed, Dott sends a POST request to your callback URL.
Webhook Payload
{
"event": "document.completed",
"documentId": "doc_abc123def456",
"status": "completed",
"summary": {
"totalIssues": 7,
"highRisk": 2,
"mediumRisk": 3,
"lowRisk": 2,
"overallRiskLevel": "HIGH"
},
"resultUrl": "https://api.dott.legal/api/v1/documents/doc_abc123def456/result",
"timestamp": "2025-02-11T11:30:00Z"
}Verifying Webhook Signatures
// Node.js example
const crypto = require('crypto');
function verifySignature(payload, signature, secret) {
const expected = 'sha256=' + crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}Code Examples
FREE TIERAI Contract Analysis
cURL
curl -X POST https://api.dott.legal/api/v1/analyze \
-H "Authorization: Bearer dott_live_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"document": {
"content": "SERVICE AGREEMENT\n\n1. Provider will provide services...\n2. Payment terms TBD...\n3. No termination clause.",
"contentType": "text/plain",
"filename": "contract.txt",
"documentType": "Service Agreement"
},
"client": {
"email": "user@example.com"
},
"consent": {
"termsAccepted": true,
"termsVersion": "2025-02-01",
"privacyPolicyAccepted": true,
"privacyPolicyVersion": "2025-02-01"
}
}'Python
import requests
API_KEY = "dott_live_your_api_key"
BASE_URL = "https://api.dott.legal/api/v1"
# Analyze a contract (free tier - instant results)
response = requests.post(
f"{BASE_URL}/analyze",
headers={
"Authorization": f"Bearer {API_KEY}",
"Content-Type": "application/json"
},
json={
"document": {
"content": open("contract.txt").read(),
"contentType": "text/plain",
"filename": "contract.txt",
"documentType": "Service Agreement"
},
"client": {"email": "user@example.com"},
"consent": {
"termsAccepted": True,
"termsVersion": "2025-02-01",
"privacyPolicyAccepted": True,
"privacyPolicyVersion": "2025-02-01"
}
}
)
result = response.json()
print(f"Risk Score: {result['summary']['riskScore']}/100")
print(f"Issues Found: {result['summary']['totalIssues']}")
for issue in result['issues']:
print(f" [{issue['riskLevel']}] {issue['title']}")JavaScript / Node.js
const API_KEY = 'dott_live_your_api_key';
async function analyzeContract(contractText) {
const response = await fetch('https://api.dott.legal/api/v1/analyze', {
method: 'POST',
headers: {
'Authorization': `Bearer ${API_KEY}`,
'Content-Type': 'application/json'
},
body: JSON.stringify({
document: {
content: contractText,
contentType: 'text/plain',
documentType: 'Service Agreement'
},
client: { email: 'user@example.com' },
consent: {
termsAccepted: true,
termsVersion: '2025-02-01',
privacyPolicyAccepted: true,
privacyPolicyVersion: '2025-02-01'
}
})
});
const result = await response.json();
console.log(`Risk Score: ${result.summary.riskScore}/100`);
console.log(`High Risk Issues: ${result.summary.highRisk}`);
return result;
}
analyzeContract('Your contract text here...');Error Codes
| Code | Status | Description |
|---|---|---|
| MISSING_AUTH_HEADER | 401 | Authorization header is missing or invalid |
| INVALID_API_KEY | 401 | API key is invalid or inactive |
| RATE_LIMIT_EXCEEDED | 429 | Too many requests (paid tier) |
| FREE_TIER_LIMIT_EXCEEDED | 429 | Daily free tier limit reached (10/day) |
| CONSENT_REQUIRED | 400 | Required consent fields must be true |
| VALIDATION_ERROR | 400 | Request body validation failed |
| DOCUMENT_TOO_LARGE | 413 | Document exceeds free tier size limit |
| ANALYSIS_TIMEOUT | 504 | AI analysis timed out — try a shorter document |
| NOT_FOUND | 404 | Document not found |
| NOT_COMPLETED | 409 | Document review is not yet complete |
Legal Documents
Free tier requires acceptance of Terms of Service and Privacy Policy. Attorney-Validated tier additionally requires the Engagement Letter and e-signature consent.
Need Help?
We're here to help you integrate Dott into your application.