<!-- Generated by postman/integrator_context.py — do not edit by hand. Run: python scripts/generate_integrator_context.py -->

# RELD API — integration context for AI assistants

> **Generated at:** 2026-11-02T00:01:08Z
> **Jurisdictions with Postman examples:** 51 (50 states + PR)  
> **Hosted copy:** [https://www.realestatelicensedatabase.com/docs/RELD_API_CONTEXT.md](https://www.realestatelicensedatabase.com/docs/RELD_API_CONTEXT.md)

Paste this file into Cursor, Claude, ChatGPT, or Copilot when building against the
**Real Estate License Database (RELD)** API.

---

## 1. Source of truth (read this first)

1. **This file (`RELD_API_CONTEXT.md`)** — integration guide for coding agents: auth rules, canonical vs legacy endpoints, workflows, and pitfalls.
2. **`openapi.json`** — source of truth for exact parameters, request bodies, and response shapes. Fetch from production when implementing.
3. **Postman collection** — runnable examples; not the API contract.
4. **Marketing site copy** — orientation only; never treat website examples as the contract.

Do **not** invent endpoints, fields, request bodies, or response shapes.

OpenAPI (schemas): [https://app.realestatelicensedatabase.com/openapi.json](https://app.realestatelicensedatabase.com/openapi.json)

---

## 2. Product summary

RELD is a REST API over normalized U.S. real estate **licensee** records from official
state and territory sources. Typical uses:

- Agent/broker **license verification** at onboarding
- **Search** by name, brokerage, city, status, license type
- **Batch verify** up to 100 licenses per request (paid plans; not on free)
- **Supervision / affiliation** lookups where the source publishes relationships (CA-rich)

Production base URL: `https://app.realestatelicensedatabase.com`

---

## 3. Canonical licensee API

Use the **`/api/v1/licensees` endpoint family** as the canonical API for licensee search, verification, batch verification, affiliations, supervisors, and affiliates.

- **`GET /api/v1/licensees`** is the preferred search endpoint (requires `state`).
- **`GET /api/v1/licensees/search`** is legacy / backward-compatible only — omit `name`, `brokerage`, and `license_type` filters. New integrations should not use it unless a downstream system already depends on separate `first_name` / `last_name` parameters.
- Prefer **`GET /api/v1/licensees/{state}/{license_number}/supervisors`** over the legacy singular **`/supervisor`** path.
- **`GET /api/v1/licensees/changes`** is a reserved stub — do not build sync jobs on it yet.

**Start here for new integrations:**

| Method | Path | Purpose |
|--------|------|---------|
| GET | `/api/v1/coverage` | Public coverage metadata (no API key) |
| GET | `/api/v1/licensees` | Search licensees |
| GET | `/api/v1/licensees/verify` | Verify one license |
| POST | `/api/v1/licensees/batch` | Batch verify (≤100; paid plans) |
| GET | `/api/v1/licensees/{state}/{license_number}/supervisors` | Current supervisors |


---

## 4. Quick start

1. Sign up at `https://app.realestatelicensedatabase.com/dashboard/signup`
2. Create an API key at `https://app.realestatelicensedatabase.com/dashboard/api-keys` (raw key shown **once**)
3. Send `Authorization: Bearer <raw_key>` on authenticated calls (not `X-API-Key`)
4. Smoke-test:

Run in order when validating a new integration:

1. `GET https://app.realestatelicensedatabase.com/health` — no auth
2. `GET https://app.realestatelicensedatabase.com/api/v1/account` — `Authorization: Bearer <key>`
3. `GET https://app.realestatelicensedatabase.com/api/v1/licensees?state=TX&name=Smith&page=1&per_page=25` — `Authorization: Bearer <key>`
4. `GET https://app.realestatelicensedatabase.com/api/v1/licensees/verify?state=TX&license_number=9001878` — `Authorization: Bearer <key>`

---

## 5. Authentication and metering

- **Bearer only:** `Authorization: Bearer rel_…` (or your key prefix)
- **Public (no Bearer):** `/health`, `/api/v1/coverage`, `/openapi.json`, `/docs`
- **Unmetered** (Bearer required but does not count toward monthly usage): `/api/v1/account/usage`, `/api/v1/coverage`, `/api/v1/sources/coverage`
- All other `/api/v1/*` routes require a valid key and count toward plan limits
- **Monthly reset:** usage counters use the UTC calendar month (`year_month` as
  integer `YYYYMM`). They reset at 00:00 UTC on the 1st of each month — not 30
  days from sign-up.
- **What counts:** each authenticated metered request increments usage once,
  including hits and not-found verify results. Auth failures (401) do not.
  Dashboard Try-it searches share the same monthly allowance.
- **Free monthly limit:** Free accounts that reach the monthly lookup cap get
  HTTP 402 with code `free_monthly_limit_exceeded` (no overage charges). Paid
  plans that hit their monthly cap get HTTP 429.
- **Paid-plan only:** `POST /api/v1/licensees/batch` — free accounts get HTTP 402
  (`batch_verify_requires_paid_plan`); usage is not incremented
- **Assistant lookups:** On Free, Starter, and Growth, calls to `https://app.realestatelicensedatabase.com/mcp` use a separate allowance. Free accounts include 100 assistant lookups. This allocation does not reset. Starter includes 250 assistant lookups per month. Growth includes 1,500 assistant lookups per month. Enterprise is uncapped. On Enterprise, API calls and assistant calls count in one total. Service continues.
- **Jurisdictions:** all live states and territories are included on every
  plan. No per-state add-on.

### Error responses

**401** example:

```json
{
  "detail": "Missing API key"
}
```

**402** (subscription / past_due) example:

```json
{
  "detail": "Subscription required",
  "subscription_status": "past_due"
}
```

**402** (free monthly limit) example:

```json
{
  "error": "monthly_limit_exceeded",
  "code": "free_monthly_limit_exceeded",
  "detail": "Free account monthly lookup limit reached. Upgrade to continue.",
  "limit": 25,
  "used": 25,
  "year_month": 202605,
  "resets_on": "2026-06-01",
  "upgrade_url": "https://app.realestatelicensedatabase.com/dashboard/?upgrade=1"
}
```

**429** (paid monthly cap or trial cap) example:

```json
{
  "detail": "Monthly API request limit exceeded",
  "limit": 10000,
  "current_usage": 10001,
  "year_month": 202605
}
```

**503** example:

```json
{
  "detail": "Database connection pool exhausted. Please retry shortly."
}
```

**404** — `{detail: "Licensee not found"}` on canonical lookup misses.

**422** — validation errors (e.g. `GET /api/v1/licensees` without required `state`).

---

## Assistant connections (MCP)

A person can verify a U.S. real estate license from Claude or from ChatGPT.

- Server URL: `https://app.realestatelicensedatabase.com/mcp`
- Tools: `lookup_license`, `search_licensees`, `get_supervisors`, `get_coverage`
- Free accounts include 100 assistant lookups. This allocation does not reset.
- Starter includes 250 assistant lookups per month. Growth includes 1,500 assistant lookups per month. Enterprise is uncapped. On Enterprise, API calls and assistant calls count in one total. Service continues.
- Assistant features are in beta. The tools, the connection flow, and these allowances may change.
- An AI assistant may use more lookups than one dashboard search. One question can call the tools several times.
- On Free, Starter, and Growth, dashboard and API lookups use a separate monthly allowance.
- [Connect to Claude](https://www.realestatelicensedatabase.com/claude/)
- [Connect to ChatGPT](https://www.realestatelicensedatabase.com/chatgpt/)

---

## 6. Endpoint map (curated)

| Method | Path | Auth | Params | Notes |
|--------|------|------|--------|-------|
| GET | `/health` | public | — | Liveness: `{status, commit}`. No auth. |
| GET | `/api/v1/coverage` | public | — | Per-state record counts, freshness, relationship_coverage, and optional relationship_coverage_notes. No auth. |
| GET | `/api/v1/account` | bearer | — | Verify API key; returns `{id, name, is_active}`. |
| GET | `/api/v1/account/usage` | bearer (unmetered) | — | Monthly request totals by `year_month`. |
| GET | `/api/v1/licensees` | bearer | state (required), license_number, name, first_name, last_name, business_name, status, license_type, brokerage, city, page, per_page | Primary search. `{data: [licensee...], meta: {total, page, per_page}}`. per_page max 100. |
| GET | `/api/v1/licensees/search` | bearer | state, first_name, last_name, … | **Legacy** — backward-compatible only; prefer `GET /api/v1/licensees`. |
| GET | `/api/v1/licensees/verify` | bearer | state, license_number, license_type (optional) | Always 200: `{verified, licensee}`. Prefer over 404 for verification UX. |
| POST | `/api/v1/licensees/batch` | bearer (paid) | body: `{licenses: [{state, license_number}]}` (1–100 items) | Batch verify (Starter+); `{data: [{state, license_number, verified, licensee}]}` in input order. Free plans get 402 `batch_verify_requires_paid_plan`. |
| GET | `/api/v1/licensees/{state}/{license_number}` | bearer | path: state, license_number | Exact lookup. 404 if not found. `{data: licensee}`. |
| GET | `/api/v1/licensees/{state}/{license_number}/affiliations` | bearer | include_inactive, as_of, affiliate_role, relationship_type | Supervisor history. CA-rich; other states often `data: []`. |
| GET | `/api/v1/licensees/{state}/{license_number}/supervisors` | bearer | affiliate_role, relationship_type (optional) | All open supervisors (recommended). Empty list, not 404, when none. |
| GET | `/api/v1/licensees/{state}/{license_number}/supervisor` | bearer | — | **Legacy** — single supervisor; prefer `GET .../supervisors`. |
| GET | `/api/v1/licensees/{state}/{license_number}/affiliates` | bearer | page, per_page, filters | Roster of licensees supervised by this broker. |
| GET | `/api/v1/licensees/changes` | bearer | — | **Reserved stub** — empty `data`; not for production sync. |
| GET | `/api/v1/licenses/search` | bearer | state, license_number, first_name, last_name, … | Legacy flat license rows; no affiliation fields. |
| GET | `/api/v1/licenses/{state}/{license_number}` | bearer | path | Legacy lookup; `{data: null}` when missing (not 404). |
| GET | `/api/v1/licenses/license-type-counts` | bearer | state (optional) | Population breakdown by license type per state. |
| GET | `/api/v1/license-credentials/{credential_id}/hierarchy` | bearer | path: normalized credential UUID | Supervision chain for the normalized graph. The public licensee `id` is not this UUID. |
| GET | `/api/v1/states` | bearer | — | Active jurisdictions `[{abbreviation, name, is_active}]`. |
| GET | `/api/v1/sources` | bearer | — | Ingestion source status per state. |
| GET | `/api/v1/sources/coverage` | bearer (unmetered) | — | Legacy coverage shape `{states: [{state, status}]}`. |
| GET | `/api/v1/readiness` | bearer | — | Authenticated health: DB + data sanity checks. |
| POST | `/api/v1/api-keys` | bearer | body: `{label?}` | Create key; raw `key` returned once. |
| GET | `/api/v1/api-keys` | bearer | — | List keys (prefix only, not secret). |
| DELETE | `/api/v1/api-keys/{key_id}` | bearer | path: key_id | Revoke a key. |

For exhaustive path/query schemas, use OpenAPI. Per-state runnable examples live in the
Postman collection folder **5. States**.

### Canonical vs legacy

### Licensee family vs legacy `/licenses` routes

| Topic | Prefer (`/api/v1/licensees` family) | Legacy (`/api/v1/licenses`) |
|-------|--------------------------------------|-----------------------------|
| Search | `GET /api/v1/licensees` | `GET /api/v1/licenses/search` (flat rows) |
| Lookup miss | 404 on `/licensees/{state}/{n}` | `{data: null}` on `/licenses/{state}/{n}` |
| Verify | `GET /api/v1/licensees/verify` | No dedicated verify |
| Fields | Relationship provenance, `supervising_brokerages`, `current_affiliate_roles`, `last_verified` | Not included |

| Endpoint | Status | Guidance |
|----------|--------|----------|
| `GET /api/v1/licensees/search` | Legacy | Backward-compatible only; use `GET /api/v1/licensees` for new code |
| `GET /api/v1/licensees/{state}/{license_number}/supervisor` | Legacy | Single supervisor; prefer `/supervisors` |
| `GET /api/v1/licensees/changes` | Reserved stub | Empty `data` today — not for production sync |


### Search and verify (detail)

Canonical state-agnostic endpoints. Pass a 2-letter `state` and the API routes to the right per-state adapter under the hood. These are the endpoints integrators should call from production code; the per-state examples in folder 5 are for exploration only.

### Affiliations

Broker → salesperson supervision and affiliation history. Relationship availability varies by jurisdiction; inspect `relationship_coverage` and `supervision_empty_reason` on the canonical licensee object before interpreting an empty supervisor list. The supervisor endpoint itself continues to return an empty list rather than 404. Coverage values are `verified_graph`, `verified_graph_partial`, `source_context_only`, `source_not_published`, and `not_yet_ingested`. `supervision_empty_reason` is null when graph supervision is present; `license_expired` identifies an expired credential, `authoritative_absence` means verified graph coverage found no open supervisor, and the other coverage values identify coverage limits.

**Brokerage provenance:** `brokerage_source=verified_supervision` with `brokerage_confidence=verified` is graph-backed; `brokerage_source=business_name` with `brokerage_confidence=source_reported` is source-reported fallback text. Both are null when no brokerage is returned.

**Two flavors of "current supervisor":**
- `/supervisor` (singular) — legacy view, returns the single most recent open relationship. Use for backward compat only.
- `/supervisors` (plural) — recommended. Returns *all* currently open supervisor relationships, important for CA broker-associates who can be supervised by multiple responsible brokers simultaneously.

### Coverage metadata

Programmatic coverage metadata. Use these when surfacing "what data do you have?" in your own UI. The `Coverage (programmatic)` endpoint is intentionally unauthenticated so it can be used in marketing pages. Each state includes `state`, `status`, `refresh_frequency`, `record_count`, `active_record_count`, `last_updated`, and `relationship_coverage`; where clarification is useful it also includes `relationship_coverage_notes`. Relationship coverage is one of `verified_graph`, `verified_graph_partial`, `source_context_only`, `source_not_published`, or `not_yet_ingested`. `verified_graph_partial` is jurisdiction-level; Maine licensee rows resolve it per credential.

#### Coverage-state field glossary

Each object in `GET /api/v1/coverage` → `states` uses this shape:

| Field | Type / notes |
|-------|----------------|
| `state` | Two-letter jurisdiction code. |
| `status` | Published source availability/status for the jurisdiction. |
| `refresh_frequency` | Configured source refresh cadence, or null. |
| `record_count` | Current total license record count. |
| `active_record_count` | Current active license record count, or null. |
| `last_updated` | ISO-8601 timestamp of the last source data refresh, or null. |
| `relationship_coverage` | Jurisdiction-level relationship provenance: verified_graph, verified_graph_partial, source_context_only, source_not_published, or not_yet_ingested. |
| `relationship_coverage_notes` | Optional clarification for the jurisdiction's relationship coverage; the key is omitted when no note is needed. |

---

## 7. Public licensee object

Each search/verify/lookup row uses this shape:

| Field | Type / notes |
|-------|----------------|
| `id` | UUID string for the public license record. It is not a normalized credential UUID. |
| `full_name` | Person name when available; otherwise the business display name. |
| `license_number` | State-issued license number (natural key with state). |
| `license_number_display` | State-formatted license number when it differs from the stored natural key; otherwise the stored value. |
| `license_type` | Normalized type, title-cased (e.g. Broker, Salesperson). |
| `license_type_display` | Source-published license type label when available. |
| `status` | Normalized status, title-cased (e.g. Active, Inactive). |
| `state` | Two-letter jurisdiction code. |
| `issue_date` | Original/issue date as ISO date (YYYY-MM-DD), or null when not published. |
| `expiration_date` | ISO date (YYYY-MM-DD) or null. |
| `brokerage` | Primary brokerage name, preserving the legacy graph-first then business_name fallback. |
| `relationship_coverage` | Record-level relationship provenance enum: verified_graph, verified_graph_partial, source_context_only, source_not_published, or not_yet_ingested. Maine's state-level verified_graph_partial resolves per credential to verified_graph for entities or source_not_published for individuals. |
| `brokerage_source` | verified_supervision for a graph result, business_name for the source-reported fallback, or null. |
| `brokerage_confidence` | verified for graph supervision, source_reported for the business_name fallback, or null. |
| `supervision_empty_reason` | Why no graph supervisor is returned: license_expired, authoritative_absence, verified_graph_partial, source_context_only, source_not_published, or not_yet_ingested; null when graph supervision is present. authoritative_absence means verified graph coverage found no open supervisor. |
| `supervising_brokerages` | List of current supervising brokerage names. |
| `supervising_brokerages_detail` | List of {name, license_number, address} for current supervising brokerages (address may be null). |
| `employment_type` | Source-reported employment classification on the current employer edge (e.g. Associate Broker), or null. |
| `designated_brokers` | List of {name, license_number, address} designated/responsible brokers of the current employing entities (address may be null). |
| `designated_broker` | First entry of designated_brokers as {name, license_number, address}, or null. |
| `current_affiliate_roles` | List of current affiliate role codes (CA-rich). |
| `last_verified` | ISO-8601 UTC timestamp when RELD last saw this row in source data. |
| `first_name` | Individual first name, or null for pure business licenses. |
| `middle_name` | Individual middle name when published by the source, else null. |
| `last_name` | Individual last name, or null. |
| `business_name` | Registered business name, or null. |
| `city` | City when published by the source; null in many jurisdictions. |
| `address` | Address object with kind, line1, line2, city, county, region, postal_code, and country; null when unavailable. |
| `disciplinary_actions` | Source-published disciplinary action objects; empty when none are available. |
| `data_source_notes` | Record-level source and coverage notes; empty when no note applies. |

---

## 8. Workflow recipes

### Onboard an agent (verify license)

```bash
curl -sS "https://app.realestatelicensedatabase.com/api/v1/licensees/verify?state=TX&license_number=9001878" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Expect `{"verified": true, "licensee": {...}}` or `verified: false` with `licensee: null`.

**License number lookup variants:** verify and search accept the license number
as the agent or portal entered it. The API tries the raw value first, then a
growing set of state-specific alternate keys (padding, prefixes, punctuation
normalization) before returning not verified. You do **not** need to normalize
input client-side. When a match is found, the response `license_number` is
always our canonical stored value; `license_number_display` may differ for
states that publish a formatted display (e.g. Colorado).

Per-state rules (additive only — never rejects a format the caller sends):

| State | Accepted variants (examples) |
|-------|------------------------------|
| AL | Zero-pad bare numeric to 9 digits (`141925` → `000141925`) |
| AK | Bare numeric or `RECA` prefix |
| AZ | Case-insensitive (`sa648590000` → `SA648590000`) |
| AR | Prefix + padded numeric (`70189` → `SA00070189`) |
| CO | Prefix variants; strip dot between prefix and digits |
| CT | Insert `.` after RES/REB; try both prefixes for bare numeric |
| DE | With or without hyphen after 2-letter prefix |
| DC | Common type prefixes (SP, REO, BR, …) for bare numeric |
| FL | SL/BK prefix; collapse `SLS` typo to `SL` |
| HI | Portal `RS-85794` ↔ stored `RS.85794.0` |
| ID | SP prefix; collapse `SPSP` typo |
| IL | Strip periods from numeric |
| IN | Uppercase; RB/RC/BO prefix for bare numeric |
| IA | S/F/B/T letter prefix for bare numeric |
| KS | Strip SP/BR prefix; preserve zero-padding |
| KY | 5-digit legacy numbers resolve via source-record fallback |
| LA | Bare numeric ↔ `SALE.{n}-ACT` / `BROK.{n}-ACT` |
| ME | Strip spaces; try prefix set for bare numeric |
| SC, TX, VA, WI | Existing suffix/prefix variants (unchanged) |

Global: whitespace trimmed; case variants tried; punctuation stripped as an
additional key when helpful.

### Nightly batch verification (max 100 per request; paid plans)

Requires Starter, Growth, or Enterprise (including trials). Free accounts
receive HTTP 402 with code `batch_verify_requires_paid_plan`.

```bash
curl -sS -X POST "https://app.realestatelicensedatabase.com/api/v1/licensees/batch" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"licenses": [{"state": "TX", "license_number": "9001878"}, {"state": "CA", "license_number": "00006213"}]}'
```

### Search by name and brokerage

```bash
curl -sS "https://app.realestatelicensedatabase.com/api/v1/licensees?state=NY&name=johnson&brokerage=coldwell&status=active&page=1&per_page=25" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

### Affiliation check (CA example)

```bash
curl -sS "https://app.realestatelicensedatabase.com/api/v1/licensees/CA/00006213/supervisors" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Empty `data: []` is not an error. Inspect the licensee object's
`supervision_empty_reason` to distinguish authoritative absence from a source
or ingestion limitation.

---

## 9. Coverage and data expectations

- Live coverage: `GET https://app.realestatelicensedatabase.com/api/v1/coverage` (public)
- **51** jurisdictions have curated Postman examples; coverage metadata lists live vs planned
- **Relationships:** use each row's `relationship_coverage` and
  `supervision_empty_reason`; never interpret an empty supervisor list without
  its provenance metadata
- **Brokerage provenance:** `verified_supervision` / `verified` is graph-backed;
  `business_name` / `source_reported` is source text; source and confidence are
  both null when no brokerage is returned
- **`GET /api/v1/licensees/changes`:** reserved stub — do not build sync jobs against it yet
- City/address availability varies by state (see operator doc `docs/address-coverage.md` in the app repo)

---

## 10. Billing and account boundaries

- Self-serve **checkout** and **customer portal:** use the **dashboard** at
  `https://app.realestatelicensedatabase.com/dashboard/billing`, not as the primary integrator path
- `POST /api/v1/billing/checkout` and `POST /api/v1/billing/portal` exist but require an
  API key first; most customers manage billing in the browser UI
- API keys: dashboard UI or `POST /api/v1/api-keys` / `GET /api/v1/api-keys` / `DELETE /api/v1/api-keys/{id}`
- Dashboard users are plan-limited: Starter is single-user, Growth allows up to 5 users,
  and Enterprise allows unlimited users. Team invitations are managed in the dashboard,
  not through public API endpoints.

---

## 11. Out of scope for customer integrations

Do **not** use these in production customer apps:

- `/dashboard/*` — HTML session UI (signup, billing, key management)
- `/api/v1/admin/*` — cookie `dashboard_session` + platform admin only
- `POST /webhooks/stripe` — Stripe billing webhooks, not data access

---

## 12. Authoritative references

| Resource | URL |
|----------|-----|
| Integration guide (this file) | https://www.realestatelicensedatabase.com/docs/RELD_API_CONTEXT.md |
| OpenAPI (schemas) | https://app.realestatelicensedatabase.com/openapi.json |
| Swagger UI | https://app.realestatelicensedatabase.com/docs |
| Postman collection | https://www.realestatelicensedatabase.com/postman/License_API.postman_collection.json |
| Developer hub | https://www.realestatelicensedatabase.com/developers/ |
| LLM discovery index | https://www.realestatelicensedatabase.com/llms.txt |
| Contact | https://www.realestatelicensedatabase.com/contact/ |
| Email | support@realestatelicensedatabase.com |

---

## 13. Suggested prompt for your AI tool

```
Integrate our application with the RELD API using RELD_API_CONTEXT.md (https://www.realestatelicensedatabase.com/docs/RELD_API_CONTEXT.md).
Use the /api/v1/licensees endpoint family as the canonical API (GET /api/v1/licensees for search).
Do not invent endpoints, fields, or response shapes. For exact schemas, use https://app.realestatelicensedatabase.com/openapi.json.
Auth: Authorization: Bearer <api_key>. Do not use legacy /licensees/search unless required.
```

---

*Postman for trying requests; this file for building with AI.*
