API Reference
The Sevrel REST API powers all platform functionality. All endpoints are served from https://api.sevrel.com and require authentication unless noted otherwise.
Base URL
https://api.sevrel.comAll request and response bodies are JSON. Authenticated endpoints require a valid session cookie obtained via the Azure authentication flow.
Authentication
Sevrel uses cookie-based sessions. Authenticate via Microsoft Entra ID, then use the returned session cookie for all subsequent requests. Cookies are HttpOnly, Secure, SameSite=Lax.
/api/auth/azureBearer (Azure token)Exchange a Microsoft Entra ID access token for a Sevrel session cookie. The backend validates the Azure token against Microsoft JWKS (signature, audience, issuer, expiry). On success, sets a signed HttpOnly session cookie.
Request Body
// Headers
Authorization: Bearer <azure_access_token>Response
// Set-Cookie header returned
// 200 OK
{
"id": "uuid",
"email": "user@org.com",
"name": "Jane Doe",
"role": "member"
}/api/auth/meCookieReturns the currently authenticated user's profile, including role and organization membership.
Response
{
"id": "uuid",
"email": "user@org.com",
"name": "Jane Doe",
"role": "member",
"organization_id": "uuid",
"organization_name": "Acme CRE"
}/api/auth/logoutCookieInvalidates the session cookie and clears the server-side session.
/api/auth/sessionsCookieList all active sessions for the current user, including IP address, user agent, and timestamps. Useful for security auditing.
Response
{
"sessions": [
{
"id": "uuid",
"ip_address": "203.0.113.1",
"user_agent": "Mozilla/5.0...",
"created_at": "2026-03-17T08:00:00Z",
"last_active": "2026-03-17T10:30:00Z"
}
]
}/api/auth/sessions/{id}CookieRevoke a specific session by ID. The user is signed out of that device or browser.
/api/auth/logout-allCookieRevoke all active sessions for the current user across all devices. Returns the count of revoked sessions.
Response
{ "ok": true, "revokedSessions": 3 }Chat
The core intelligence layer. Send questions about your documents and receive AI-generated answers with source citations. Supports both streaming (SSE) and synchronous modes.
/api/chat/streamCookieSend a message and receive a streaming response via Server-Sent Events. The AI searches your connected documents, retrieves relevant sections, and streams an answer with inline citations. Supports optional file attachments.
Request Body
{
"messages": [
{ "role": "user", "content": "What is the CAM for Bal Harbour 2025?" }
],
"conversation_id": "uuid (optional)",
"attachments": ["uuid (optional)"]
}Response
// SSE stream
data: {"type": "thinking", "content": "Searching for CAM..."}
data: {"type": "content", "content": "The CAM charges for..."}
data: {"type": "evidence", "sources": [...]}
data: {"type": "done"}/api/chatCookieSynchronous (non-streaming) chat endpoint. Returns the complete response with evidence in a single JSON payload.
Request Body
{
"messages": [
{ "role": "user", "content": "List all lease expirations in 2026." }
],
"conversation_id": "uuid (optional)"
}Response
{
"response": "Based on your documents, the following...",
"evidence": [
{
"source": "Lease_TenantXYZ_2023.pdf",
"snippet": "Lease term expires December 31, 2026...",
"page": 3
}
]
}/api/attachmentsCookieUpload a file attachment for use in the next chat message. Accepts PDF, DOCX, XLSX, and text files via multipart form data.
Request Body
// Content-Type: multipart/form-data
// Field: file (binary)Response
{
"id": "uuid",
"filename": "report.pdf",
"size_bytes": 245760,
"content_type": "application/pdf"
}Conversations
Manage chat conversation history. Conversations persist messages and associated evidence for later review and sharing.
/api/conversationsCookieList all conversations for the authenticated user. Evidence is stripped for performance — use the single conversation endpoint for full details.
Response
{
"conversations": [
{
"id": "uuid",
"title": "CAM Analysis Q4 2025",
"created_at": "2026-03-15T10:00:00Z",
"message_count": 8
}
]
}/api/conversations/{id}CookieRetrieve a single conversation with full message history and evidence citations.
Response
{
"id": "uuid",
"title": "CAM Analysis Q4 2025",
"messages": [...],
"evidence": [...]
}/api/conversationsCookieCreate a new empty conversation.
Request Body
{ "title": "Optional title" }Response
{ "id": "uuid", "title": "Optional title", "created_at": "..." }/api/conversations/{id}CookieDelete a conversation and all associated messages. Returns 204 No Content on success.
Documents & Egnyte
Browse and search your connected Egnyte document library. Sevrel reads documents in real time — no separate indexing step required.
/api/documents/browse?path={folder_path}CookieBrowse Egnyte folder contents. Returns folders and files at the specified path, respecting your organization's base path configuration.
Response
{
"folders": [
{ "name": "Leases", "path": "/Shared/All/Property1/Leases" }
],
"files": [
{
"name": "Lease_TenantA_2024.pdf",
"path": "/Shared/All/Property1/Leases/Lease_TenantA_2024.pdf",
"size": 524288,
"modified": "2026-01-15T08:00:00Z"
}
]
}/api/documents/search?q={query}CookieFull-text search across your Egnyte documents. Returns matching files with relevant text snippets.
Response
{
"results": [
{
"name": "OpEx_Budget_2025.xlsx",
"path": "/Shared/All/Property1/Financials/OpEx_Budget_2025.xlsx",
"snippet": "Total CAM charges for 2025: $1,245,000...",
"score": 0.92
}
]
}/api/documents/ingestCookieUpload and ingest a local document for text extraction and use in chat. Accepts multipart form data with PDF, DOCX, XLSX, or text files.
Request Body
// Content-Type: multipart/form-data
// Field: file (binary)Response
{
"id": "uuid",
"filename": "report.pdf",
"status": "processed",
"chunk_count": 42
}Agents
Specialized AI workflows for common commercial real estate tasks. Each agent runs a multi-step pipeline and produces structured artifacts.
/api/agentsCookieList all available agents with their descriptions, required inputs, and pipeline step definitions.
Response
{
"agents": [
{
"slug": "loi-generator",
"name": "LOI Generator",
"description": "Generate letters of intent from historical patterns",
"inputs": ["property_name", "tenant_name", "deal_terms"],
"steps": 7
}
]
}/api/agents/{slug}/runCookieExecute an agent pipeline. Returns a Server-Sent Events stream with step progress, intermediate results, and final artifacts.
Request Body
{
"inputs": {
"property_name": "Pembroke Lakes Square",
"tenant_name": "Acme Retail",
"deal_terms": "5-year term, 2,500 SF, $45 PSF NNN"
}
}Response
// SSE stream
data: {"step": 1, "status": "running", "title": "Searching historical LOIs..."}
data: {"step": 1, "status": "complete", "result": "Found 5 matching LOIs"}
data: {"step": 7, "status": "complete", "artifacts": [...]}
data: {"type": "done", "run_id": "uuid"}/api/agents/{slug}/stopCookieCancel a running agent pipeline.
Request Body
{ "run_id": "uuid" }Portfolio
Manage properties, tenants, and leases. The portfolio layer provides structured data for dashboard analytics and critical date tracking.
/api/portfolio/summaryCookiePortfolio-level summary including property count, total square footage, occupancy rate, and key metrics.
Response
{
"properties": [...],
"metrics": {
"total_properties": 12,
"total_sqft": 1250000,
"occupancy_rate": 0.94,
"avg_rent_psf": 42.50
}
}/api/portfolio/propertiesCookieList all properties with their tenants, lease counts, and key data points.
Response
{
"properties": [
{
"id": "uuid",
"name": "Pembroke Lakes Square",
"address": "...",
"sqft": 250000,
"tenant_count": 42,
"occupancy": 0.96
}
]
}/api/portfolio/bulk-import/leasesCookieBulk import lease records (max 100 per request). Creates or updates leases with associated tenant and property references.
Request Body
{
"leases": [
{
"tenant_name": "Acme Retail",
"property_name": "Pembroke Lakes Square",
"start_date": "2024-01-01",
"end_date": "2029-12-31",
"sqft": 2500,
"annual_rent": 112500
}
]
}/api/portfolio/setup-statusCookieReturns onboarding progress — which setup steps are complete (Egnyte connected, properties imported, first query run, etc.).
Critical Dates
Track time-sensitive lease events — expirations, renewal deadlines, rent escalations, and option exercise dates. Classified by urgency tier for proactive monitoring.
/api/critical-datesCookieList critical dates with optional filters for property, status, and urgency.
Response
{
"dates": [
{
"id": "uuid",
"date_type": "lease_expiration",
"date": "2026-06-30",
"property": "Bal Harbour Square",
"tenant": "Luxury Brand Co",
"status": "upcoming",
"severity": "critical_30d",
"days_until": 28
}
]
}/api/critical-dates/{id}/statusCookieUpdate the status of a critical date (upcoming, acknowledged, actioned, expired) with optional notes.
Request Body
{
"status": "acknowledged",
"notes": "Renewal negotiation in progress with tenant."
}/api/critical-datesCookieManually create a critical date entry.
Request Body
{
"date_type": "option_exercise",
"date": "2026-09-15",
"property_id": "uuid",
"tenant_id": "uuid",
"notes": "Tenant has 5-year renewal option"
}/api/critical-dates/export?format=csvCookieExport critical dates as CSV or JSON for offline analysis or reporting.
/api/critical-dates/{id}CookieDelete a critical date entry. Returns 204 No Content.
Query Templates
Pre-built and user-saved query templates for common commercial real estate questions. Categories include financial analysis, lease review, portfolio comparison, and due diligence.
/api/query-templates?category={category}CookieList query templates, optionally filtered by category (financial, lease, portfolio, due_diligence).
Response
{
"templates": [
{
"id": "uuid",
"title": "Compare CAM Charges",
"template_text": "Compare CAM charges for {property} across {year1} and {year2}.",
"category": "financial",
"is_system": true,
"usage_count": 45
}
]
}/api/query-templatesCookieCreate a custom query template.
Request Body
{
"title": "Tenant Renewal Status",
"template_text": "What is the renewal status for {tenant} at {property}?",
"category": "lease"
}/api/query-templates/parameters/optionsCookieReturns dropdown options for template parameters — available property names, tenant names, and fiscal years.
Dashboard (Roadmap)
Roadmap — not yet available
The portfolio analytics dashboard endpoints listed below are part of the Sevrel roadmap and are not currently mounted in production. They represent planned functionality and are documented here for reference only. Contact support for early access or timelines.
Planned portfolio analytics and operational intelligence endpoints designed to power a future dashboard with real-time metrics, risk scoring, and trend analysis.
/api/dashboard/overviewCookieAggregated portfolio overview with key performance indicators, alerts, and recent activity.
/api/dashboard/summaryCookiePortfolio summary including property-level occupancy, revenue, and tenant metrics.
/api/dashboard/tenant-riskCookieRisk scores (0-100) per tenant with contributing factors: expiry proximity, concentration risk, renewal options, space size, and critical date counts.
Response
{
"tenants": [
{
"name": "Anchor Retail Inc",
"risk_score": 72,
"tier": "high",
"factors": {
"expiry_proximity": 0.9,
"concentration": 0.7,
"renewal_options": 0.3
}
}
]
}/api/dashboard/lease-rolloverCookieRent expiring by quarter for rollover analysis. Shows quarterly exposure with the peak quarter highlighted.
/api/dashboard/concentrationCookieTenant, property, and industry concentration metrics with auto-generated alerts when thresholds are exceeded.
/api/dashboard/morning-briefingCookieDaily briefing: action-required items (within 30 days), attention items (within 90 days), and FYI items (within 365 days).
/api/dashboard/health-scoreCookiePortfolio health score (0-100) based on occupancy, data freshness, critical date coverage, and document availability.
/api/dashboard/weekly-summaryCookieWeekly report with per-property occupancy, revenue, upcoming expirations, and rent escalations.
/api/dashboard/stale-dataCookieData quality indicators. Flags stale documents, missing lease data, and properties without recent updates.
/api/dashboard/rent-escalationsCookieUpcoming rent escalation calendar with monthly increase amounts.
/api/dashboard/activity-feedCookieRecent activity stream: queries, agent runs, document updates, and critical date changes.
/api/dashboard/property/{id}CookieSingle-property deep dive with tenant list, financial metrics, critical dates, and document coverage.
/api/dashboard/tenant/{name}CookieTenant deep dive across all properties: lease terms, rent details, risk factors, and related documents.
/api/dashboard/compare/tenantsCookieSide-by-side tenant comparison on rent, lease terms, risk scores, and space utilization.
/api/dashboard/compare/propertiesCookieSide-by-side property comparison on occupancy, revenue, tenant mix, and data quality.
/api/dashboard/rent-roll/{id}CookieRent roll for a specific property showing all tenants, suite numbers, lease terms, and monthly rent.
/api/dashboard/financial-anomaliesCookieUnified view of financial anomalies across your portfolio: NOI drift, CapEx irregularities, and rent anomalies detected by automated watchdogs.
/api/dashboard/rent-reconciliationCookieLease data quality checks and rent escalation compliance. Compares lease terms against actual payment data to identify discrepancies.
Scheduled Reports
Configure recurring reports delivered via email. Supports weekly summaries, critical date digests, and custom report types.
/api/reportsCookieList all scheduled reports for the authenticated user.
/api/reportsCookieCreate a new scheduled report.
Request Body
{
"report_type": "weekly_summary",
"cadence": "weekly",
"recipients": ["user@org.com"],
"config": { "property_ids": ["uuid"] }
}/api/reports/{id}CookieUpdate a scheduled report's cadence, recipients, or configuration.
/api/reports/{id}/runCookieImmediately execute a scheduled report (out-of-band from its regular cadence).
/api/reports/{id}CookieDelete a scheduled report. Returns 204 No Content.
Organizations (Admin)
Multi-tenant organization management. Admin-only endpoints for creating organizations, managing users, and monitoring usage.
/api/organizationsCookie (admin)List all organizations with user counts and creation dates.
Response
{
"organizations": [
{
"id": "uuid",
"name": "Acme CRE Partners",
"slug": "acme-cre",
"user_count": 8,
"created_at": "2026-01-15T00:00:00Z"
}
],
"total": 5
}/api/organizationsCookie (admin)Create a new organization.
Request Body
{
"name": "Acme CRE Partners",
"slug": "acme-cre",
"egnyte_domain": "acme.egnyte.com"
}/api/organizations/{org_id}/usersCookie (admin)List all users in an organization with their roles.
/api/organizations/{org_id}/usersCookie (admin)Assign a user to an organization.
Request Body
{ "user_id": "uuid" }/api/organizations/{org_id}/users/{user_id}/roleCookie (admin)Update a user's role within an organization.
Request Body
{ "role": "admin" }/api/organizations/{org_id}/users/{user_id}Cookie (admin)Remove a user from an organization.
/api/organizations/{org_id}/usage?days=30Cookie (admin)Per-organization usage statistics: query count, active users, document searches, and agent runs over the specified period.
/api/organizations/usage/summaryCookie (admin)All-organizations usage overview for platform monitoring.
/api/organizations/me/usageCookieCurrent user's organization quota and usage — query limits, user counts, and property limits based on subscription tier.
Health
/api/health/statusNonePublic health check endpoint. Returns service status for the API, database, LLM, and Egnyte connections.
Response
{
"status": "healthy",
"services": {
"database": "ok",
"llm": "ok",
"egnyte": "ok"
}
}Rate Limits & Errors
Rate Limits
- Auth endpoints: Per-IP rate limiting to prevent brute-force attacks.
- Chat endpoints: Per-user rate limiting based on subscription tier. Free trial: 100 queries/month. Professional: 2,000/month. Enterprise: unlimited.
- When rate limited, the API returns
429 Too Many Requestswith a message indicating when the limit resets.
Error Responses
All errors follow a consistent envelope format:
{
"detail": "Human-readable error message"
}
// Common status codes:
// 400 — Bad Request (invalid input)
// 401 — Unauthorized (missing or invalid session)
// 403 — Forbidden (insufficient role)
// 404 — Not Found
// 429 — Rate Limited
// 500 — Internal Server ErrorCorrelation IDs
Every request receives a unique correlation ID, returned in the X-Correlation-ID response header. Include this ID when contacting support about specific request failures.
Questions about the API?
Contact our team for integration support, custom endpoint needs, or enterprise API access.
Last updated: March 17, 2026