Docs · v1

REST API

Programmatic access to your team's lease abstracts. Built for warehouse syncs, BI dashboards, and internal CRE tooling. Available on the Business plan.

Quickstart

Three steps to your first request. Issue a key from Settings → API, set the Bearer header, hit the endpoint.

bash
# 1. Save your key as an env var
export LEASEBRIEF_KEY=lb_live_your-key-here

# 2. Pull your last 10 abstracts
curl -sS https://leasebrief.com/api/v1/leases?limit=10 \
  -H "Authorization: Bearer $LEASEBRIEF_KEY" | jq

That's it. The response is a JSON envelope with data (an array of leases) and meta (count + limit echo).

Authentication

Every request must include an Authorization header with a Bearer token. Keys live in Settings → API. Each key is scoped to a single team.

header
Authorization: Bearer lb_live_<your-key>

Plan-tier checks run on every request. If your team downgrades from Business, all requests immediately return 403. Re-upgrading restores existing keys automatically — no need to reissue.

Base URL

https://leasebrief.com/api/v1

List leases

GET/leases

Lists the most recent lease abstracts for your team. Returns up to 100 per request, ordered by upload date descending.

Query parameters

ParamTypeDefaultDescription
limitnumber50Records to return (1–100).
statusstringFilter — uploaded · processing · ready · failed.

cURL

bash
curl -sS https://leasebrief.com/api/v1/leases?status=ready&limit=10 \
  -H "Authorization: Bearer $LEASEBRIEF_KEY"

JavaScript (fetch)

javascript
const res = await fetch(
  "https://leasebrief.com/api/v1/leases?limit=10",
  {
    headers: {
      Authorization: `Bearer ${process.env.LEASEBRIEF_KEY}`,
    },
  }
);
if (!res.ok) throw new Error(`API ${res.status}`);
const { data } = await res.json();
console.log(`Got ${data.length} leases`);

Python (requests)

python
import os, requests

r = requests.get(
    "https://leasebrief.com/api/v1/leases",
    headers={"Authorization": f"Bearer {os.environ['LEASEBRIEF_KEY']}"},
    params={"limit": 10},
    timeout=10,
)
r.raise_for_status()
print(f"Got {len(r.json()['data'])} leases")

Response shape

json
{
  "data": [
    {
      "id": "uuid",
      "file_name": "alkermes-lease.pdf",
      "status": "ready",
      "abstract": {
        "property": { "building_name": "...", "rentable_sqft": "2400" },
        "parties":  { "tenant": "Brewhouse Coffee" },
        "term":     { "commencement_date": "2026-03-01" },
        "rent":     { "year_1_annual_base": "$115,200" },
        "critical_dates": [
          { "date": "2031-08-01", "label": "Renewal notice", "source_section": "§2.3" }
        ],
        "field_citations": {
          "rent": { "section": "§3.1", "quote": "Annual base rent of $115,200..." }
        }
      },
      "created_at": "2026-05-02T20:14:31.123Z",
      "model_used": "claude-sonnet-4-6"
    }
  ],
  "meta": { "count": 10, "limit": 10 }
}

Get a single lease

GET/leases/{id}

Returns the full abstract for one lease, including the error_message field if extraction failed.

cURL

bash
curl -sS https://leasebrief.com/api/v1/leases/<uuid> \
  -H "Authorization: Bearer $LEASEBRIEF_KEY"

Errors

CodeMeaning
400Lease id is not a UUID.
404Lease doesn't exist or belongs to a different team.

Error codes

CodeMeaning
400Bad request — usually a malformed parameter.
401Missing, malformed, or revoked API key.
403Plan no longer supports API access.
404Resource not found or not in your team.
500Server error — check status.leasebrief.com.

All error responses are JSON:

json
{ "error": "Invalid or revoked API key" }

Rate limits

During the private beta, rate limits are advisory rather than strictly enforced. Plan for ~60 requests/minute per team. We'll publish a hard rate-limit policy with an X-RateLimit-Remaining header before any enforcement lands — no surprises.

Webhooks (coming)

Webhooks for lease.ready, lease.failed, and critical_date.upcoming are on the roadmap. Email hello@leasebrief.com if you need them sooner — happy to wire a custom forward for early customers.