ClickCease

Leni developers

Build on Leni’s intelligent runtime platform, powered by your data and context

A single Leni API gives your agents everything they need to deliver exceptional, highly accurate outputs: authorized data, organizational and personal Context, and specialized real-estate tools. Use it server-to-server over HTTP or connect compatible AI assistants through Leni’s remote MCP runtime. Both connection modes use the same Leni accounts, tenant boundaries, and usage policies as the Leni application. You can also bring an assistant with your own name and icon into Slack or Microsoft Teams.

Branded apps for your team

Give your team a named assistant in Slack or Teams for connected research, document analysis, and everyday preparation.

Server-to-server

HTTP API

Sandbox, development, and production project keys call https://api.prod.ca-central-1.leni.co. The key itself determines its environment, limits, and billing behavior; there is no separate sandbox hostname.

SettingValue
Base URLhttps://api.prod.ca-central-1.leni.co
AuthenticationX-Api-Key: <key> or Authorization: Bearer <key>
JSON requestsContent-Type: application/json
File requestsUse multipart parts named files or the documented JSON base64 shape.

Project keys are not MCP credentials

Never paste a Leni project API key into Claude or another MCP client. MCP uses OAuth sign-in and a user-specific consent grant.

Quick start

curl -sS "https://api.prod.ca-central-1.leni.co/users/custom-analysts" \
  -H "X-Api-Key: $LENI_API_KEY"
  • Sandbox keys are limited to 5 requests per minute and a monthly trial quota.
  • Development keys are limited to 60 requests per minute.
  • Production keys are limited to 120 requests per minute. Metered analysis uses included subscription credit first, then funded API credits when available.
  • Respect Retry-After on 429 responses and use idempotent retry behavior.
  • Supported attachments are limited to 50 MB per decoded file.

Start with the four-step HTTP API quickstart and use the retry and async lifecycle guide before sending production traffic.

Current surface

HTTP API reference

The authenticated project-key owner is the security principal for these routes. User and organization identifiers supplied by a client cannot be used to impersonate a different account.

MethodPathPurpose
GET/users/sdk/meVerify a project key and read sanitized owner metadata.
POST/users/run-modelsRun a Leni AI request. Durably accepted work returns HTTP 202 and exact identifiers for polling.
GET/users/me/chat-messagesList the authenticated API-key owner’s messages.
GET/users/me/chat-messages/:messageIdRead one owned message and its current state.
GET/users/me/chat-sessions/:sessionIdRead a session in which the authenticated owner participates.
GET/users/me/chat-sessions/:sessionId/messagesRead the authorized transcript for a session.
POST/users/me/chat-sessions/attachmentsResolve authorized file references for a session or message.
POST/users/me/chat-sessions/message-responsesRead authorized persisted response rows for a session or message.
POST/users/get-user-memoryList Context available to the authenticated owner.
POST/users/memory/searchSearch normalized Personal or eligible Organization Context.
POST/users/memory/foldersList authorized Context folders and their note IDs.
POST/users/memory/:memoryId/filesCreate five-minute links for files on an authorized Context note.
POST/users/add-to-memoryCreate a Context note, with optional supported attachments.
POST/users/update-memoryUpdate an existing Context note owned by the authenticated context.
POST/users/custom-analystsCreate a custom analyst.
GET/users/custom-analystsList custom analysts for the authenticated owner.
PUT/users/custom-analysts/:analystIdUpdate an owned custom analyst.
DELETE/users/custom-analysts/:analystIdDelete an owned custom analyst.

See the detailed HTTP API reference for request fields, response shapes, examples, limits, uploads, polling, Context, and custom analyst contracts.

Long-running analysis

POST /users/run-models can return HTTP 202 after durable admission. Preserve the exact run, message, and session identifiers, do not repeat an accepted POST, and poll the documented owner-scoped message route until it is terminal. Do not infer a session identifier from an analysis identifier.

Context access and legacy API names

Leni calls saved knowledge Context. Existing HTTP paths, payload values, MCP tool names, and OAuth scopes retain memory, user_memory, and organisation_memory for backward compatibility. These identifiers refer to Personal Context and Organization Context; integrations should not rename them in requests.

