Skip to main content
LeaseWizard Docs
API

LeaseWizard API

Public API reference for API-key clients.

The LeaseWizard API is a stable, read-only API for accessing organization lease data.

Base URL

https://api.leasewizard.ai/api/v1/

Authentication

Send your API key as a bearer token:

Authorization: Bearer lw_live_<prefix>_<secret>

API keys are organization-wide. Scopes control which resources a key can read. Raw keys are shown once when created; store them securely and rotate them if exposed.

Quick start

curl https://api.leasewizard.ai/api/v1/lease-contracts/ \
  -H "Authorization: Bearer lw_live_<prefix>_<secret>"

Pagination

List endpoints use page pagination:

?page=1&page_size=50

page_size can be up to 200.

Paginated responses use this shape:

{
  "count": 123,
  "next": "https://api.leasewizard.ai/api/v1/lease-contracts/?page=2",
  "previous": null,
  "results": []
}

Requests

Clients may send X-Request-Id. If omitted, LeaseWizard generates one. Every response includes X-Request-Id.

Errors

Errors use this envelope:

{
  "error": {
    "code": "missing_or_invalid_auth",
    "message": "API key required",
    "request_id": "req_..."
  }
}
StatusMeaning
401Missing, malformed, invalid, revoked, or expired API key
403API key is valid but missing the required scope
404Resource not found
429Rate limit exceeded

Rate limits

Default limit: 60 requests per minute per API key. Some keys may have custom limits.

Scopes

ScopeGrants access to
contracts:readLease contracts, lease events, amendments, and payments
documents:readDocuments, extracted facts, validations, and confidence records
reminders:readReminders and reminder rules
templates:readCustom field templates
reference:readAPI key metadata, scopes, health, event types, and schema fields

Endpoints

MethodPathScopeDescription
GET/lease-contracts/contracts:readList lease contracts.
GET/lease-contracts/{id}/contracts:readRetrieve a lease contract.
GET/lease-contracts/events/contracts:readList upcoming lease events.
GET/lease-contracts/{id}/amendments/contracts:readList amendments for a lease contract.
GET/lease-contracts/{id}/payments/contracts:readList payments for a lease contract.
GET/documents/documents:readList documents.
GET/documents/{id}/documents:readRetrieve a document.
GET/documents/{id}/facts/documents:readList current extracted facts.
GET/documents/{id}/validations/documents:readList document validations.
GET/documents/{id}/confidences/documents:readList field confidence records.
GET/reminders/reminders:readList reminders.
GET/reminders/{id}/reminders:readRetrieve a reminder.
GET/reminder-rules/reminders:readList reminder rules.
GET/reminder-rules/{id}/reminders:readRetrieve a reminder rule.
GET/custom-field-templates/templates:readList custom field templates.
GET/custom-field-templates/{id}/templates:readRetrieve a custom field template.
GET/event-types/reference:readList lease event types.
GET/schema-fields/reference:readList extraction schema fields.
GET/me/reference:readGet API key metadata.
GET/scopes/reference:readList available API key scopes.
GET/health/reference:readCheck API health.

Lease Contracts

List lease contracts

GET /lease-contracts/

Returns lease contracts for the API key's organization.

Query parameters:

NameTypeDescription
pageintegerPage number.
page_sizeintegerResults per page. Maximum 200.
statusstringFilter by lease status.
lease_statusstringAlias for status.
countrystringFilter by location country.
citystringFilter by location city.
tenantstringCase-insensitive tenant search.
landlordstringCase-insensitive landlord search.

Response: paginated V1LeaseContract.

Retrieve a lease contract

GET /lease-contracts/{id}/

Returns one lease contract by UUID.

List lease events

GET /lease-contracts/events/

Query parameters:

NameTypeDescription
monthsintegerFuture window in months. Defaults to 24. Maximum 120.
pageintegerPage number.
page_sizeintegerResults per page. Maximum 200.

Response: paginated V1LeaseEvent.

List lease contract amendments

GET /lease-contracts/{id}/amendments/

Response: paginated V1LeaseAmendment.

List lease contract payments

GET /lease-contracts/{id}/payments/

Query parameters:

NameTypeDescription
payment_typestringFilter by payment type.
pageintegerPage number.
page_sizeintegerResults per page. Maximum 200.

Response: paginated V1LeasePayment.

Documents

List documents

GET /documents/

Response: paginated V1Document.

