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

FREE

AI Contract Analysis

Instant AI-powered risk assessment. No attorney review.

$0 / 10 analyses per day
Issue identification & risk scoring (0-100)
Risk categorization (HIGH / MEDIUM / LOW)
Section & page references
Synchronous response (instant results)
PDF and plain text support
No case law citations
No suggested contract edits
No attorney memo

Consent required: Terms of Service, Privacy Policy. No engagement letter needed.

Best for: Quick risk assessment, triage, initial screening.

ATTORNEY-VALIDATED

Full Legal Review

Licensed attorney reviews every analysis before delivery.

$199 / per document
Everything in Free tier
Licensed NY attorney review of every issue
Specific contract language revisions (copy-paste ready)
Case law citations supporting each finding
Professional legal memorandum via email
Attorney-client privilege on the review memo
Webhook callbacks on completion

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/v1

Authentication

All API requests require authentication using a Bearer token in the Authorization header.

Request Header

Authorization: Bearer dott_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Keep your API key secure. Never expose it in client-side code or public repositories. Contact api@dott.legal to request API access.

Rate Limiting

TierEndpointLimit
Free (AI Analysis)POST /analyze10 requests / day
Attorney-ValidatedPOST /documents/submit100 requests / minute
Read endpointsGET /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

POST/analyzeFREE TIER

Submit 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.

POST/documents/submitATTORNEY-VALIDATED

Submit 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.

GET/documents/:id/statusATTORNEY-VALIDATED

Check the current processing status of a submitted document.

Status Values

pendingDocument received, queued for processing
analyzingAI analysis in progress
attorney_reviewAttorney reviewing and validating
completedReview complete, results available
deliveredMemo delivered to client email
failedProcessing failed
GET/documents/:id/resultATTORNEY-VALIDATED

Get 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.

GET/healthPUBLIC

Health check endpoint. No authentication required.

{
  "status": "operational",
  "version": "1.0.0",
  "timestamp": "2025-02-10T10:00:00Z"
}
GET/legal/terms | /legal/privacy | /legal/engagementPUBLIC

Retrieve 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

CodeStatusDescription
MISSING_AUTH_HEADER401Authorization header is missing or invalid
INVALID_API_KEY401API key is invalid or inactive
RATE_LIMIT_EXCEEDED429Too many requests (paid tier)
FREE_TIER_LIMIT_EXCEEDED429Daily free tier limit reached (10/day)
CONSENT_REQUIRED400Required consent fields must be true
VALIDATION_ERROR400Request body validation failed
DOCUMENT_TOO_LARGE413Document exceeds free tier size limit
ANALYSIS_TIMEOUT504AI analysis timed out — try a shorter document
NOT_FOUND404Document not found
NOT_COMPLETED409Document 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.

API Access

Request API keys and discuss pricing

api@dott.legal

Technical Support

Integration questions and troubleshooting

support@dott.legal