Developer Platform

API documentation

Build on LexLathos — generate documents, manage drafts and integrate the advocate marketplace programmatically.

Authentication

Authenticate with a Clerk session token or an API key in the Authorization: Bearer <token> header.

REST · JSON

Document generation

POST/api/generate auth

Generate a legal document from a matter description, document type and language.

POST/api/modify auth

Refine an existing document — simplify, translate or add clauses.

PATCH/api/update auth

Update a saved draft's content or metadata.

GET/api/pdf auth

Export a draft as a PDF document.

Marketplace & consultations

GET/api/marketplace/advocatespublic

List advocates with filters for practice area, city, language and sorting.

POST/api/marketplace/consultations auth

Book a consultation request with an advocate.

GET/api/marketplace/advocates/me auth

Get the signed-in advocate's profile.

POST/api/marketplace/advocates/[id]/reviews auth

Submit a rating and review for an advocate.

POST/api/marketplace/requests/[id]/respond auth

Accept or decline an incoming consultation request.

POST/api/marketplace/requests/[id]/cancel auth

Cancel a consultation request you sent.

Account, payments & content

GET/api/user auth

Get the signed-in user's profile and role.

GET/api/user/credits auth

Get the user's credit balance.

POST/api/payment/create auth

Create a Razorpay order for credits or a plan.

POST/api/payment/verify auth

Verify a completed payment signature.

POST/api/subscription/cancel auth

Cancel an active subscription.

GET/api/templatespublic

List available document templates.

GET/api/invoices auth

List the user's payment invoices.

Try the API right now

You don't need a key in demo mode. Generate a document or list advocates from the product itself, or read the source endpoints under /api/*.