API integration overview
The Lex API is one HTTPS API behind every Lex app. Anything the apps do, you can do from your own frontend, backend or script: manage bots, chat with them, stream replies, approve actions, connect accounts and run schedules.
Apps and domains
| What | Where |
|---|---|
| Lex (the chat app) | lexcetha.com |
| Contributor platform (build Mini Programs) | platform.lexcetha.com |
| API | https://api.lexcetha.com/api/v1 |
| These docs | docs.lexcetha.com |
All paths in these docs are relative to the API base URL, so POST /agent-runs means POST https://api.lexcetha.com/api/v1/agent-runs.
Core ideas
- Workspace (tenant). Every user works inside a workspace. Bots, connectors, schedules and documents belong to it, and a user's role there (
owner,admin,member,contributor) decides what they can change. - Bot. An assistant with its own instructions, default mode, skills and connector access. Each bot has one chat thread per user.
- Run. Sending a message starts an agent run. The run thinks, calls tools, may pause for your approval, and finishes with a reply. You follow it live over Server-Sent Events.
- Modes.
nalar(quick),patih(balanced, the default) andcendikia(deep, multi-step). Pick one per message or set a bot's default. - Approvals. Reads run on their own; anything that sends, creates, changes or deletes outside Lex waits for your approval unless a workspace admin allowed it to run automatically.
A first request
bash
# 1. Sign in and keep the session cookie
curl -c cookies.txt -X POST https://api.lexcetha.com/api/v1/auth/login \
-H 'Content-Type: application/json' \
-d '{"email":"you@example.com","password":"your-password"}'
# 2. Who am I?
curl -b cookies.txt https://api.lexcetha.com/api/v1/meContinue with Authentication, then Bots & chat.