AI assistants

Connect through Leni MCP

The Leni intelligent runtime exposes account-scoped real-estate, financial, market-research, operating, and context tools to a compatible AI host. Each user signs in to Leni, sees the organization and requested permissions, and grants access through OAuth.

SettingValue
Remote MCP URLhttps://mcp.leni.co/mcp
OAuth issuerhttps://auth.leni.co
TransportStreamable HTTP over HTTPS
AuthenticationOAuth 2.0 sign-in and consent with a Leni account

Connect from Claude

Individual Free, Pro, or Max account

  1. Open Customize → Connectors.
  2. Select Add custom connector, name it Leni, and enter https://mcp.leni.co/mcp.
  3. Connect, sign in to Leni, review the organization and permissions, and approve.
  4. Enable Leni for the conversation.

Claude Team or Enterprise

  1. An Owner or Primary Owner opens Organization settings → Connectors, selects Add → Custom → Web, and adds https://mcp.leni.co/mcp.
  2. Each member opens Customize → Connectors, finds Leni, and authenticates their own Leni account.
  3. The member enables Leni for the conversation. Organization policies may further limit access.
CapabilityBehavior
Account and usageRead the plan, whether analysis is available, and the percentage of included usage remaining. Dollar credit balances are not exposed.
Portfolio dataDiscover approved Leni semantic-layer models and run bounded, read-only queries for operating and financial data.
AnalysisRun context-aware real-estate, financial, market-research, operating, and organizational analysis with Leni’s specialized tools.
ContextConsult relevant personal and organization-scoped context. Create, update, or delete saved context only when the user explicitly requests it and the OAuth grant permits it.
Context folders and filesDiscover authorized folders and attachment metadata, retrieve five-minute file links, and include selected context-note files in Leni analysis. Existing MCP connections must remove and reconnect Leni once to grant the new file-read permission.

Available MCP tools

MCP hosts discover the current input and output schemas directly from Leni. The tool names and OAuth permissions below are the public runtime surface.

ToolRequired scopePurpose
leni_get_accountleni:account:readRead the connected account, plan, and analysis entitlement.
leni_get_portfolio_occupancyleni:data:readRead the latest authorized portfolio occupancy.
leni_list_data_modelsleni:data:readDiscover available read-only portfolio data models.
leni_describe_data_modelleni:data:readRead the measures and dimensions for one data model.
leni_query_portfolio_dataleni:data:readRun a bounded, read-only semantic-layer query.
leni_consult_memory_contextleni:memory:readFind relevant personal or organization Context.
leni_analyze_real_estate_financeleni:analysis:runStart a context-aware Leni analysis.
leni_get_analysis_statusleni:analysis:readPoll or retrieve an existing analysis.
leni_get_analysis_sessionleni:analysis:readRead an authorized analysis-session transcript.
leni_list_memoryleni:memory:readList or search authorized Context notes.
leni_list_memory_foldersleni:memory:readList authorized Context folders and note IDs.
leni_get_memory_filesleni:memory:files:readCreate five-minute links for files on a selected note.
leni_create_memoryleni:memory:writeCreate a text Context note after an explicit request.
leni_update_memoryleni:memory:writeUpdate an authorized Context note after an explicit request.
leni_delete_memoryleni:memory:deleteDelete an exact Context note after an explicit request.

OAuth permissions

The consent screen shows the permissions requested by the connecting host. Leni checks the granted scope again for every tool call.

ScopeAllows
leni:account:readRead the connected account, organization, plan, and analysis availability.
leni:analysis:runStart a Leni analysis that can consume included usage or API credits.
leni:analysis:readRead the status, result, or authorized transcript of an analysis.
leni:data:readDiscover and query authorized portfolio data through read-only models.
leni:memory:readRead relevant personal and eligible organization Context.
leni:memory:files:readCreate short-lived links for files on an authorized Context note.
leni:memory:writeCreate or update Context only after an explicit user request.
leni:memory:deleteDelete a specific Context note only after an explicit user request.
MCP allowanceCurrent limit
Authenticated runtime requests120 requests per 60 seconds per signed-in subject and client
Structured Leni semantic queries20 requests per 60 seconds per signed-in principal and client
Memory context consultation12 requests per 60 seconds per Leni account across clients

