โก Quick Start
Get your API key from the dashboard, then make your first request:
# 1. Authenticate
curl -X POST https://konan.ma/api/v1/auth/login \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com", "password": "your-password"}'
# Response: {"token": "eyJhbGc...", "user": {...}}
# 2. Create a bot
curl -X POST https://konan.ma/api/v1/bots \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Support Bot", "domain": "support"}'
# 3. Send a message
curl -X POST https://konan.ma/api/v1/chat \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"bot_id": "BOT_ID", "message": "Hello!"}'
๐ Authentication
๐ซ JWT Bearer Token
Obtain a token via POST /auth/login. Include in all requests:Authorization: Bearer <token>
๐ API Key
Generate from the dashboard. Include in requests:X-API-Key: <your-api-key>
๐ Public Widget
The chat widget uses bot-specific public tokens. No user authentication required for visitor chat sessions.
๐ก API Endpoints
Authentication
8 endpoints
โผ
POST/auth/registerCreate new account
POST/auth/loginLogin, get JWT token
GET/auth/meGet current user
POST/auth/forgot-passwordRequest password reset
POST/auth/reset-passwordReset password with code
POST/auth/verify-emailVerify email with code
POST/auth/totp/setupEnable 2FA (TOTP)
POST/auth/totp/verifyVerify 2FA code
Bots
7 endpoints
โผ
GET/botsList your bots
POST/botsCreate a new bot
GET/bots/{id}Get bot details
PUT/bots/{id}Update bot config
DELETE/bots/{id}Delete a bot
POST/bots/{id}/activateActivate bot
POST/bots/{id}/duplicateClone a bot
Chat
5 endpoints
โผ
POST/chatSend message, get AI response
POST/chat/streamStreaming AI response (SSE)
GET/chat/history/{session_id}Get conversation history
GET/chat/sessions/{bot_id}List bot sessions
DELETE/chat/sessions/{session_id}Delete a session
Webhooks
6 endpoints
โผ
POST/webhooksRegister a webhook URL
GET/webhooks/{bot_id}List bot webhooks
PUT/webhooks/{id}Update webhook config
DELETE/webhooks/{id}Delete a webhook
POST/webhooks/{id}/testSend test ping
GET/webhooks/{bot_id}/deliveriesDelivery logs
Inbox & Live Agent
12 endpoints
โผ
GET/inbox/conversations/{bot_id}List inbox conversations
GET/inbox/stats/{bot_id}Inbox statistics
PUT/inbox/sessions/{id}/assignAssign to agent
POST/inbox/auto-assign/{bot_id}Round-robin assignment
PUT/inbox/sessions/{id}/statusUpdate session status
PUT/inbox/sessions/{id}/tagsUpdate session tags
GET/inbox/notes/{session_id}List internal notes
POST/inbox/notes/{session_id}Create internal note
GET/inbox/canned-responses/{bot_id}List canned responses
POST/inbox/canned-responsesCreate canned response
GET/inbox/summary/{session_id}AI conversation summary
GET/inbox/viewsSaved inbox filters
Analytics
5 endpoints
โผ
GET/analytics/{bot_id}Bot analytics overview
GET/analytics/{bot_id}/conversationsConversation metrics
GET/analytics/{bot_id}/messagesMessage volume over time
GET/analytics/{bot_id}/csatCustomer satisfaction scores
GET/analytics/{bot_id}/topicsTop topics & intents
Teams
6 endpoints
โผ
GET/teamsList your teams
POST/teamsCreate a team
POST/teams/{id}/inviteInvite member
GET/teams/{id}/membersList members
DELETE/teams/{id}/members/{uid}Remove member
POST/teams/{id}/share-botShare bot with team
Contacts
5 endpoints
โผ
GET/contactsList contacts
POST/contactsCreate contact
GET/contacts/{id}Get contact details
PUT/contacts/{id}Update contact
DELETE/contacts/{id}Delete contact
Presence
4 endpoints
โผ
POST/presence/heartbeatSend heartbeat ping
GET/presence/teamTeam online status
PUT/presence/statusSet my status
GET/presence/availableAvailable agents
Notifications
6 endpoints
โผ
GET/notificationsList notifications
GET/notifications/unread-countUnread badge count
PUT/notifications/read/{id}Mark as read
PUT/notifications/read-allMark all read
GET/notifications/preferencesGet notification prefs
PUT/notifications/preferencesUpdate notification prefs
๐ก Webhook Events
โก Rate Limits
100
requests / minute
Standard endpoints
Standard endpoints
30
requests / minute
Chat / AI endpoints
Chat / AI endpoints
5
requests / minute
Auth (login, register)
Auth (login, register)
10 MB
max request body
File uploads included
File uploads included