Getting Started

Getting Started

Get up and running with the Legistry AI API in under 5 minutes.

Prerequisites

Step 1: Get Your API Key

  1. Log in to app.legistry.ai (opens in a new tab)
  2. Navigate to Settings → API Keys
  3. Click Generate New Key
  4. Copy your key — you'll only see it once
⚠️

Keep your API key secret. Never expose it in client-side code or public repositories.

Step 2: Make Your First API Call

Test your connection with a simple health check:

curl https://api.legistry.ai/health

Expected response:

{
  "status": "healthy",
  "version": "1.0.0",
  "services": {
    "database": "connected",
    "redis": "connected",
    "qdrant": "connected"
  }
}

Step 3: Authenticate

All API requests require a Bearer token. You can use either:

  • JWT Token (from login) — for user-scoped requests
  • API Key — for server-to-server integration
curl -X GET https://api.legistry.ai/api/v1/contracts \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json"

See the Authentication guide for full details.

Step 4: Create Your First Contract

curl -X POST https://api.legistry.ai/api/v1/contracts \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "NDA - Acme Corp",
    "type": "nda",
    "counterparty": "Acme Corporation"
  }'

Response:

{
  "id": "c3f8a1b2-...",
  "title": "NDA - Acme Corp",
  "type": "nda",
  "status": "draft",
  "counterparty": "Acme Corporation",
  "created_at": "2026-03-08T12:00:00Z"
}

Step 5: Draft with AI

Use AI to generate the contract content:

curl -X POST https://api.legistry.ai/api/v1/contracts/c3f8a1b2-.../draft-ai \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "prompt": "Draft a standard mutual NDA for a software development partnership",
    "party_name": "My Company LLC"
  }'

What's Next?