API

The API is part of the Business plan. Your key is shown once, when you subscribe, and again if you rotate it on your account page.

Generate one document

curl -X POST https://legalforge-12p.pages.dev/api/v1/generate \
  -H "Authorization: Bearer lf_YOUR_KEY" -H "Content-Type: application/json" \
  -d '{"type":"privacy-policy","info":{"businessName":"Acme","websiteUrl":"https://acme.example","email":"hi@acme.example","country":"United States","businessType":"saas","collectsPersonalData":true,"usesCookies":true}}'

type is one of privacy-policy, terms-of-service, cookie-policy, disclaimer, refund-policy, dmca-policy. The reply is { "document": "<markdown>", "type": "...", "format": "markdown" }. Optional Business fields in info: whiteLabelName, whiteLabelLogoUrl (https), customClauses.

Bulk generation

POST /api/v1/bulk with { "items": [ { "type": "...", "info": { ... } } ] }, up to 50 items. The reply has one entry per item, with a document or an error.

Errors: 401 without a valid key, 403 with plan_feature when the plan does not include the API, 400 for bad input.