🔑 Authentication
API keys and OAuth 2.0 setup
📡 Endpoints
Contract review, drafting, and analysis
📦 SDKs
Python, JavaScript, and more
🔔 Webhooks
Real-time event notifications
Authentication
All API requests require authentication using an API key. You can generate API keys from your PureLaw.ai dashboard under Settings → API Keys.
Authorization: Bearer YOUR_API_KEY
Keep your API keys secure. Never expose them in client-side code or public repositories.
API Endpoints
Base URL: https://api.purelaw.ai/v1
Submit a contract for AI review. Returns risk scores, issues, and suggested redlines.
Generate contract clauses or complete documents using natural language prompts.
Ask questions about a contract and receive answers with clause citations.
Retrieve details and analysis results for a previously submitted contract.
Get market benchmarking data for specific clause types and industries.
Example Request
curl -X POST https://api.purelaw.ai/v1/contracts/review \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"document": "base64_encoded_document",
"document_type": "nda",
"options": {
"risk_scoring": true,
"suggest_redlines": true
}
}'
SDKs & Libraries
We offer official SDKs for popular programming languages to make integration easier.
from purelaw import PureLawClient
client = PureLawClient(api_key="YOUR_API_KEY")
# Review a contract
result = client.contracts.review(
document=open("contract.pdf", "rb"),
document_type="nda"
)
print(result.risk_score)
print(result.issues)
Webhooks
Configure webhooks to receive real-time notifications when contract analysis is complete or other events occur.
Create a new webhook endpoint to receive event notifications.
Supported events: contract.review.completed, contract.draft.completed, playbook.updated
Need Help?
Our developer support team is here to help with integration questions.
Contact Developer Support