Retrieve a document

GET /documents/{id}/

Returns one document by numeric ID.

List current document facts

GET /documents/{id}/facts/

Response: paginated V1CurrentFact.

List document validations

GET /documents/{id}/validations/

Query parameters:

NameTypeDescription
sourcestringfield for extraction validations or document for reviewed document fields.
statusstringFilter field validations by status.
pageintegerPage number.
page_sizeintegerResults per page. Maximum 200.

Response: paginated V1FieldValidation.

List document field confidences

GET /documents/{id}/confidences/

Response: paginated V1FieldConfidence.

Reminders

GET /reminders/
GET /reminders/{id}/
GET /reminder-rules/
GET /reminder-rules/{id}/

Reminder IDs and reminder rule IDs are UUIDs.

Custom Field Templates

GET /custom-field-templates/
GET /custom-field-templates/{id}/

Template IDs are numeric IDs.

Reference

GET /event-types/
GET /schema-fields/
GET /me/
GET /scopes/
GET /health/

Use reference endpoints to discover supported event types, extraction schema fields, API key metadata, valid scopes, and health status.

Core response objects

LeaseContract

{
  "id": "5a5f7d8e-2b4a-4a5d-9e9e-6c3b2a1f0d91",
  "contract_id": "LW-2026-001",
  "display_name": "Berlin Office Lease",
  "tenant": "Acme GmbH",
  "landlord": "Example Properties GmbH",
  "lease_type": "commercial",
  "initial_term": "5 years",
  "contract_start_date": "2026-01-01",
  "contract_end_date": "2030-12-31",
  "lease_agreement_date": "2025-11-15",
  "possession_date": "2025-12-15",
  "rent_start_date": "2026-01-01",
  "square_meterage": "1250.00",
  "permitted_use": "Office use",
  "service_charge": "EUR 4.50 per sqm monthly",
  "lease_status": "ACTIVE",
  "location": {
    "full_address": "Alexanderplatz 1, 10178 Berlin, Germany",
    "street_name": "Alexanderplatz",
    "street_number": "1",
    "unit_number": "Suite 400",
    "floor": "4",
    "city": "Berlin",
    "state_province": "Berlin",
    "postal_code": "10178",
    "country": "Germany",
    "country_code": "DE",
    "region": "Berlin",
    "building_name": "Alexander Tower",
    "property_type": "office"
  },
  "created_at": "2026-01-02T10:15:30Z",
  "updated_at": "2026-02-14T09:20:00Z"
}

LeaseEvent

{
  "id": "0f0d8c1a-1c3a-4f70-a6a8-1d2b3c4d5e6f",
  "document_id": 4821,
  "event_type": "RENEWAL_NOTICE",
  "title": "Renewal notice deadline",
  "description": "Notice must be provided 180 days before lease expiry.",
  "calculated_date": "2030-07-04",
  "status": "UPCOMING",
  "requires_notice": true,
  "notice_period_days": 180,
  "related_amount": null,
  "contract": {
    "id": "5a5f7d8e-2b4a-4a5d-9e9e-6c3b2a1f0d91",
    "contract_id": "LW-2026-001",
    "display_name": "Berlin Office Lease",
    "tenant": "Acme GmbH",
    "landlord": "Example Properties GmbH",
    "contract_start_date": "2026-01-01",
    "contract_end_date": "2030-12-31"
  }
}

LeaseAmendment

{
  "id": "7f0648a3-50c0-45d4-b1c1-d30f4f0a68fb",
  "document_id": 4930,
  "document_uuid": "b1d8a0e8-4d66-4b53-9b72-2386c2f4982e",
  "amendment_type": "rent_adjustment",
  "effective_date": "2027-01-01",
  "execution_date": "2026-11-20",
  "tenant": "Acme GmbH",
  "landlord": "Example Properties GmbH",
  "description": "Annual base rent adjusted for the renewal period.",
  "changes": {
    "base_rent": {
      "from": "25000.00",
      "to": "26500.00",
      "currency": "EUR",
      "frequency": "monthly"
    }
  },
  "sequence": 1,
  "parent_match_confirmed": true,
  "created_at": "2026-11-21T08:30:00Z",
  "updated_at": "2026-11-21T08:30:00Z"
}

LeasePayment

