REST API v1

API Documentation

Integrate contract generation and risk analysis into your product. Available on Pro and Enterprise plans.

Authentication

All API requests require a Bearer token in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Generate an API key in Dashboard → Settings → API Keys.

Base URL

https://your-domain.com

Endpoints

POST
/api/v1/generateGenerate a complete legal contract
Request body
{
  "type": "NDA",
  "party1": "Acme Corp",
  "party2": "TechFlow Inc",
  "description": "Software partnership NDA",
  "jurisdiction": "Delaware, USA",
  "language": "en",
  "tone": "formal"
}
Response
{
  "id": "clx1234...",
  "title": "NDA — Acme Corp & TechFlow Inc",
  "content": "<h1>NON-DISCLOSURE AGREEMENT</h1>...",
  "type": "NDA",
  "status": "DRAFT",
  "language": "en",
  "createdAt": "2026-07-29T10:00:00Z"
}
POST
/api/v1/analyzeRun AI risk analysis on a contract
Request body
{
  "content": "<h1>CONTRACT</h1><p>...</p>"
}
Response
{
  "overallScore": 62,
  "overallLevel": "HIGH",
  "risks": [
    {
      "title": "Unlimited Liability",
      "description": "No liability cap defined",
      "suggestion": "Add liability cap equal to 12 months fees",
      "level": "CRITICAL",
      "clauseRef": "§4"
    }
  ],
  "summary": "This contract heavily favors the Provider...",
  "positives": ["Clear IP ownership", "Defined payment terms"]
}
POST
/api/ai/summarizeGet plain-English AI summary of a contract
Request body
{
  "content": "<h1>CONTRACT</h1><p>...</p>",
  "contractTitle": "Service Agreement"
}
Response
{
  "summary": {
    "overview": "A service agreement between...",
    "parties": [{"name": "Acme Corp", "role": "Client"}],
    "keyTerms": [{"label": "Duration", "value": "12 months"}],
    "financialTerms": [{"label": "Monthly fee", "amount": "$5,000"}],
    "redFlags": [{"issue": "Unlimited liability", "severity": "high"}],
    "readingTime": 3
  }
}
POST
/api/webhooks/receiveZapier / Make webhook receiver — log events or query contracts
Request body
{
  "action": "get_contracts",
  "payload": { "limit": 5 }
}
Response
{
  "contracts": [
    {
      "id": "clx1234...",
      "title": "NDA — Acme Corp",
      "type": "NDA",
      "status": "SIGNED",
      "createdAt": "2026-07-29T10:00:00Z"
    }
  ]
}
POST
/api/contracts/[id]/approveContract approval workflow — submit, approve, or reject
Request body
{
  "action": "submit_review",
  "comment": "Ready for legal review"
}
Response
{
  "contract": {
    "id": "clx1234...",
    "status": "IN_REVIEW",
    "title": "Service Agreement"
  },
  "message": "Contract submit review successfully"
}

Rate limits

PlanRequests/monthRate limit
FreeNot available
Pro20060/hour
EnterpriseUnlimitedCustom

Webhooks

Configure webhooks in your dashboard to receive real-time events. All payloads are signed with HMAC-SHA256.

EventDescription
contract.createdFired when a new contract is created
contract.updatedFired when contract content is updated
contract.signedFired when all parties have signed
contract.analyzedFired when AI risk analysis completes
signature.requestedFired when a signature request is sent
signature.signedFired when one party signs
signature.declinedFired when a signer declines

Webhook signature verification

import crypto from "crypto";

function verifyWebhook(payload: string, signature: string, secret: string): boolean {
  const expected = crypto
    .createHmac("sha256", secret)
    .update(payload)
    .digest("hex");
  return crypto.timingSafeEqual(
    Buffer.from(expected),
    Buffer.from(signature)
  );
}