Management Chat API
The Management Chat API connects to the same configuration agent as the web-based Manage tab, allowing programmatic configuration of your organization.
Authentication
All requests require a management API key (lxm_ prefix):
Authorization: Bearer lxm_...
Management keys grant full configuration access — treat them with the same care as admin credentials.
Base URL
https://lexey.ai/api/v1/management
Quick start
| 1 | # Create a conversation |
| 2 | curl -X POST https://lexey.ai/api/v1/management/conversations \ |
| 3 | -H "Authorization: Bearer $LEXEY_MANAGEMENT_KEY" |
| 4 | |
| 5 | # Send a message |
| 6 | curl -N -X POST https://lexey.ai/api/v1/management/conversations/CONVERSATION_ID/messages \ |
| 7 | -H "Authorization: Bearer $LEXEY_MANAGEMENT_KEY" \ |
| 8 | -H "Content-Type: application/json" \ |
| 9 | -d '{"message": "Set our business context: We are a pet supplies store..."}' |
Common tasks
Set business context:
{"message": "Our business is a SaaS company called Acme. We build project management tools for small teams."}
Add a knowledge article:
{"message": "Add a knowledge article about pricing: Our plans are Free (up to 3 projects), Pro ($12/month, unlimited projects), and Enterprise (custom pricing)."}
Update branding:
{"message": "Set our agent name to 'Acme Support', primary colour to '#2563EB', and welcome heading to 'Need help with Acme?'"}
Set business rules:
{"message": "Add these escalation rules: always escalate if a customer mentions billing disputes, refund requests over $100, or legal issues."}
Review analytics:
{"message": "How have we performed over the last 7 days?"}
Streaming
The send message endpoint returns an SSE stream, identical to the customer API. Each event includes a monotonically incrementing id: field and a data: line. For the full event format and code examples in TypeScript, Python, Go, Ruby, and C#, see the Streaming guide.
E2E testing
The management and customer APIs together enable end-to-end testing without browser automation:
- Configure via management API — set up business context, knowledge, rules.
- Test via customer API — send customer messages and verify agent responses.
- Review via management API — check analytics, conversation history.
Building an LLM agent integration? See the Agent integration guide for a compact API reference.