{
  "id": 92015,
  "lease_contract_id": "5a5f7d8e-2b4a-4a5d-9e9e-6c3b2a1f0d91",
  "document_id": 4821,
  "source_document_id": 4930,
  "payment_type": "base_rent",
  "period_number": 1,
  "start_date": "2027-01-01",
  "end_date": "2027-12-31",
  "amount": "26500.00",
  "currency": "EUR",
  "frequency": "monthly",
  "source": "extracted",
  "notes": "Adjusted base rent for 2027.",
  "created_at": "2026-11-21T08:35:00Z",
  "updated_at": "2026-11-21T08:35:00Z"
}

Document

{
  "id": 4821,
  "uuid": "f9e76764-7911-42b6-b00f-6e4fe2b1a42d",
  "document_type": "lease_contract",
  "classification_confidence": {
    "score": 0.98
  },
  "selected_fields": ["tenant", "landlord", "contract_end_date", "base_rent"],
  "custom_fields": null,
  "uploaded_at": "2026-01-02T09:45:00Z",
  "status": "SUCCESS",
  "task_id": "task_01HR6K8J9W4X2",
  "error_message": null,
  "processed_at": "2026-01-02T09:49:30Z",
  "current_extraction_run_id": 12844
}

CurrentFact

{
  "id": 318901,
  "field_key": "contract_end_date",
  "idx": 0,
  "value_json": "2030-12-31",
  "has_override": false,
  "override_id": null,
  "extracted_value_json": "2030-12-31",
  "raw_text": "The term expires on 31 December 2030.",
  "unit": null,
  "currency": null,
  "confidence": 0.97,
  "provenance_json": {
    "page": 4,
    "section": "Term"
  },
  "created_at": "2026-01-02T09:49:30Z"
}

FieldValidation

{
  "id": 7812,
  "field_key": "rent_start_date",
  "fact_idx": 0,
  "level": "warning",
  "code": "date_before_start",
  "message": "Rent start date is before the contract start date.",
  "status": "open",
  "created_at": "2026-01-02T09:49:35Z"
}

FieldConfidence

{
  "id": 44219,
  "field_key": "base_rent",
  "page_number": 8,
  "confidence": 0.94,
  "text_snippet": "Tenant shall pay monthly base rent of EUR 25,000.",
  "created_at": "2026-01-02T09:49:35Z"
}

LeaseEventReminder

{
  "id": "1a0c7c8e-9d9b-42aa-8f3d-d720b974f7a1",
  "lease_event": {
    "id": "0f0d8c1a-1c3a-4f70-a6a8-1d2b3c4d5e6f",
    "event_type": "RENEWAL_NOTICE",
    "title": "Renewal notice deadline",
    "calculated_date": "2030-07-04",
    "status": "UPCOMING"
  },
  "user_id": 1042,
  "offset_days": -30,
  "message": "Review renewal notice requirements.",
  "paused": false,
  "last_triggered_at": null,
  "rule_id": "ab3c1c99-fac7-4264-a9ad-4e881b2b3306",
  "next_send_at": "2030-06-04T09:00:00Z",
  "created_at": "2026-01-03T10:00:00Z",
  "updated_at": "2026-01-03T10:00:00Z"
}

LeaseEventReminderRule

{
  "id": "ab3c1c99-fac7-4264-a9ad-4e881b2b3306",
  "name": "Renewal notice reminders",
  "event_types": [
    {
      "code": "RENEWAL_NOTICE",
      "label": "Renewal Notice Deadline"
    }
  ],
  "offset_days": -30,
  "message": "Review renewal notice requirements.",
  "recipient_id": 1042,
  "paused": false,
  "created_by_id": 1042,
  "created_at": "2026-01-03T10:00:00Z",
  "updated_at": "2026-01-03T10:00:00Z"
}

CustomFieldTemplate

{
  "id": 77,
  "uuid": "0e39294d-073e-45f5-96da-a3e937760327",
  "name": "Retail lease fields",
  "fields": [
    {
      "key": "opening_hours",
      "label": "Opening hours",
      "type": "string"
    },
    {
      "key": "turnover_rent",
      "label": "Turnover rent",
      "type": "number"
    }
  ],
  "visibility": "ORGANIZATION",
  "created_by_id": 1042,
  "created_at": "2026-01-05T12:00:00Z",
  "updated_at": "2026-01-05T12:00:00Z"
}

OpenAPI

Machine-readable schema:

https://api.leasewizard.ai/api/v1/openapi.yaml
LeaseWizard API | LeaseWizard