API documentation
Use your Zentrix AI agent from your own website, app or CRM.
⬇ Download the Postman collection
(import it, paste your key into the api_key variable, press Send).
1. Get a key
Sign in → API & Integrations → Create API key. Copy it - it is shown only once. Keep it on your server only (never in a web page or mobile app). Revoke it any time.
2. Send a message
POST https://agenticai.lk/v1/chat
Authorization: Bearer zk_live_xxxxxxxx
Content-Type: application/json
{"user_id": "customer-123", "message": "Hi, what packages do you have?", "name": "Nimal"}
user_id is your own id for the end user (1-64 characters: letters, numbers, _ . : @ + -).
Every user_id has its own conversation, like a separate WhatsApp number. name is optional.
200 OK
{"user_id": "customer-123", "reply": "Hi Nimal! We have 3 packages...", "status": "ok", "needs_human": false}
status:ok(reply given),human_mode(your staff took over - reply isnull; fetch staff messages with the history endpoint),no_reply(agent paused or the message was ignored),plan_limit(trial ended or plan limit reached -reasonsays which:expired,limit,daily_limit,suspended; the reply is a polite "not available" message you can show to your customer;messageexplains it for you, e.g. "Your free trial ended on 2026-10-29. Please renew your plan...").GET /v1/mealso returns"active": true/false.needs_human: truemeans the agent asked your team to step in.
3. Other endpoints
GET /v1/conversations/{user_id}/messages?limit=50- history, oldest first.role: user, assistant or staff.POST /v1/conversations/{user_id}/reset- forget that user's chat.GET /v1/bookings?status=PENDING&user_id=customer-123- bookings / orders, newest first.GET /v1/leads- leads saved by the agent.GET /v1/me- your business, plan and usage.
Limits & errors
- 60 requests per minute per key, and 12 messages per minute per user_id. Replies count toward your monthly and daily plan limits.
401wrong or revoked key ·403account suspended ·422invalid input ·429too many requests (wait and retry).- The same safety rules as WhatsApp apply (prompt-injection protection, no internal details shared).
Examples
curl -X POST https://agenticai.lk/v1/chat \
-H "Authorization: Bearer $ZENTRIX_KEY" -H "Content-Type: application/json" \
-d '{"user_id":"customer-123","message":"Hi"}'
import os, requests
r = requests.post("https://agenticai.lk/v1/chat", headers={"Authorization": f"Bearer {os.environ['ZENTRIX_KEY']}"},
json={"user_id": "customer-123", "message": "Hi"}, timeout=60)
print(r.json()["reply"])
Help
- Email: dev.rukshan@gmail.com
- Phone / WhatsApp: +94 70 684 9379
- Address: 2/38, Bulathgamgoda, Bemmulla, Gampaha, Sri Lanka
Zentrix AI (operated by Dinidu Rukshan) · 2/38, Bulathgamgoda, Bemmulla, Gampaha, Sri Lanka · dev.rukshan@gmail.com · +94 70 684 9379