Applicable MCP limits overlap; the most restrictive one wins. Respect Retry-After after a 429 response.

When an assistant calls Leni

Connecting Leni makes its tools available; it does not force every request through Leni. The AI host chooses tools from the prompt, enabled connectors, tool descriptions, conversation context, and its built-in capabilities. For a reliable handoff, say “Use Leni to…” and name the connected-data task.

Example requests

  • “Use Leni to show my current portfolio occupancy.”
  • “Use Leni to show how many open work orders I have.”
  • “Use Leni to show rent collected this month.”
  • “Use Leni to explain the main drivers of the change in collections.”
  • “Research downtown Toronto, then use Leni to compare it with the markets in my portfolio.”
  • “Use Leni to find my loan documents and analyze the maturity terms.”

Market research through Leni

Use Leni analysis when external market research or multi-step synthesis is needed. The runtime can combine context-aware research tools with the user’s authorized portfolio data and Context. Direct structured-data tools remain limited to authorized Leni data, while the AI host may also use its own approved web capabilities.

See the complete MCP runtime reference for OAuth discovery, scopes, every advertised tool, structured-query bounds, rate limits, token lifecycle, and troubleshooting.

Slack and Microsoft Teams

Branded apps for your team

Give your organization an assistant with its own name and icon, such as Aria. Teammates can message it, ask follow-up questions, attach documents, and work with their connected sources. Leni provides the analysis infrastructure, while replies use the registered app name. The examples below use Aria as an example name; use your own app name when messaging or mentioning your assistant.

Ordinary replies do not need a powered-by footer. The assistant explains that it is powered by Leni's infrastructure when asked about its provider or when explaining accounts, connections, billing, or privacy. Leni account links, product names, and quoted source material keep their original names.

Set up the app

A Leni organization owner or administrator with an eligible paid account sets up the app. Availability depends on your organization's rollout and Slack or Microsoft app policies.

Choose Slack or Teams

  • For Slack, open Slack app setup, choose branded setup, and create your Slack app from the supplied manifest. Register its credentials in Leni, configure the exact app-specific callback URLs shown, and complete installation.
  • For Teams, open Teams app setup. Use a dedicated single-tenant Entra application and Azure Bot with the Teams channel enabled. Enter the app name, tenant ID, bot App ID, client secret value, and icons in Leni. Configure the returned messaging endpoint, then download the Teams package and have your Microsoft administrator approve and install it. Each branded Teams app belongs to one Microsoft tenant and one Leni organization.

Connect your teammates and sources

  1. Ask each teammate to message the installed app and follow its secure connection link. Each person signs into their own eligible Leni account in the same organization and reviews the bot's trust prompt. Only link a customer-managed app whose operator you trust; that operator can receive the requests and answers handled by the bot.
  2. Each person opens Connect in Leni and connects the sources they want to use, such as Outlook, SharePoint, OneDrive, Google Drive, Gmail, or Notion. Complete any required Microsoft admin consent. Installing a Slack or Teams bot does not connect those data sources automatically.
  3. Start in a direct message. If your team needs shared replies, an administrator enables them and adds the app to the approved conversation. Mention the app by its registered name when asking it to help in a shared channel or Teams group chat.

Work with it like a teammate

Give the assistant a goal, name the sources, and describe the result you need. Use a private chat for these connected-app examples, with the relevant accounts connected and enabled. Ask for source links and missing information so you can review the answer.

Task and sourcesExample request
Find the right document in SharePointAria, find the latest approved Harbor budget in SharePoint. Summarize the assumptions and include the source link and version date.
Prepare for a meeting with OutlookAria, use my connected Outlook calendar and recent emails to prepare for tomorrow's Harbor review. List open questions, decisions needed, and the source messages.
Bring SharePoint and Outlook togetherAria, compare the Harbor budget in SharePoint with the contractor's latest Outlook email. Explain any differences and draft follow-up questions here.
Review an attached Excel workbookAria, compare the Actual and Budget sheets in this workbook. Identify the largest variances and explain which rows support each finding.
Prepare a reply from Outlook and OneDriveAria, read the latest lender email in Outlook and the financing memo in OneDrive. Draft a reply here for me to review, with any missing information clearly marked.
Build a brief from other connected sourcesAria, combine the project plan in Notion with the latest status document in Google Drive. Write a short update with owners, deadlines, blockers, and source links.

