{"openapi":"3.1.0","info":{"title":"SignedOff API","description":"The SignedOff Permit Data API returns live building-permit status pulled from\nofficial city and county portals, so you never scrape a portal or manage a\ngovernment login yourself.\n\n## Coverage\n\nThe jurisdiction is detected automatically from the permit number. Supported\nportal families include **LADBS** (City of Los Angeles), **Accela Citizen\nAccess** cities, **EPIC-LA** (LA County), and **EnerGov** jurisdictions, with\nnew cities added regularly. `GET /api/v1/jurisdictions` returns the live,\nauthoritative list.\n\n## What you can do\n\n- **Permit status** — `GET /api/v1/permits/{permit_number}/status`. The\n  jurisdiction is auto-detected from the permit number; when several match\n  (common across Accela cities) the API responds `300` so you can retry with\n  `?jurisdiction=`.\n- **Batch lookups** — `POST /api/v1/permits/batch-status` for up to 25 permits\n  in one call; cache hits return immediately, misses trigger concurrent scrapes.\n- **Inspections & history** — per-permit inspection records and the full\n  status-change timeline.\n- **Jurisdictions** — list supported areas, coverage stats and analytics, and\n  request a new one.\n- **Webhooks and events** — receive signed, at-least-once deliveries for permit\n  changes, then reconcile potentially duplicated or out-of-order arrivals\n  against the stable, oldest-first `GET /api/v1/events` feed.\n\n## Data freshness\n\nResponses serve recently cached data when it is still fresh and fall back to a\nlive scrape otherwise, so you always see current portal state. Paid plans can\nforce a live re-scrape with `?force_refresh=true`.\n\n## Try it without an account\n\nAnonymous requests and sandbox keys (`sk_test_…`) return a curated demo dataset\nwith the exact response shape of live data — copy-paste from the\n[playground](https://signedoff.io/developers/playground) into production\nunchanged.\n\nAuthenticate live requests with the **`X-API-Key`** header. Sign up free at\nhttps://signedoff.io/developers/signup.\n","version":"1.0.0","contact":{"name":"SignedOff API Support","url":"https://signedoff.io/developers","email":"support@signedoff.io"},"license":{"name":"SignedOff API Terms","url":"https://signedoff.io/developers/terms"},"termsOfService":"https://signedoff.io/developers/terms","x-compatibility-policy":"https://signedoff.io/developers/compatibility","x-changelog":"https://signedoff.io/developers/changelog","x-status-page":"https://signedoff.io/developers/status","x-service-level-policy":"https://signedoff.io/developers/service-levels","x-data-retention-policy":"https://signedoff.io/developers/data-retention"},"paths":{"/api/v1/permits/{permit_number}/watch":{"post":{"tags":["API v1","Watches"],"summary":"Watch a permit","operationId":"watchPermit","parameters":[{"name":"permit_number","in":"path","required":true,"schema":{"type":"string","title":"Permit Number"}},{"name":"jurisdiction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"}}],"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchResponse"}}}},"200":{"description":"Already watching (idempotent)"},"300":{"description":"Multiple jurisdictions match — resubmit with ?jurisdiction="},"400":{"description":"Watch limit reached or invalid jurisdiction","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Sandbox keys cannot watch","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"404":{"description":"Jurisdiction not supported","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"delete":{"tags":["API v1","Watches"],"summary":"Stop watching a permit","operationId":"unwatchPermit","parameters":[{"name":"permit_number","in":"path","required":true,"schema":{"type":"string","title":"Permit Number"}},{"name":"jurisdiction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnwatchResponse"}}}},"404":{"description":"No active watch for this key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/permits/watches":{"get":{"tags":["API v1","Watches"],"summary":"List active watches","operationId":"listWatches","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WatchListResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/permits/search":{"get":{"tags":["API v1","Discovery"],"summary":"Search permits by criteria (discovery)","description":"Find recent LA-County permits by city or county scope, one or more parcel APNs/AINs, ZIP, radius, type, date, valuation, or status. A repeated parcel parameter supports portfolios of up to 25 properties. Live query over LADBS + EPIC-LA. Current source feeds do not expose contractor identity, so contractor is rejected with 400 unsupported_filter rather than ignored. Pagination reads live sources and is best-effort rather than snapshot-consistent, so source changes between pages can cause duplicates or gaps. Cursors are signed, bound to the original filters and jurisdiction scope, and expire 15 minutes after issue; restart from the first page after expiry. Requires the Permit Discovery add-on. Responses include per-source freshness metadata and warn when a source's latest published issue date is older than the requested range. Date filters are issuance dates. A retryable 503 with Retry-After is returned instead of a definitive zero while a source is refreshing or lagging.","operationId":"searchPermits","parameters":[{"name":"zip","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"5-digit ZIP","title":"Zip"},"description":"5-digit ZIP"},{"name":"city","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"City scope. Currently accepts Los Angeles (and common City of Los Angeles aliases) and selects LADBS.","title":"City"},"description":"City scope. Currently accepts Los Angeles (and common City of Los Angeles aliases) and selects LADBS."},{"name":"county","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"County scope. Currently accepts Los Angeles County (and common aliases) and selects EPIC-LA's unincorporated-county records.","title":"County"},"description":"County scope. Currently accepts Los Angeles County (and common aliases) and selects EPIC-LA's unincorporated-county records."},{"name":"parcel","in":"query","required":false,"schema":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}],"description":"10-digit LA APN/AIN. Repeat up to 25 times for a bounded property portfolio; spaces and hyphens are normalized.","title":"Parcel"},"description":"10-digit LA APN/AIN. Repeat up to 25 times for a bounded property portfolio; spaces and hyphens are normalized."},{"name":"contractor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Reserved but unsupported because current LADBS and EPIC-LA discovery feeds do not expose contractor identity; supplying it returns 400 unsupported_filter.","title":"Contractor"},"description":"Reserved but unsupported because current LADBS and EPIC-LA discovery feeds do not expose contractor identity; supplying it returns 400 unsupported_filter."},{"name":"lat","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lat"}},{"name":"lon","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lon"}},{"name":"radius_mi","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"Radius in miles; requires lat+lon","title":"Radius Mi"},"description":"Radius in miles; requires lat+lon"},{"name":"permit_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Building | Electrical | Mechanical | Plumbing","title":"Permit Type"},"description":"Building | Electrical | Mechanical | Plumbing"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"}},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"}},{"name":"value_min","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Value Min"}},{"name":"value_max","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Value Max"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"jurisdiction","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ladbs | epicla (omit to search both)","title":"Jurisdiction"},"description":"ladbs | epicla (omit to search both)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":50,"minimum":1,"default":25,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Opaque signed v1 cursor from pagination.next_cursor. Valid for 15 minutes and only with the original filters and jurisdiction scope.","title":"Cursor"},"description":"Opaque signed v1 cursor from pagination.next_cursor. Valid for 15 minutes and only with the original filters and jurisdiction scope."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiscoverySearchResponse"}}}},"400":{"description":"Invalid or missing filters","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"402":{"description":"Discovery add-on not enabled","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"403":{"description":"Discovery not available for sandbox keys","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"description":"Discovery quota or burst exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Discovery source unavailable, refreshing, or lagging; honor Retry-After","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/permit-resolutions":{"post":{"tags":["API v1","Permits"],"summary":"Resolve a permit number to a canonical identity","description":"Normalizes a permit number and jurisdiction into a stable canonical permit ID. Resolution itself does not scrape a municipal portal. resource_available reports whether a tenant-neutral representation already exists; use status_url to populate or refresh it.","operationId":"resolvePermit","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermitResolutionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermitResolutionResponse"}}}},"300":{"description":"Permit number is compatible with multiple jurisdictions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermitResolutionCandidatesResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/permits/{permit_id}":{"get":{"tags":["API v1","Permits"],"summary":"Get a canonical permit resource","description":"Returns the latest successful tenant-neutral permit representation by stable canonical ID. Important fields include source, observation time, normalization version, confidence, availability, and retained raw value.","operationId":"getCanonicalPermit","parameters":[{"name":"permit_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Permit Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CanonicalPermitResource"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/saved-searches":{"post":{"tags":["API v1","Discovery"],"summary":"Create a monitored discovery query","description":"Save discovery filters for daily monitoring. The first successful evaluation establishes a baseline without emitting historical matches. CRUD and background evaluations do not consume API credits.","operationId":"createSavedSearch","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["API v1","Discovery"],"summary":"List saved discovery queries","description":"List this key's saved queries. Does not consume API credits.","operationId":"listSavedSearches","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchListResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/saved-searches/{saved_search_id}":{"get":{"tags":["API v1","Discovery"],"summary":"Get a saved discovery query","operationId":"getSavedSearch","parameters":[{"name":"saved_search_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Saved Search Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"patch":{"tags":["API v1","Discovery"],"summary":"Update or pause a monitored discovery query","description":"Changing criteria clears its first-seen identities and makes the next successful evaluation a new baseline, so historical results do not flood the event feed.","operationId":"updateSavedSearch","parameters":[{"name":"saved_search_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Saved Search Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"delete":{"tags":["API v1","Discovery"],"summary":"Delete a saved discovery query","description":"Permanently deletes the definition and its retained first-seen match identities. Existing canonical events follow the normal event-retention policy.","operationId":"deleteSavedSearch","parameters":[{"name":"saved_search_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Saved Search Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SavedSearchDeleteResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/operations/{operation_id}":{"get":{"tags":["API v1","Operations"],"summary":"Get asynchronous operation status","description":"Poll a durable operation created by `Prefer: respond-async` or an explicit browser-backed cache miss. Use the same `X-API-Key` that created the operation. A successful terminal operation includes its stable permit response in `result`; a failed terminal operation includes a typed `error`.","operationId":"getOperation","parameters":[{"name":"operation_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Operation Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiOperationResponse"}}}},"404":{"description":"Operation not found for this API key","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/events":{"get":{"tags":["API v1","Events"],"summary":"List API events","description":"Read the authenticated API key's canonical event feed, including permit changes, subscribed first-observed permit events, and durable operation completions, in stable, oldest-first ingestion order. This order is authoritative for reconciliation and can differ from webhook arrival order and from `occurred_at` chronology. Pass the opaque, API-key-bound `next_cursor` back as `cursor` to continue or poll for newer events. A cursor becomes invalid when its event expires after 30 days.","operationId":"listEvents","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiEventsResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/permits/{permit_number}/status":{"get":{"tags":["API v1","Permits"],"summary":"Get permit status","description":"Look up the current status of a building permit. Returns cached data if available, or triggers a live scrape for supported jurisdictions. When multiple jurisdictions match (common with Accela cities), pass `?jurisdiction=slug` to specify which one. Paid live-key callers can combine `force_refresh=true` with `Prefer: respond-async` to receive a durable 202 operation instead of holding the connection open. Explicit browser-backed cache misses also return a durable 202 automatically so Chromium never runs in the HTTP service.","operationId":"getPermitStatus","parameters":[{"name":"permit_number","in":"path","required":true,"schema":{"type":"string","title":"Permit Number"}},{"name":"force_refresh","in":"query","required":false,"schema":{"type":"boolean","description":"Force a live re-scrape (paid plans only)","default":false,"title":"Force Refresh"},"description":"Force a live re-scrape (paid plans only)"},{"name":"jurisdiction","in":"query","required":false,"schema":{"type":"string","description":"Jurisdiction slug to use directly (e.g. aca:sbc). Skips auto-detection. Use when multiple jurisdictions match.","title":"Jurisdiction"},"description":"Jurisdiction slug to use directly (e.g. aca:sbc). Skips auto-detection. Use when multiple jurisdictions match."},{"name":"near","in":"query","required":false,"schema":{"type":"string","description":"Client location as \"lat,lon\" (e.g. 34.05,-118.24) to bias 300 candidate ranking toward nearby jurisdictions. ZIP code lookup is not yet supported. Malformed values are ignored silently.","title":"Near"},"description":"Client location as \"lat,lon\" (e.g. 34.05,-118.24) to bias 300 candidate ranking toward nearby jurisdictions. ZIP code lookup is not yet supported. Malformed values are ignored silently."},{"name":"Prefer","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Set to `respond-async` with `force_refresh=true` to return a durable operation and polling URL. Fresh cache hits remain synchronous; browser-backed misses may return 202 without this preference.","title":"Prefer"},"description":"Set to `respond-async` with `force_refresh=true` to return a durable operation and polling URL. Fresh cache hits remain synchronous; browser-backed misses may return 202 without this preference."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PermitStatusResponse"}}}},"202":{"description":"Durable browser-backed or force-refresh operation accepted","headers":{"Location":{"description":"Relative URL for polling the operation","schema":{"type":"string"}},"Preference-Applied":{"description":"Confirms that respond-async was honored","schema":{"type":"string","const":"respond-async"}},"Retry-After":{"description":"Suggested seconds before the first poll","schema":{"type":"integer","minimum":1}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiOperationResponse"}}}},"300":{"description":"Multiple jurisdictions match — resubmit with ?jurisdiction= to disambiguate"},"404":{"description":"Jurisdiction not supported or permit not found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"429":{"description":"Rate limit exceeded","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"503":{"description":"Jurisdiction temporarily unavailable","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/permits/batch-status":{"post":{"tags":["API v1","Permits"],"summary":"Batch permit status lookup","description":"Look up status for multiple permits (max 25). Cached permits return immediately; HTTP-only cache misses are fetched concurrently; browser-backed misses return pollable durable operations.","operationId":"batchPermitStatus","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchStatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/permits/{permit_number}/inspections":{"get":{"tags":["API v1","Permits"],"summary":"Get permit inspections","description":"Returns inspection history and pending inspections from permit scrape data.","operationId":"getPermitInspections","parameters":[{"name":"permit_number","in":"path","required":true,"schema":{"type":"string","title":"Permit Number"}},{"name":"jurisdiction","in":"query","required":false,"schema":{"type":"string","description":"Jurisdiction slug for this permit","title":"Jurisdiction"},"description":"Jurisdiction slug for this permit"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InspectionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/permits/{permit_number}/conditions":{"get":{"tags":["API v1","Permits"],"summary":"Get permit conditions and holds","description":"Returns source-published holds, notices, conditions of approval, and other permit conditions from the latest successful portal representation. The permit must first have a tenant-neutral cache representation, normally created by a status lookup. An observed=false response means no condition detail was present; it does not prove that the issuing agency has no conditions.","operationId":"getPermitConditions","parameters":[{"name":"permit_number","in":"path","required":true,"schema":{"type":"string","title":"Permit Number"}},{"name":"jurisdiction","in":"query","required":false,"schema":{"type":"string","description":"Jurisdiction slug for this permit","title":"Jurisdiction"},"description":"Jurisdiction slug for this permit"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConditionsResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/permits/{permit_number}/history":{"get":{"tags":["API v1","Permits"],"summary":"Get permit workflow and status history","description":"Returns source-published status and workflow history. Workflow metadata is preserved when the portal publishes disciplines, actors, comments, or individual activities; correction states are explicitly classified.","operationId":"getPermitHistory","parameters":[{"name":"permit_number","in":"path","required":true,"schema":{"type":"string","title":"Permit Number"}},{"name":"jurisdiction","in":"query","required":false,"schema":{"type":"string","description":"Jurisdiction slug for this permit","title":"Jurisdiction"},"description":"Jurisdiction slug for this permit"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/jurisdictions":{"get":{"tags":["API v1","Jurisdictions"],"summary":"List supported jurisdictions","description":"Public endpoint listing all jurisdictions SignedOff can monitor. No authentication required.","operationId":"listJurisdictions","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JurisdictionListResponse"}}}}}}},"/api/v1/jurisdictions/coverage":{"get":{"tags":["API v1","Jurisdictions"],"summary":"Get jurisdiction coverage metadata","description":"Public field-level fill rates, API capability availability, and continuous data-release observations by jurisdiction. No authentication required.","operationId":"getJurisdictionCoverage","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JurisdictionCoverageResponse"}}}}}}},"/api/v1/jurisdictions/requests":{"get":{"tags":["API v1","Jurisdictions"],"summary":"List requested jurisdictions","description":"Public endpoint showing jurisdictions requested by developers, ranked by demand.","operationId":"listJurisdictionRequests","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JurisdictionRequestListResponse"}}}}}}},"/api/v1/jurisdictions/{slug}/stats":{"get":{"tags":["API v1","Jurisdictions"],"summary":"Get jurisdiction statistics","description":"Returns permit counts and processing time data for a specific jurisdiction.","operationId":"getJurisdictionStats","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JurisdictionStatsResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/jurisdictions/{slug}/analytics":{"get":{"tags":["API v1","Jurisdictions"],"summary":"Get jurisdiction analytics","description":"Returns processing time norms, permit counts, and type breakdowns for a jurisdiction.","operationId":"getJurisdictionAnalytics","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JurisdictionAnalyticsResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/jurisdictions/request":{"post":{"tags":["API v1","Jurisdictions"],"summary":"Request a new jurisdiction","description":"Request SignedOff to add support for a new jurisdiction. Each authenticated API key contributes at most one demand vote per jurisdiction; retries by the same key return the current aggregate without inflating it.","operationId":"requestJurisdiction","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JurisdictionRequestCreate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JurisdictionRequestResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/webhooks":{"post":{"tags":["API v1","Webhooks"],"summary":"Register a webhook","description":"Subscribe to permit and asynchronous-operation events via webhook. Active-webhook limits are per plan: Free 1, Developer 5, Pro 10, Enterprise 25. General permit_created events require a paid live key with the Permit Discovery add-on.","operationId":"createWebhook","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookCreateRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"get":{"tags":["API v1","Webhooks"],"summary":"List webhooks","description":"List all webhooks for the authenticated API key.","operationId":"listWebhooks","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookListResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/webhooks/{webhook_id}":{"delete":{"tags":["API v1","Webhooks"],"summary":"Deactivate a webhook","description":"Soft-deactivate a webhook. Only the owning API key can delete.","operationId":"deleteWebhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}},"patch":{"tags":["API v1","Webhooks"],"summary":"Update a webhook","description":"Change URL, events, jurisdiction filter, or active state. Reactivating a webhook resets its failure counter.","operationId":"updateWebhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/webhooks/{webhook_id}/deliveries":{"get":{"tags":["API v1","Webhooks"],"summary":"List recent delivery attempts","description":"Delivery history for a webhook — status, attempts, and the last error per delivery. Newest first. This display order is not a webhook arrival guarantee; use GET /api/v1/events for canonical reconciliation order.","operationId":"getWebhookDeliveries","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveriesResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/webhooks/{webhook_id}/deliveries/{delivery_id}/replay":{"post":{"tags":["API v1","Webhooks"],"summary":"Replay a webhook delivery","description":"Queue a fresh delivery for a retained terminal attempt. The replay uses the webhook's current URL and signing secret, receives a new delivery ID, and preserves the original event ID and occurrence timestamp. A replay does not create a new canonical feed event and may arrive after newer events.","operationId":"replayWebhookDelivery","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}},{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","title":"Delivery Id"}}],"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookReplayResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/webhooks/{webhook_id}/rotate-secret":{"post":{"tags":["API v1","Webhooks"],"summary":"Rotate the signing secret","description":"Generates a new whsec_ secret and returns it once. For 24 hours, Standard Webhooks deliveries include signatures from both the new and previous secrets.","operationId":"rotateWebhookSecret","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookRotateSecretResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/webhooks/{webhook_id}/test":{"post":{"tags":["API v1","Webhooks"],"summary":"Send a test webhook event","description":"Sends a sample status_change event to the webhook URL and returns the delivery result.","operationId":"testWebhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTestResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/webhooks/{webhook_id}/simulate":{"post":{"tags":["API v1","Webhooks"],"summary":"Simulate a status_change event","description":"POSTs a synthetic status_change (or other valid event) payload — same canonical shape as a production webhook — to your registered URL so you can verify your receiver before any live event fires. The request body is optional; omitting it simulates a 'status_change' event. Returns the upstream status_code and a body preview.","operationId":"simulateWebhook","parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"string","title":"Webhook Id"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WebhookSimulateRequest"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/postman.json":{"get":{"tags":["API v1","Meta"],"summary":"Download Postman v2.1 collection","description":"Returns the complete public API as a Postman v2.1 collection — one-click import in Postman. Auth is pre-wired with X-API-Key; set the api_key collection variable to your key after import.","operationId":"postmanCollection","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/api/v1/me":{"get":{"tags":["API v1","Account"],"summary":"Get key & plan info","description":"Returns the authenticated key's plan, monthly credit limit, webhook, watch, and saved-search limits plus current active counts. Integrations use this to validate the key on connect and surface plan limits. Does not consume a credit and is not rate-limited.","operationId":"getMe","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}},"/api/v1/usage":{"get":{"tags":["API v1","Account"],"summary":"Get current monthly usage","description":"Returns lookup-credit and discovery-search consumption for the current UTC calendar month, including limits, remaining units, and the exact reset time. An ordinary lookup uses 1 credit, force_refresh uses 10, and a batch uses 1 per submitted permit. Paid-plan overage is optional and off by default: Developer lookup overage is $0.01 per extra credit and Pro is $0.008 per extra credit; paid Discovery overage is $0.25 per extra Developer search and $0.20 per extra Pro search. Overage is calculated from consumed units above the limit and appears on the customer's next Stripe subscription invoice.","operationId":"getUsage","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiUsageResponse"}}}},"422":{"description":"Validation Error","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ProblemDetails"}}}}}}}},"components":{"schemas":{"ApiEventItem":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id","description":"Stable source-event ID shared with webhook payloads"},"event_type":{"type":"string","enum":["status_change","inspection_complete","permit_approved","permit_denied","corrections_required","operation_completed","criteria_match","permit_created"],"title":"Event Type"},"permit_number":{"type":"string","title":"Permit Number"},"jurisdiction":{"type":"string","title":"Jurisdiction"},"jurisdiction_display":{"type":"string","title":"Jurisdiction Display"},"data":{"anyOf":[{"$ref":"#/components/schemas/StatusChangeEventData"},{"$ref":"#/components/schemas/InspectionCompleteEventData"},{"$ref":"#/components/schemas/OperationCompletedEventData"},{"$ref":"#/components/schemas/CriteriaMatchEventData"},{"$ref":"#/components/schemas/PermitCreatedEventData"}],"title":"Data"},"occurred_at":{"type":"string","format":"date-time","title":"Occurred At","description":"When SignedOff observed the source event"},"created_at":{"type":"string","format":"date-time","title":"Created At","description":"When the event was durably appended; feed order follows ingestion"}},"type":"object","required":["event_id","event_type","permit_number","jurisdiction","jurisdiction_display","data","occurred_at","created_at"],"title":"ApiEventItem"},"ApiEventsResponse":{"properties":{"events":{"items":{"$ref":"#/components/schemas/ApiEventItem"},"type":"array","title":"Events"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More"},"retention_days":{"type":"integer","title":"Retention Days","default":30}},"type":"object","required":["events","has_more"],"title":"ApiEventsResponse"},"ApiOperationError":{"properties":{"code":{"description":"Stable machine-readable terminal error code","title":"Code","type":"string"},"message":{"description":"Human-readable explanation of the failure","title":"Message","type":"string"},"retryable":{"description":"Whether creating a new operation may succeed later","title":"Retryable","type":"boolean"}},"required":["code","message","retryable"],"title":"ApiOperationError","type":"object"},"ApiOperationResponse":{"properties":{"operation_id":{"type":"string","format":"uuid","title":"Operation Id","description":"Durable operation identifier"},"operation_type":{"type":"string","const":"permit_refresh","title":"Operation Type"},"status":{"type":"string","enum":["pending","running","succeeded","failed"],"title":"Status"},"poll_url":{"type":"string","title":"Poll Url","description":"Relative owner-authenticated URL for polling"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"result":{"anyOf":[{"$ref":"#/components/schemas/PermitStatusResponse"},{"type":"null"}],"description":"Stable permit response when status is succeeded"},"error":{"anyOf":[{"$ref":"#/components/schemas/ApiOperationError"},{"type":"null"}],"description":"Typed terminal error when status is failed"}},"type":"object","required":["operation_id","operation_type","status","poll_url","created_at"],"title":"ApiOperationResponse","examples":[{"created_at":"2026-07-20T19:40:52Z","operation_id":"50859c7b-bf9b-44c1-9a52-d6b6758f5dac","operation_type":"permit_refresh","poll_url":"/api/v1/operations/50859c7b-bf9b-44c1-9a52-d6b6758f5dac","status":"pending"}]},"ApiUsageResponse":{"properties":{"plan":{"type":"string","title":"Plan"},"is_sandbox":{"type":"boolean","title":"Is Sandbox"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"resets_at":{"type":"string","format":"date-time","title":"Resets At"},"overage_enabled":{"type":"boolean","title":"Overage Enabled","description":"Whether eligible above-limit usage may continue and accrue charges. This flag alone does not grant Discovery access or define Enterprise terms."},"lookup":{"$ref":"#/components/schemas/UsageMeterResponse"},"discovery":{"$ref":"#/components/schemas/UsageMeterResponse"}},"type":"object","required":["plan","is_sandbox","period_start","resets_at","overage_enabled","lookup","discovery"],"title":"ApiUsageResponse"},"BatchStatusError":{"properties":{"permit_number":{"type":"string","title":"Permit Number"},"error":{"type":"string","title":"Error"},"jurisdiction_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction Hint"},"status_code":{"type":"integer","title":"Status Code"},"retryable":{"type":"boolean","title":"Retryable"}},"type":"object","required":["permit_number","error","jurisdiction_hint"],"title":"BatchStatusError","description":"Per-permit failure returned without failing the whole batch."},"BatchStatusRequest":{"properties":{"permit_numbers":{"items":{"type":"string"},"type":"array","maxItems":25,"title":"Permit Numbers"}},"type":"object","required":["permit_numbers"],"title":"BatchStatusRequest"},"BatchStatusResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/PermitStatusResponse"},"type":"array","title":"Results"},"errors":{"items":{"$ref":"#/components/schemas/BatchStatusError"},"type":"array","title":"Errors"},"operations":{"items":{"$ref":"#/components/schemas/ApiOperationResponse"},"type":"array","title":"Operations","description":"Pollable browser-backed cache misses accepted for durable execution. Each operation is owned by the calling API key."}},"type":"object","required":["results"],"title":"BatchStatusResponse"},"CanonicalPermitLinks":{"properties":{"self":{"type":"string","title":"Self"},"status":{"type":"string","title":"Status"},"history":{"type":"string","title":"History"},"inspections":{"type":"string","title":"Inspections"},"conditions":{"type":"string","title":"Conditions"}},"type":"object","required":["self","status","history","inspections","conditions"],"title":"CanonicalPermitLinks"},"CanonicalPermitResource":{"properties":{"permit_id":{"type":"string","format":"uuid","title":"Permit Id"},"permit_number":{"type":"string","title":"Permit Number"},"jurisdiction":{"type":"string","title":"Jurisdiction"},"jurisdiction_display":{"type":"string","title":"Jurisdiction Display"},"status":{"$ref":"#/components/schemas/ProvenancedTextField"},"status_phase":{"$ref":"#/components/schemas/ProvenancedTextField"},"permit_type":{"$ref":"#/components/schemas/ProvenancedTextField"},"address":{"$ref":"#/components/schemas/ProvenancedTextField"},"work_description":{"$ref":"#/components/schemas/ProvenancedTextField"},"submitted_date":{"$ref":"#/components/schemas/ProvenancedDateField"},"approved_date":{"$ref":"#/components/schemas/ProvenancedDateField"},"expiration_date":{"$ref":"#/components/schemas/ProvenancedDateField"},"portal_notes":{"$ref":"#/components/schemas/ProvenancedTextField"},"conditions":{"$ref":"#/components/schemas/ProvenancedCollectionField"},"inspections":{"$ref":"#/components/schemas/ProvenancedCollectionField"},"workflow":{"$ref":"#/components/schemas/ProvenancedCollectionField"},"links":{"$ref":"#/components/schemas/CanonicalPermitLinks"}},"type":"object","required":["permit_id","permit_number","jurisdiction","jurisdiction_display","status","status_phase","permit_type","address","work_description","submitted_date","approved_date","expiration_date","portal_notes","conditions","inspections","workflow","links"],"title":"CanonicalPermitResource"},"ConditionEntry":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"stage":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stage"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"}},"type":"object","required":["name"],"title":"ConditionEntry"},"ConditionGroup":{"properties":{"name":{"type":"string","title":"Name"},"department":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Department"},"outstanding":{"type":"integer","title":"Outstanding","default":0},"complete":{"type":"integer","title":"Complete","default":0}},"type":"object","required":["name"],"title":"ConditionGroup"},"ConditionSummary":{"properties":{"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"},"notice":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Notice"},"required":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Required"},"met":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Met"}},"type":"object","title":"ConditionSummary"},"ConditionsResponse":{"properties":{"permit_number":{"type":"string","title":"Permit Number"},"jurisdiction":{"type":"string","title":"Jurisdiction"},"observed":{"type":"boolean","title":"Observed","description":"True when the latest source representation contained condition, hold, notice, or condition-of-approval data"},"summary":{"anyOf":[{"$ref":"#/components/schemas/ConditionSummary"},{"type":"null"}]},"groups":{"items":{"$ref":"#/components/schemas/ConditionGroup"},"type":"array","title":"Groups"},"items":{"items":{"$ref":"#/components/schemas/ConditionEntry"},"type":"array","title":"Items"}},"type":"object","required":["permit_number","jurisdiction","observed"],"title":"ConditionsResponse"},"CriteriaMatchEventData":{"properties":{"saved_search_id":{"title":"Saved Search Id","type":"string"},"saved_search_name":{"title":"Saved Search Name","type":"string"},"criteria":{"additionalProperties":true,"title":"Criteria","type":"object"},"match":{"$ref":"#/components/schemas/CriteriaMatchSnapshot"},"matched_at":{"title":"Matched At","type":"string"}},"required":["saved_search_id","saved_search_name","criteria","match","matched_at"],"title":"CriteriaMatchEventData","type":"object"},"CriteriaMatchSnapshot":{"properties":{"address":{"title":"Address","type":"string"},"zip_code":{"title":"Zip Code","type":"string"},"permit_type":{"title":"Permit Type","type":"string"},"status":{"title":"Status","type":"string"},"submitted_date":{"title":"Submitted Date","type":"string"},"issue_date":{"title":"Issue Date","type":"string"},"valuation":{"title":"Valuation","type":"integer"},"latitude":{"title":"Latitude","type":"number"},"longitude":{"title":"Longitude","type":"number"},"apn":{"title":"Apn","type":"string"}},"title":"CriteriaMatchSnapshot","type":"object"},"DataFreshness":{"properties":{"age_seconds":{"anyOf":[{"type":"integer"},{"type":"null"}],"default":null,"description":"Seconds since last sync, null if never synced","title":"Age Seconds"},"cached":{"description":"Whether this response came from cache","title":"Cached","type":"boolean"},"refresh_available":{"description":"Whether force_refresh is available on this plan","title":"Refresh Available","type":"boolean"},"upgrade_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Upgrade prompt (free tier only)","title":"Upgrade Hint"},"fetched_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"When SignedOff last fetched this representation","title":"Fetched At"},"last_successful_fetch_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Most recent successful upstream observation","title":"Last Successful Fetch At"},"last_attempted_fetch_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Most recent upstream fetch attempt","title":"Last Attempted Fetch At"},"is_stale":{"default":false,"description":"True when serving last-known-good data after a failed refresh","title":"Is Stale","type":"boolean"},"stale_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Machine-readable reason stale data was served","title":"Stale Reason"},"next_refresh_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"description":"Earliest scheduled refresh time when known","title":"Next Refresh At"}},"required":["cached","refresh_available"],"title":"DataFreshness","type":"object"},"DiscoveryPagination":{"properties":{"limit":{"type":"integer","title":"Limit"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"has_more":{"type":"boolean","title":"Has More"}},"type":"object","required":["limit","next_cursor","has_more"],"title":"DiscoveryPagination"},"DiscoveryQuery":{"properties":{"zip":{"type":"string","title":"Zip"},"city":{"type":"string","title":"City"},"county":{"type":"string","title":"County"},"parcel":{"items":{"type":"string"},"type":"array","title":"Parcel"},"lat":{"type":"number","title":"Lat"},"lon":{"type":"number","title":"Lon"},"radius_mi":{"type":"number","title":"Radius Mi"},"permit_type":{"type":"string","title":"Permit Type"},"date_from":{"type":"string","title":"Date From"},"date_to":{"type":"string","title":"Date To"},"value_min":{"type":"integer","title":"Value Min"},"value_max":{"type":"integer","title":"Value Max"},"status":{"type":"string","title":"Status"},"jurisdiction":{"type":"string","title":"Jurisdiction"}},"type":"object","title":"DiscoveryQuery","description":"Echo of the discovery filters that were actually applied."},"DiscoveryRecordSchema":{"properties":{"permit_number":{"type":"string","title":"Permit Number"},"jurisdiction":{"type":"string","title":"Jurisdiction"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"zip_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Zip Code"},"permit_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Permit Type"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"submitted_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Submitted Date"},"issue_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Issue Date"},"valuation":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Valuation"},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Latitude"},"longitude":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Longitude"},"apn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Apn"}},"type":"object","required":["permit_number","jurisdiction"],"title":"DiscoveryRecordSchema"},"DiscoverySearchResponse":{"properties":{"results":{"items":{"$ref":"#/components/schemas/DiscoveryRecordSchema"},"type":"array","title":"Results"},"result_count":{"type":"integer","title":"Result Count"},"pagination":{"$ref":"#/components/schemas/DiscoveryPagination"},"query":{"$ref":"#/components/schemas/DiscoveryQuery","description":"Echo of applied filters"},"partial":{"type":"boolean","title":"Partial","default":false},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"},"source_freshness":{"additionalProperties":{"$ref":"#/components/schemas/DiscoverySourceFreshness"},"type":"object","title":"Source Freshness","description":"Per-source publication recency. Compare latest_record_date with requested_through before interpreting an empty result set."}},"type":"object","required":["results","result_count","pagination","query"],"title":"DiscoverySearchResponse","examples":[{"pagination":{"has_more":false,"limit":25},"partial":false,"query":{"zip":"90064"},"result_count":1,"results":[{"address":"10960 WELLWORTH AVE","apn":"4315002022","issue_date":"2026-05-20","jurisdiction":"ladbs","latitude":34.04772,"longitude":-118.42122,"permit_number":"26016-90000-16366","permit_type":"Bldg-Addition","status":"Issued","valuation":7500,"zip_code":"90064"}],"source_freshness":{"ladbs":{"lag_days":0,"latest_record_date":"2026-05-20","requested_through":"2026-05-20","status":"current"}},"warnings":[]}]},"DiscoverySourceFreshness":{"properties":{"latest_record_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Latest Record Date","description":"Newest non-future issue date observed source-wide"},"latest_published_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Latest Published Date","description":"Alias for latest_record_date; does not imply complete source coverage"},"requested_through":{"type":"string","format":"date","title":"Requested Through","description":"Date through which this request asked the source to search"},"lag_days":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Lag Days","description":"Calendar days between today and latest_record_date"},"status":{"type":"string","enum":["current","lagging","unknown","unavailable","inconclusive"],"title":"Status"},"is_definitive":{"type":"boolean","title":"Is Definitive","description":"False when an empty result cannot safely be treated as complete","default":true},"retry_after_seconds":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Retry After Seconds"}},"type":"object","required":["requested_through","status"],"title":"DiscoverySourceFreshness"},"FieldProvenance":{"properties":{"source_system":{"type":"string","title":"Source System","description":"Stable jurisdiction/source slug"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"observed_at":{"type":"string","format":"date-time","title":"Observed At"},"normalization_version":{"type":"string","title":"Normalization Version"},"confidence":{"type":"string","enum":["source_reported","normalized","derived"],"title":"Confidence"},"availability":{"type":"string","enum":["available","not_observed"],"title":"Availability"}},"type":"object","required":["source_system","observed_at","normalization_version","confidence","availability"],"title":"FieldProvenance"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HistoryResponse":{"properties":{"permit_number":{"type":"string","title":"Permit Number"},"jurisdiction":{"type":"string","title":"Jurisdiction"},"timeline":{"items":{"$ref":"#/components/schemas/TimelineEntry"},"type":"array","title":"Timeline"},"workflow":{"items":{"$ref":"#/components/schemas/WorkflowEntry"},"type":"array","title":"Workflow","description":"Source-native workflow activities, including pending steps"}},"type":"object","required":["permit_number","jurisdiction","timeline"],"title":"HistoryResponse"},"InspectionCompleteEventData":{"properties":{"inspection_type":{"title":"Inspection Type","type":"string"},"inspection_result":{"title":"Inspection Result","type":"string"},"inspection_date":{"title":"Inspection Date","type":"string"},"new_entries_count":{"title":"New Entries Count","type":"integer"},"changed_at":{"title":"Changed At","type":"string"}},"required":["inspection_type","inspection_result","inspection_date","new_entries_count","changed_at"],"title":"InspectionCompleteEventData","type":"object"},"InspectionEntry":{"properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"},"result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result"},"inspector":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inspector"}},"type":"object","title":"InspectionEntry"},"InspectionsResponse":{"properties":{"permit_number":{"type":"string","title":"Permit Number"},"jurisdiction":{"type":"string","title":"Jurisdiction"},"inspections":{"items":{"$ref":"#/components/schemas/InspectionEntry"},"type":"array","title":"Inspections"},"pending":{"items":{"$ref":"#/components/schemas/PendingInspection"},"type":"array","title":"Pending"},"pass_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pass Rate"}},"type":"object","required":["permit_number","jurisdiction","inspections","pending"],"title":"InspectionsResponse"},"JurisdictionAnalyticsResponse":{"properties":{"jurisdiction":{"type":"string","title":"Jurisdiction"},"display_name":{"type":"string","title":"Display Name"},"median_processing_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Median Processing Days"},"sample_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sample Size"},"permit_count":{"type":"integer","title":"Permit Count"},"date_range":{"anyOf":[{"$ref":"#/components/schemas/JurisdictionDateRange"},{"type":"null"}]},"permits_by_type":{"$ref":"#/components/schemas/PermitsByType"}},"type":"object","required":["jurisdiction","display_name","permit_count"],"title":"JurisdictionAnalyticsResponse"},"JurisdictionCapabilities":{"properties":{"status_lookup":{"type":"string","enum":["available","partial","unavailable"],"title":"Status Lookup"},"inspections":{"type":"string","enum":["available","partial","unavailable"],"title":"Inspections"},"workflow_history":{"type":"string","enum":["available","partial","unavailable"],"title":"Workflow History"},"discovery":{"type":"string","enum":["available","partial","unavailable"],"title":"Discovery"},"conditions":{"type":"string","enum":["available","partial","unavailable"],"title":"Conditions"}},"type":"object","required":["status_lookup","inspections","workflow_history","discovery","conditions"],"title":"JurisdictionCapabilities"},"JurisdictionCoverageProfile":{"properties":{"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"platform":{"type":"string","title":"Platform"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"capabilities":{"$ref":"#/components/schemas/JurisdictionCapabilities"},"field_coverage":{"items":{"$ref":"#/components/schemas/JurisdictionFieldCoverage"},"type":"array","title":"Field Coverage"},"data_release":{"$ref":"#/components/schemas/JurisdictionDataRelease"}},"type":"object","required":["slug","display_name","platform","capabilities","field_coverage","data_release"],"title":"JurisdictionCoverageProfile"},"JurisdictionCoverageResponse":{"properties":{"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"sample_window_days":{"type":"integer","minimum":1.0,"title":"Sample Window Days"},"methodology":{"type":"string","title":"Methodology"},"jurisdictions":{"items":{"$ref":"#/components/schemas/JurisdictionCoverageProfile"},"type":"array","title":"Jurisdictions"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["generated_at","sample_window_days","methodology","jurisdictions","total"],"title":"JurisdictionCoverageResponse"},"JurisdictionDataRelease":{"properties":{"mode":{"type":"string","const":"continuous","title":"Mode","default":"continuous"},"sample_size":{"type":"integer","minimum":0.0,"title":"Sample Size"},"observed_from":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Observed From"},"observed_through":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Observed Through"}},"type":"object","required":["sample_size"],"title":"JurisdictionDataRelease"},"JurisdictionDateRange":{"properties":{"earliest":{"type":"string","title":"Earliest"},"latest":{"type":"string","title":"Latest"}},"type":"object","required":["earliest","latest"],"title":"JurisdictionDateRange","description":"Observed bounds of permits retained for a jurisdiction."},"JurisdictionFieldCoverage":{"properties":{"field":{"type":"string","enum":["status","permit_type","address","work_description","submitted_date","approved_date","expiration_date","portal_notes","portal_url"],"title":"Field"},"tier":{"type":"string","enum":["reliable","partial","missing","unknown"],"title":"Tier"},"fill_rate":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Fill Rate","description":"Observed non-empty fraction, or null when there is no sample"},"records_present":{"type":"integer","minimum":0.0,"title":"Records Present"},"sample_size":{"type":"integer","minimum":0.0,"title":"Sample Size"}},"type":"object","required":["field","tier","records_present","sample_size"],"title":"JurisdictionFieldCoverage"},"JurisdictionInfo":{"properties":{"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"platform":{"type":"string","title":"Platform"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"lookup_timeout":{"type":"integer","title":"Lookup Timeout"},"active_permits_count":{"type":"integer","title":"Active Permits Count","default":0}},"type":"object","required":["slug","display_name","platform","lookup_timeout"],"title":"JurisdictionInfo"},"JurisdictionListResponse":{"properties":{"jurisdictions":{"items":{"$ref":"#/components/schemas/JurisdictionInfo"},"type":"array","title":"Jurisdictions"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["jurisdictions","total"],"title":"JurisdictionListResponse"},"JurisdictionRequestCreate":{"properties":{"jurisdiction_name":{"type":"string","title":"Jurisdiction Name"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State"},"portal_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portal Url"}},"type":"object","required":["jurisdiction_name"],"title":"JurisdictionRequestCreate"},"JurisdictionRequestListResponse":{"properties":{"requests":{"items":{"$ref":"#/components/schemas/JurisdictionRequestResponse"},"type":"array","title":"Requests"}},"type":"object","required":["requests"],"title":"JurisdictionRequestListResponse"},"JurisdictionRequestResponse":{"properties":{"jurisdiction_name":{"type":"string","title":"Jurisdiction Name"},"state_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State Code"},"request_count":{"type":"integer","title":"Request Count"},"unique_keys_count":{"type":"integer","title":"Unique Keys Count"},"status":{"type":"string","title":"Status"},"estimated_timeline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Estimated Timeline"}},"type":"object","required":["jurisdiction_name","request_count","unique_keys_count","status"],"title":"JurisdictionRequestResponse"},"JurisdictionStatsResponse":{"properties":{"slug":{"type":"string","title":"Slug"},"display_name":{"type":"string","title":"Display Name"},"active_permits_count":{"type":"integer","title":"Active Permits Count"},"date_range":{"anyOf":[{"$ref":"#/components/schemas/JurisdictionDateRange"},{"type":"null"}]}},"type":"object","required":["slug","display_name","active_permits_count"],"title":"JurisdictionStatsResponse"},"LegacyWebhookEventPayload":{"properties":{"event_id":{"type":"string","format":"uuid","title":"Event Id"},"delivery_id":{"type":"string","format":"uuid","title":"Delivery Id"},"event":{"type":"string","enum":["status_change","inspection_complete","permit_approved","permit_denied","corrections_required","operation_completed","criteria_match","permit_created"],"title":"Event"},"permit_number":{"type":"string","title":"Permit Number"},"jurisdiction":{"type":"string","title":"Jurisdiction"},"jurisdiction_display":{"type":"string","title":"Jurisdiction Display"},"data":{"anyOf":[{"$ref":"#/components/schemas/StatusChangeEventData"},{"$ref":"#/components/schemas/InspectionCompleteEventData"},{"$ref":"#/components/schemas/OperationCompletedEventData"},{"$ref":"#/components/schemas/CriteriaMatchEventData"},{"$ref":"#/components/schemas/PermitCreatedEventData"}],"title":"Data"},"timestamp":{"type":"string","format":"date-time","title":"Timestamp"}},"type":"object","title":"LegacyWebhookEventPayload","description":"Retained pre-lineage delivery payloads exposed by delivery history.\n\nNew deliveries always use ``WebhookEventPayload``. This variant keeps rows\nwritten before event_id/delivery_id were introduced readable until their\nnormal retention expiry, without making the outbound contract optional."},"MeResponse":{"properties":{"plan":{"type":"string","title":"Plan","description":"API plan tier: free | developer | pro | enterprise"},"plan_price":{"type":"string","title":"Plan Price","description":"Display price for the plan, e.g. 'Free' or '$49/mo'"},"monthly_credit_limit":{"type":"integer","title":"Monthly Credit Limit","description":"Included API credits per month"},"webhook_limit":{"type":"integer","title":"Webhook Limit","description":"Max active webhooks allowed on this plan"},"active_webhook_count":{"type":"integer","title":"Active Webhook Count","description":"Active webhooks currently registered to this key"},"watch_limit":{"type":"integer","title":"Watch Limit","description":"Max active permit watches allowed on this plan"},"active_watch_count":{"type":"integer","title":"Active Watch Count","description":"Active permit watches currently registered to this key"},"saved_search_limit":{"type":"integer","title":"Saved Search Limit","description":"Max active saved searches allowed on this plan"},"active_saved_search_count":{"type":"integer","title":"Active Saved Search Count","description":"Active saved searches currently registered to this key"}},"type":"object","required":["plan","plan_price","monthly_credit_limit","webhook_limit","active_webhook_count","watch_limit","active_watch_count","saved_search_limit","active_saved_search_count"],"title":"MeResponse","examples":[{"active_saved_search_count":0,"active_watch_count":0,"active_webhook_count":0,"monthly_credit_limit":200,"plan":"free","plan_price":"Free","saved_search_limit":0,"watch_limit":1,"webhook_limit":1}]},"OperationCompletedEventData":{"properties":{"operation_id":{"title":"Operation Id","type":"string"},"operation_type":{"const":"permit_refresh","title":"Operation Type","type":"string"},"status":{"enum":["succeeded","failed"],"title":"Status","type":"string"},"poll_url":{"title":"Poll Url","type":"string"},"result":{"anyOf":[{"$ref":"#/components/schemas/PermitStatusResponse"},{"type":"null"}]},"error":{"anyOf":[{"$ref":"#/components/schemas/ApiOperationError"},{"type":"null"}]},"completed_at":{"title":"Completed At","type":"string"}},"required":["operation_id","operation_type","status","poll_url","result","error","completed_at"],"title":"OperationCompletedEventData","type":"object"},"PendingInspection":{"properties":{"type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"},"date":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Date"}},"type":"object","title":"PendingInspection"},"PermitCreatedEventData":{"properties":{"observed_at":{"title":"Observed At","type":"string"},"source":{"const":"discovery_monitor","title":"Source","type":"string"},"record":{"$ref":"#/components/schemas/CriteriaMatchSnapshot"}},"required":["observed_at","source","record"],"title":"PermitCreatedEventData","type":"object"},"PermitResolutionCandidate":{"properties":{"jurisdiction":{"type":"string","title":"Jurisdiction"},"jurisdiction_display":{"type":"string","title":"Jurisdiction Display"},"permit_id":{"type":"string","format":"uuid","title":"Permit Id"},"confidence":{"type":"string","enum":["strong","weak","none"],"title":"Confidence"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["jurisdiction","jurisdiction_display","permit_id","confidence","reason"],"title":"PermitResolutionCandidate"},"PermitResolutionCandidatesResponse":{"properties":{"error":{"type":"string","const":"multiple_jurisdictions","title":"Error","default":"multiple_jurisdictions"},"permit_number":{"type":"string","title":"Permit Number"},"candidates":{"items":{"$ref":"#/components/schemas/PermitResolutionCandidate"},"type":"array","title":"Candidates"}},"type":"object","required":["permit_number","candidates"],"title":"PermitResolutionCandidatesResponse"},"PermitResolutionRequest":{"properties":{"permit_number":{"type":"string","maxLength":100,"minLength":1,"title":"Permit Number"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction","description":"Supported jurisdiction slug; omit only when the number is distinctive"}},"type":"object","required":["permit_number"],"title":"PermitResolutionRequest"},"PermitResolutionResponse":{"properties":{"permit_id":{"type":"string","format":"uuid","title":"Permit Id"},"permit_number":{"type":"string","title":"Permit Number"},"jurisdiction":{"type":"string","title":"Jurisdiction"},"jurisdiction_display":{"type":"string","title":"Jurisdiction Display"},"confidence":{"type":"string","enum":["explicit","pattern"],"title":"Confidence"},"resource_available":{"type":"boolean","title":"Resource Available","description":"True when GET resource_url can return a cached representation now"},"resource_url":{"type":"string","title":"Resource Url"},"status_url":{"type":"string","title":"Status Url"}},"type":"object","required":["permit_id","permit_number","jurisdiction","jurisdiction_display","confidence","resource_available","resource_url","status_url"],"title":"PermitResolutionResponse"},"PermitStatusResponse":{"examples":[{"data_freshness":{"age_seconds":7200,"cached":true,"refresh_available":false,"upgrade_hint":"Upgrade to force-refresh cached permits"},"jurisdiction":"ladbs","jurisdiction_display":"LADBS (City of Los Angeles)","last_synced_at":"2026-05-05T08:00:00Z","permit_number":"24044-20000-03620","permit_type":"Building","portal_status":"Plan Check - Corrections Issued","processing_time":{"days_in_current_status":12},"source":"cached","status":"In Review","status_phase":"active"}],"properties":{"permit_id":{"description":"Stable ID derived from jurisdiction and normalized permit number","format":"uuid","title":"Permit Id","type":"string"},"permit_number":{"title":"Permit Number","type":"string"},"jurisdiction":{"title":"Jurisdiction","type":"string"},"jurisdiction_display":{"title":"Jurisdiction Display","type":"string"},"status":{"title":"Status","type":"string"},"portal_status":{"title":"Portal Status","type":"string"},"status_phase":{"title":"Status Phase","type":"string"},"permit_type":{"title":"Permit Type","type":"string"},"submitted_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"default":null,"title":"Submitted Date"},"approved_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"default":null,"title":"Approved Date"},"expiration_date":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"default":null,"title":"Expiration Date"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"deprecated":true,"description":"Deprecated alias for portal_notes","title":"Notes"},"portal_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Notes published by the source permit portal","title":"Portal Notes"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Address"},"work_description":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Work Description"},"source":{"description":"'cached', 'stale_cache', 'live_scrape', 'demo', or 'sandbox'","title":"Source","type":"string"},"last_synced_at":{"anyOf":[{"format":"date-time","type":"string"},{"type":"null"}],"default":null,"title":"Last Synced At"},"portal_url":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"title":"Portal Url"},"processing_time":{"anyOf":[{"$ref":"#/components/schemas/ProcessingTime"},{"type":"null"}],"default":null,"description":"{\"days_in_current_status\": int} — whole days since SignedOff first observed the permit in its current status. 0 on a permit's first lookup; grows on later lookups; resets when the status changes."},"data_freshness":{"anyOf":[{"$ref":"#/components/schemas/DataFreshness"},{"type":"null"}],"default":null},"upstream_source":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"null when the data came from the jurisdiction's primary permit portal. Otherwise names the secondary official source that answered: 'ladbs_open_data' is the City of Los Angeles open-data feed, used while the LADBS permit-detail site is unavailable. It is refreshed about daily and carries status and core fields only (no inspection or status history).","title":"Upstream Source"},"upstream_as_of":{"anyOf":[{"format":"date","type":"string"},{"type":"null"}],"default":null,"description":"Date upstream_source last refreshed its data. null when upstream_source is null.","title":"Upstream As Of"}},"required":["permit_id","permit_number","jurisdiction","jurisdiction_display","status","portal_status","status_phase","permit_type","source"],"title":"PermitStatusResponse","type":"object"},"PermitsByType":{"additionalProperties":{"type":"integer"},"type":"object","title":"PermitsByType","description":"Dynamic permit-type names mapped to their observed counts."},"ProcessingTime":{"description":"Time spent in the currently observed permit status.","properties":{"days_in_current_status":{"title":"Days In Current Status","type":"integer"}},"required":["days_in_current_status"],"title":"ProcessingTime","type":"object"},"ProvenancedCollectionField":{"properties":{"count":{"type":"integer","minimum":0.0,"title":"Count"},"provenance":{"$ref":"#/components/schemas/FieldProvenance"},"href":{"type":"string","title":"Href"}},"type":"object","required":["count","provenance","href"],"title":"ProvenancedCollectionField"},"ProvenancedDateField":{"properties":{"value":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Value"},"raw_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Value","description":"Original portal date text when retained; null for legacy cache representations that store only the parsed date"},"provenance":{"$ref":"#/components/schemas/FieldProvenance"}},"type":"object","required":["provenance"],"title":"ProvenancedDateField"},"ProvenancedTextField":{"properties":{"value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Value"},"raw_value":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Raw Value","description":"Portal-native value when retained separately"},"provenance":{"$ref":"#/components/schemas/FieldProvenance"}},"type":"object","required":["provenance"],"title":"ProvenancedTextField"},"SavedSearchCreateRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"},"criteria":{"$ref":"#/components/schemas/SavedSearchCriteria"}},"type":"object","required":["name","criteria"],"title":"SavedSearchCreateRequest"},"SavedSearchCriteria":{"properties":{"zip":{"anyOf":[{"type":"string","pattern":"^\\d{5}$"},{"type":"null"}],"title":"Zip"},"city":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"City","description":"Supported City of Los Angeles name or alias; selects LADBS."},"county":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"County","description":"Supported Los Angeles County name or alias; selects EPIC-LA unincorporated records."},"parcel":{"anyOf":[{"items":{"type":"string"},"type":"array","maxItems":25},{"type":"null"}],"title":"Parcel","description":"One to 25 LA APNs/AINs; formatting and duplicates are normalized."},"contractor":{"anyOf":[{"type":"string","maxLength":200,"minLength":1},{"type":"null"}],"title":"Contractor","description":"Reserved but unsupported; a non-null value is rejected because current discovery feeds do not expose contractor identity."},"lat":{"anyOf":[{"type":"number","maximum":90.0,"minimum":-90.0},{"type":"null"}],"title":"Lat"},"lon":{"anyOf":[{"type":"number","maximum":180.0,"minimum":-180.0},{"type":"null"}],"title":"Lon"},"radius_mi":{"anyOf":[{"type":"number","exclusiveMinimum":0.0},{"type":"null"}],"title":"Radius Mi"},"permit_type":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Permit Type"},"date_from":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date From"},"date_to":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date To"},"value_min":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Value Min"},"value_max":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Value Max"},"status":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Status"},"jurisdiction":{"anyOf":[{"type":"string","enum":["ladbs","epicla"]},{"type":"null"}],"title":"Jurisdiction"}},"type":"object","title":"SavedSearchCriteria"},"SavedSearchDeleteResponse":{"properties":{"status":{"type":"string","const":"deleted","title":"Status","default":"deleted"},"saved_search_id":{"type":"string","format":"uuid","title":"Saved Search Id"}},"type":"object","required":["saved_search_id"],"title":"SavedSearchDeleteResponse"},"SavedSearchListResponse":{"properties":{"saved_searches":{"items":{"$ref":"#/components/schemas/SavedSearchResponse"},"type":"array","title":"Saved Searches"},"total":{"type":"integer","title":"Total"},"plan_limit":{"type":"integer","title":"Plan Limit"},"remaining":{"type":"integer","title":"Remaining"}},"type":"object","required":["saved_searches","total","plan_limit","remaining"],"title":"SavedSearchListResponse"},"SavedSearchResponse":{"properties":{"saved_search_id":{"type":"string","format":"uuid","title":"Saved Search Id"},"name":{"type":"string","title":"Name"},"criteria":{"$ref":"#/components/schemas/SavedSearchCriteria"},"status":{"type":"string","enum":["active","paused"],"title":"Status"},"baseline_completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Baseline Completed At"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked At"},"last_succeeded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Succeeded At"},"last_match_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Match At"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["saved_search_id","name","criteria","status","created_at","updated_at"],"title":"SavedSearchResponse"},"SavedSearchUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Name"},"criteria":{"anyOf":[{"$ref":"#/components/schemas/SavedSearchCriteria"},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["active","paused"]},{"type":"null"}],"title":"Status"}},"type":"object","title":"SavedSearchUpdateRequest"},"StatusChangeEventData":{"description":"Status event fields; older retained events may omit later additions.","properties":{"old_status":{"title":"Old Status","type":"string"},"new_status":{"title":"New Status","type":"string"},"old_portal_status":{"title":"Old Portal Status","type":"string"},"new_portal_status":{"title":"New Portal Status","type":"string"},"status_phase":{"title":"Status Phase","type":"string"},"changed_at":{"title":"Changed At","type":"string"}},"title":"StatusChangeEventData","type":"object"},"TimelineEntry":{"properties":{"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"},"portal_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Portal Status"},"changed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Changed At"},"source":{"type":"string","title":"Source","description":"Origin of the event. Tenant-neutral API cache history currently emits portal; sync_log remains reserved for compatible observed history."},"actor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Actor"},"discipline":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Discipline","description":"Portal-native review discipline or workflow area"},"comment":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Comment","description":"Portal-published workflow comment when available"},"is_correction":{"type":"boolean","title":"Is Correction","description":"True when the portal status is classified as requiring corrections","default":false}},"type":"object","required":["source"],"title":"TimelineEntry"},"UnwatchResponse":{"properties":{"status":{"type":"string","title":"Status"},"permit_number":{"type":"string","title":"Permit Number"}},"type":"object","required":["status","permit_number"],"title":"UnwatchResponse"},"UsageMeterResponse":{"properties":{"used":{"type":"integer","title":"Used","description":"Meter units consumed: lookup credits or discovery searches"},"limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit","description":"Included monthly units, or null when unmetered"},"remaining":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Remaining","description":"Included units remaining; zero after the limit is reached"},"percent_used":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Percent Used","description":"Percentage of the included allowance consumed; may exceed 100 with overage"},"metered":{"type":"boolean","title":"Metered","default":true},"enabled":{"type":"boolean","title":"Enabled","default":true}},"type":"object","required":["used"],"title":"UsageMeterResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WatchListItem":{"properties":{"permit_number":{"type":"string","title":"Permit Number"},"jurisdiction":{"type":"string","title":"Jurisdiction"},"status":{"type":"string","title":"Status"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"last_event_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Event At"}},"type":"object","required":["permit_number","jurisdiction","status"],"title":"WatchListItem"},"WatchListResponse":{"properties":{"watches":{"items":{"$ref":"#/components/schemas/WatchListItem"},"type":"array","title":"Watches"},"total":{"type":"integer","title":"Total"},"plan_limit":{"type":"integer","title":"Plan Limit"},"remaining":{"type":"integer","title":"Remaining"}},"type":"object","required":["watches","total","plan_limit","remaining"],"title":"WatchListResponse"},"WatchResponse":{"properties":{"permit_number":{"type":"string","title":"Permit Number"},"jurisdiction":{"type":"string","title":"Jurisdiction"},"jurisdiction_display":{"type":"string","title":"Jurisdiction Display"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Current permit status at enrollment"},"status_phase":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status Phase","description":"pending | active | closed"},"watching":{"type":"boolean","title":"Watching","default":true},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning","description":"Set when this key has no active webhook to receive events"}},"type":"object","required":["permit_number","jurisdiction","jurisdiction_display"],"title":"WatchResponse"},"WebhookCreateRequest":{"properties":{"url":{"type":"string","maxLength":2048,"title":"Url","description":"HTTPS URL to receive webhook POST requests"},"events":{"items":{"type":"string","enum":["status_change","inspection_complete","permit_approved","permit_denied","corrections_required","operation_completed","criteria_match","permit_created"]},"type":"array","title":"Events","description":"Event types to subscribe to"},"jurisdiction_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Jurisdiction Filter","description":"Limit to specific jurisdiction slugs"}},"type":"object","required":["url","events"],"title":"WebhookCreateRequest"},"WebhookDeliveriesResponse":{"properties":{"webhook_id":{"type":"string","format":"uuid","title":"Webhook Id"},"deliveries":{"items":{"$ref":"#/components/schemas/WebhookDeliveryItem"},"type":"array","title":"Deliveries"}},"type":"object","required":["webhook_id","deliveries"],"title":"WebhookDeliveriesResponse"},"WebhookDeliveryItem":{"properties":{"id":{"type":"string","format":"uuid","title":"Id","description":"Delivery ID, stable across automatic retries"},"event_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Event Id","description":"Stable source-event ID shared by deliveries and manual replays"},"replayed_from_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Replayed From Id","description":"Source delivery ID when this row is a manual replay"},"event_type":{"type":"string","enum":["status_change","inspection_complete","permit_approved","permit_denied","corrections_required","operation_completed","criteria_match","permit_created"],"title":"Event Type"},"status":{"type":"string","title":"Status","description":"pending | delivered | dead"},"attempts":{"type":"integer","title":"Attempts"},"payload":{"anyOf":[{"$ref":"#/components/schemas/WebhookEventPayload"},{"$ref":"#/components/schemas/LegacyWebhookEventPayload"}],"title":"Payload"},"last_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Attempt At"},"next_attempt_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Attempt At"}},"type":"object","required":["id","event_type","status","attempts","payload","created_at"],"title":"WebhookDeliveryItem"},"WebhookEventPayload":{"description":"Canonical body delivered to a developer's webhook endpoint.","properties":{"event_id":{"description":"Stable source-event ID shared by every delivery and replay","format":"uuid","title":"Event Id","type":"string"},"delivery_id":{"description":"Delivery ID, stable across automatic retries; a manual replay gets a fresh delivery ID","format":"uuid","title":"Delivery Id","type":"string"},"event":{"description":"Event type; independently process each event ID","enum":["status_change","inspection_complete","permit_approved","permit_denied","corrections_required","operation_completed","criteria_match","permit_created"],"title":"Event","type":"string"},"permit_number":{"title":"Permit Number","type":"string"},"jurisdiction":{"title":"Jurisdiction","type":"string"},"jurisdiction_display":{"title":"Jurisdiction Display","type":"string"},"data":{"anyOf":[{"$ref":"#/components/schemas/StatusChangeEventData"},{"$ref":"#/components/schemas/InspectionCompleteEventData"},{"$ref":"#/components/schemas/OperationCompletedEventData"},{"$ref":"#/components/schemas/CriteriaMatchEventData"},{"$ref":"#/components/schemas/PermitCreatedEventData"}],"title":"Data"},"timestamp":{"description":"Source-event occurrence time, not the delivery-attempt time","format":"date-time","title":"Timestamp","type":"string"}},"required":["event_id","delivery_id","event","permit_number","jurisdiction","jurisdiction_display","data","timestamp"],"title":"WebhookEventPayload","type":"object"},"WebhookListResponse":{"properties":{"webhooks":{"items":{"$ref":"#/components/schemas/WebhookResponse"},"type":"array","title":"Webhooks"}},"type":"object","required":["webhooks"],"title":"WebhookListResponse"},"WebhookReplayResponse":{"properties":{"source_delivery_id":{"type":"string","format":"uuid","title":"Source Delivery Id"},"replay_delivery_id":{"type":"string","format":"uuid","title":"Replay Delivery Id"},"event_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Event Id"},"status":{"type":"string","const":"pending","title":"Status","default":"pending"}},"type":"object","required":["source_delivery_id","replay_delivery_id"],"title":"WebhookReplayResponse"},"WebhookResponse":{"properties":{"webhook_id":{"type":"string","format":"uuid","title":"Webhook Id"},"url":{"type":"string","title":"Url"},"events":{"items":{"type":"string","enum":["status_change","inspection_complete","permit_approved","permit_denied","corrections_required","operation_completed","criteria_match","permit_created"]},"type":"array","title":"Events"},"jurisdiction_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Jurisdiction Filter"},"is_active":{"type":"boolean","title":"Is Active"},"secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Secret","description":"HMAC secret — only returned on creation"},"warning":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Warning"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_triggered_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Triggered At"},"consecutive_failures":{"type":"integer","title":"Consecutive Failures","default":0}},"type":"object","required":["webhook_id","url","events","is_active","created_at"],"title":"WebhookResponse"},"WebhookRotateSecretResponse":{"properties":{"webhook_id":{"type":"string","format":"uuid","title":"Webhook Id"},"secret":{"type":"string","title":"Secret","description":"New HMAC secret — shown only once"},"previous_secret_valid_until":{"type":"string","format":"date-time","title":"Previous Secret Valid Until","description":"UTC end of the overlap window for the previous secret"},"warning":{"type":"string","title":"Warning"}},"type":"object","required":["webhook_id","secret","previous_secret_valid_until","warning"],"title":"WebhookRotateSecretResponse"},"WebhookSimulateRequest":{"properties":{"event":{"type":"string","enum":["status_change","inspection_complete","permit_approved","permit_denied","corrections_required","operation_completed","criteria_match","permit_created"],"title":"Event","description":"Event type to simulate. Must be one of the valid event names. Defaults to 'status_change'.","default":"status_change"}},"type":"object","title":"WebhookSimulateRequest"},"WebhookTestResponse":{"properties":{"success":{"type":"boolean","title":"Success"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["success"],"title":"WebhookTestResponse"},"WebhookUpdateRequest":{"properties":{"url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Url","description":"New HTTPS delivery URL"},"events":{"anyOf":[{"items":{"type":"string","enum":["status_change","inspection_complete","permit_approved","permit_denied","corrections_required","operation_completed","criteria_match","permit_created"]},"type":"array"},{"type":"null"}],"title":"Events","description":"Replacement event-type list"},"jurisdiction_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Jurisdiction Filter","description":"Replacement jurisdiction filter"},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active","description":"Reactivate (true) or pause (false) the webhook"}},"type":"object","title":"WebhookUpdateRequest","description":"PATCH body — every field optional; only provided fields change.\n\nURL SSRF/DNS validation runs in the route via asyncio.to_thread (same\nreasoning as WebhookCreateRequest above — never block the event loop)."},"WorkflowEntry":{"properties":{"name":{"type":"string","title":"Name"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Portal-native outcome or activity status when published"},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Completed At","description":"Portal-published completion date; null for pending or undated activity"}},"type":"object","required":["name"],"title":"WorkflowEntry"},"ValidationErrorDetail":{"additionalProperties":true,"description":"One Pydantic/FastAPI request validation failure.","properties":{"type":{"title":"Type","type":"string"},"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"title":"Loc","type":"array"},"msg":{"title":"Msg","type":"string"},"input":{"title":"Input"},"ctx":{"additionalProperties":true,"title":"Ctx","type":"object"},"url":{"title":"Url","type":"string"}},"required":["type","loc","msg"],"title":"ValidationErrorDetail","type":"object"},"ProblemDetails":{"additionalProperties":true,"description":"RFC 9457 problem details with SignedOff correlation extensions.","properties":{"type":{"title":"Type","type":"string"},"title":{"title":"Title","type":"string"},"status":{"title":"Status","type":"integer"},"detail":{"title":"Detail","type":"string"},"instance":{"title":"Instance","type":"string"},"code":{"title":"Code","type":"string"},"error":{"description":"Compatibility alias for code","title":"Error","type":"string"},"request_id":{"title":"Request Id","type":"string"},"errors":{"anyOf":[{"items":{"$ref":"#/components/schemas/ValidationErrorDetail"},"type":"array"},{"type":"null"}],"default":null,"title":"Errors"}},"required":["type","title","status","detail","instance","code","error","request_id"],"title":"ProblemDetails","type":"object"}},"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Your SignedOff API key. Get one at https://signedoff.io/developers/signup."}}},"externalDocs":{"description":"SignedOff API documentation and integration guides","url":"https://signedoff.io/developers/docs"},"servers":[{"url":"https://signedoff.io","description":"Production"}],"webhooks":{"permitEvent":{"post":{"summary":"SignedOff API event delivery","description":"Signed JSON permit or operation event sent with at-least-once delivery semantics. The operation_completed event reports terminal durable-operation results. Automatic retries keep the same webhook-id and delivery_id; manual replays preserve event_id but receive a new delivery_id. Arrival order is not guaranteed across retries or replays, so process idempotently and reconcile with the stable oldest-first GET /api/v1/events feed. Verify webhook-signature over the raw body before processing. Legacy X-SignedOff headers remain available.","parameters":[{"name":"webhook-id","in":"header","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"webhook-timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"webhook-signature","in":"header","required":true,"schema":{"type":"string","pattern":"^v1,"}},{"name":"X-SignedOff-Signature","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-SignedOff-Event","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEventPayload"}}}},"responses":{"200":{"description":"Receiver accepted the event"}}}}},"security":[{"ApiKeyAuth":[]}]}