Continue in the same conversation with requests such as "Focus on operating expenses" or "Turn this into a checklist." The email examples produce drafts in chat for you to review and send. They do not imply that the bot continuously monitors your inbox or acts without a request.

Choose the right conversation for the data

Private chats can use your permitted Personal Context and connected sources. Shared channels and Teams group chats use approved Organization Context and authorized property data. They exclude Personal Context, personal Context attachments, and live connected-app data. For shared work, ask "@Aria, summarize the approved onboarding process in Organization Context and list the next steps." Connecting your account does not give other teammates access to your mailbox or files.

Attach files and review results

Official and branded chat apps accept PDF, Excel, Word, PowerPoint, CSV, TSV, plain text, Markdown, JSON, and common images. Attach the actual file with your request. Each request supports up to 10 files, with a maximum of 10 MiB per file and 25 MiB combined. These chat limits are separate from HTTP API upload limits. Protected, damaged, unsupported, or oversized files may need correction before the assistant can read them. Document macros are never executed.

In Teams, send incoming files in a personal chat, and upload images as files. Channel and group-chat uploads are directed to a personal chat. Teams file support requires an installed package with the file capability enabled. Accept the OneDrive consent card to receive a supported generated file. Declining the card does not upload the file.

When a task takes longer, wait for its final answer in the same conversation before retrying. If file delivery fails after an answer arrives, ask for the existing file again in the same conversation.

Check the app before inviting your team

  1. Ask its name, then ask who powers it. Check the registered name and the Leni explanation.
  2. Attach a small synthetic workbook and ask for a known value from a named sheet.
  3. Try a private-chat request against a connected source and verify the returned source link.
  4. Ask a follow-up in the same conversation and check that it uses the preceding answer.
  5. In an approved shared conversation, test with Organization Context intended for that audience.

The response-naming update does not require existing users to reconnect or reinstall their app. Branded Slack apps now keep separate shared-thread histories; the first request in an older shared thread starts fresh context once. Direct-message history is preserved. If an administrator disconnects and re-registers an app, users must follow its new connection flow.

Trust boundaries

Data access and billing

  • Every MCP request is bound to the OAuth subject and that user’s active Leni organization.
  • Direct portfolio queries receive server-owned organization and authorized-property filters.
  • MCP clients cannot submit SQL, and direct Leni semantic-layer queries are read-only.
  • One organization’s models, properties, Context, and analysis cannot be selected by another organization’s token.
  • Context-file access revalidates the note under the signed-in user, organization, and model partition; clients receive a five-minute bearer link, never an S3 bucket or object key.
  • Analysis uses the same included plan usage and funded API-credit spillover as Leni. When neither is available, Leni returns a usage-exhausted error.
  • The account tool exposes percentage usage remaining, not the underlying dollar credit balance.

Read the developer integrations privacy notice for the data categories, connected-assistant flow, retention practices, and customer controls that apply to the HTTP API and MCP runtime.

Operations

Troubleshooting

ProblemWhat to check
Leni is not usedConfirm the connector is enabled, ask explicitly to use Leni, and review the host’s tool-access mode.
Cannot add the connectorA Claude Team or Enterprise owner may need to add the custom connector for the organization first.
Sign-in or consent failsReconnect Leni and confirm the Leni user has an active organization.
Analysis is still runningHTTP API: keep the exact runId, messageId, and sessionId returned by HTTP 202, then poll GET /users/me/chat-messages/:messageId until terminal. MCP: keep the returned analysisId and ask the assistant to check status; use sessionId for transcript retrieval.
Usage exhaustedOpen Leni to manage the plan or fund API-credit spillover, then retry.
HTTP API returns 401Confirm the key is active and sent in X-Api-Key or Authorization: Bearer. Query-string keys are not supported.

Need help with an account or integration? Sign in to Leni and contact the team with the request ID, analysis ID, or failing endpoint. Never include a complete API key in a support message.