Full API Reference
Every endpoint the Blutec Echo dashboard uses. Build the same UI or your own app using these APIs. Each endpoint lists which part of the UI uses it so you can replicate behaviour.
Auth: Authorization: Bearer <JWT> from login, or your API key for programmatic access.
Authentication
Sign up, login, profile, and password. No auth header for signup/login.
Used in UI: Login page, Signup page, Settings (profile & change password), header "Me".
/api/auth/signup(no auth)Create account
UI: Signup page → submit
Body: {"email":"string","password":"string","name":"string (optional)"}
Response: { success, data: { user, token } }
curl -X POST "https://bkbharatai.blutec.ai/api/auth/signup" \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com","password":"SecurePass123","name":"Your Name"}'/api/auth/login(no auth)Get JWT
UI: Login page → submit
Body: {"email":"string","password":"string"}
Response: { success, data: { user, token } }
curl -X POST "https://bkbharatai.blutec.ai/api/auth/login" \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com","password":"YourPassword"}'/api/auth/meCurrent user
UI: Dashboard layout (user info), Settings
Response: { success, data: { user } }
curl -X GET "https://bkbharatai.blutec.ai/api/auth/me" \
-H "Authorization: Bearer YOUR_TOKEN"/api/auth/profileUpdate profile
UI: Settings → profile form
Body: {"name":"string","email":"string (optional)"}
Response: { success, data: { user } }
curl -X PUT "https://bkbharatai.blutec.ai/api/auth/profile" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"New Name"}'/api/auth/change-passwordChange password
UI: Settings → change password form
Body: {"current_password":"string","new_password":"string"}
Response: { success }
curl -X POST "https://bkbharatai.blutec.ai/api/auth/change-password" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"current_password":"old","new_password":"new"}'Agents (Assistants)
CRUD for voice agents. Create/update supports full config: voice, model, transcriber, context_breakdown, transfer, end_call, filler, web_search, post_call.
Used in UI: Dashboard (Assistants list), Agent detail (all tabs: Assistant Details, Call Config, Knowledge Base, Integrations, Post-Call, Recent Calls).
/api/agents/createCreate agent
UI: Dashboard → "Create agent" or default agent creation
Body: "name, welcome_message, context_breakdown[], voice{}, model{}, transcriber{}, languages[], transfer{}, end_call{}, filler{}, web_search{}, post_call_actions{} (or legacy post_call{}). See Agent API doc."
Response: { success, data: { id/agent_id, ... } }
curl -X POST "https://bkbharatai.blutec.ai/api/agents/create" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"My Agent","welcome_message":"Hello!","context_breakdown":[{"title":"Purpose","body":"Help the user.","is_enabled":true}],"filler":{"enabled":true,"after_sec":1.5,"fillers":["Let me check that for you","One moment please"]}}'/api/agentsList agents
UI: Dashboard → Assistants list, Agent dropdowns elsewhere
Query: "pageno, pagesize (optional)"
Response: { success, data: { agents[], total } }
curl -X GET "https://bkbharatai.blutec.ai/api/agents?pageno=1&pagesize=20" \
-H "Authorization: Bearer YOUR_TOKEN"/api/agents/:agentIdGet agent
UI: Agent detail page (load full config)
Response: { success, data: { agent object } }
curl -X GET "https://bkbharatai.blutec.ai/api/agents/AGENT_ID" \
-H "Authorization: Bearer YOUR_TOKEN"/api/agents/:agentIdUpdate agent
UI: Agent detail → Save (any tab). Partial update supported.
Body: "Any subset: name, welcome_message, context_breakdown, voice, model, transcriber, transfer, end_call, filler, web_search, post_call, etc."
Response: { success, data }
curl -X PUT "https://bkbharatai.blutec.ai/api/agents/AGENT_ID" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"filler":{"enabled":true,"after_sec":1.5,"fillers":["Let me check that for you","One moment please"]}}'/api/agents/:agentIdDelete agent
UI: Agent detail → Delete agent
Response: { success }
curl -X DELETE "https://bkbharatai.blutec.ai/api/agents/AGENT_ID" \
-H "Authorization: Bearer YOUR_TOKEN"/api/agents/:agentId/integrationsList agent integrations
UI: Agent detail → Integrations tab (list attached)
Response: { success, data: { integrations[] } }
curl -X GET "https://bkbharatai.blutec.ai/api/agents/AGENT_ID/integrations" \
-H "Authorization: Bearer YOUR_TOKEN"/api/agents/:agentId/integrationsAttach integration to agent
UI: Agent detail → Integrations tab → Attach; Integrations page → Attach to agent
Body: {"integration_id":"number"}
Response: { success }
curl -X POST "https://bkbharatai.blutec.ai/api/agents/AGENT_ID/integrations" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"integration_id":123}'/api/agents/:agentId/integrations/:integrationIdDetach integration
UI: Agent detail → Integrations tab → Detach
Response: { success }
curl -X DELETE "https://bkbharatai.blutec.ai/api/agents/AGENT_ID/integrations/INT_ID" \
-H "Authorization: Bearer YOUR_TOKEN"/api/agents/:agentId/widget-configGet widget config
UI: Agent detail → Deploy → Website widget
Response: { success, data: { widget config } }
curl -X GET "https://bkbharatai.blutec.ai/api/agents/AGENT_ID/widget-config" \
-H "Authorization: Bearer YOUR_TOKEN"/api/agents/:agentId/widget-configUpdate widget config
UI: Agent detail → Deploy → Website widget modal
Body: "Widget options object"
Response: { success }
curl -X PUT "https://bkbharatai.blutec.ai/api/agents/AGENT_ID/widget-config" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'/api/agents/:agentId/web-callGet web call URL
UI: Agent detail → Deploy → Phone Call / web call link
Response: { success, data: { url } }
curl -X GET "https://bkbharatai.blutec.ai/api/agents/AGENT_ID/web-call" \
-H "Authorization: Bearer YOUR_TOKEN"/api/agents/:agentId/web-chatWeb chat (programmatic)
UI: Embedded web chat widget backend
Body: "Messages, session, etc."
Response: Chat response
curl -X POST "https://bkbharatai.blutec.ai/api/agents/AGENT_ID/web-chat" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"message":"Hello"}'Knowledge Base
Upload files, attach/detach to agents, delete. Used for RAG context.
Used in UI: Dashboard → Knowledge Base page; Agent detail → Knowledge Base tab.
/api/v1/knowledge_base/listList files
UI: Knowledge Base page → file list; Agent KB tab → available files
Response: { success, data: { files[] } }
curl -X GET "https://bkbharatai.blutec.ai/api/v1/knowledge_base/list" \
-H "Authorization: Bearer YOUR_TOKEN"/api/v1/knowledge_base/can_uploadCheck if upload allowed
UI: Knowledge Base page → before upload
Body: {"file_size":"number","file_type":"string"}
Response: { success, data: { allowed } }
curl -X POST "https://bkbharatai.blutec.ai/api/v1/knowledge_base/can_upload" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"file_size":1024,"file_type":"pdf"}'/api/v1/knowledge_base/createUpload PDF file
UI: Knowledge Base page → upload; Agent KB tab → upload
Body: {"file_data":"base64 (required)","filename":"string (required, must end with .pdf)"}
Response: { success, data: { file } }
curl -X POST "https://bkbharatai.blutec.ai/api/v1/knowledge_base/create" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"file_data":"BASE64_ENCODED_CONTENT","filename":"sample.pdf"}'/api/v1/knowledge_base/attachAttach file(s) to agent
UI: Agent detail → Knowledge Base tab → Attach
Body: {"file_ids":"number[]","agent_id":"string","when_to_use":"string (optional)"}
Response: { success }
curl -X POST "https://bkbharatai.blutec.ai/api/v1/knowledge_base/attach" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"file_ids":[1,2],"agent_id":"AGENT_ID","when_to_use":"Always"}'/api/v1/knowledge_base/detachDetach file(s) from agent
UI: Agent detail → Knowledge Base tab → Detach
Body: {"file_ids":"number[]","agent_id":"string"}
Response: { success }
curl -X POST "https://bkbharatai.blutec.ai/api/v1/knowledge_base/detach" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"file_ids":[1],"agent_id":"AGENT_ID"}'/api/v1/knowledge_base/deleteDelete file
UI: Knowledge Base page → delete file
Body: {"file_id":"number"}
Response: { success }
curl -X POST "https://bkbharatai.blutec.ai/api/v1/knowledge_base/delete" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"file_id":1}'Integrations
Custom API and Cal.com integrations; attach/detach to agents.
Used in UI: Dashboard → Integrations page; Agent detail → Integrations tab.
/api/integrationsList integrations
UI: Integrations page → Your integrations; Agent Integrations tab → dropdown
Response: { success, data: { integrations[] } }
curl -X GET "https://bkbharatai.blutec.ai/api/integrations" \
-H "Authorization: Bearer YOUR_TOKEN"/api/integrations/custom-apiCreate custom API integration
UI: Integrations page → Create Custom API form
Body: "name, description, url, method, headers[], query_params[], body_params[], body_type, integration_type: \"custom_api\""
Response: { success, data: { id, ... } }
curl -X POST "https://bkbharatai.blutec.ai/api/integrations/custom-api" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"My API","description":"Look up order status from our backend","url":"https://api.example.com/orders","method":"POST","headers":[],"query_params":[],"body_params":[{"key":"order_id","description":"Order ID from the caller","type":"string","required":true,"isLLMGenerated":true}],"body_type":"json","integration_type":"custom_api"}'/api/integrations/test-connectionTest a Custom API endpoint before saving
UI: Integrations → Custom API → Test tab
Body: "url, method, headers[], query_params[], body_params[], sample_params"
Response: { success, data: { ok, status, requestUrl, bodyPreview } }
curl -X POST "https://bkbharatai.blutec.ai/api/integrations/test-connection" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"url":"https://api.example.com/orders","method":"GET","query_params":[{"key":"order_id"}],"sample_params":{"order_id":"123"}}'/api/integrations/calCreate Cal.com integration
UI: Integrations page → Cal.com form
Body: "name, description, cal_api_key, cal_id, cal_timezone, integration_type: \"cal\""
Response: { success, data: { id, ... } }
curl -X POST "https://bkbharatai.blutec.ai/api/integrations/cal" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"My Cal","cal_api_key":"cal_xxx","cal_id":"user_xxx","cal_timezone":"America/New_York","integration_type":"cal"}'Calls
Dispatch calls, list logs, bulk campaigns (create, pause, resume, reschedule, cancel).
Used in UI: Dashboard → Recent Calls; Quick Call; Agent detail → Recent Calls tab; Bulk Campaigns page.
/api/calls/dispatchStart a call
UI: Quick Call, Agent web call, programmatic outbound
Body: "agent_id, to_number, from_number_id (optional), etc."
Response: { success, data: { call_id, ... } }
curl -X POST "https://bkbharatai.blutec.ai/api/calls/dispatch" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"agent_id":"AGENT_ID","to_number":"+15551234567"}'/api/calls/logsList call logs
UI: Recent Calls page; Agent detail → Recent Calls tab
Query: "pageno, pagesize, agentid (optional)"
Response: { success, data: { call_logs[] / call_log_data, ... } }
curl -X GET "https://bkbharatai.blutec.ai/api/calls/logs?pageno=1&pagesize=20" \
-H "Authorization: Bearer YOUR_TOKEN"/api/calls/logs/:callLogIdGet call log
UI: Recent Calls → row click / detail
Response: { success, data: { call log } }
curl -X GET "https://bkbharatai.blutec.ai/api/calls/logs/CALL_LOG_ID" \
-H "Authorization: Bearer YOUR_TOKEN"/api/calls/bulkList bulk campaigns
UI: Bulk Campaigns page → list
Query: "pageno, pagesize, status (optional)"
Response: { success, data: { records[], total_records } }
curl -X GET "https://bkbharatai.blutec.ai/api/calls/bulk?pageno=1&pagesize=20" \
-H "Authorization: Bearer YOUR_TOKEN"/api/calls/bulk/:bulkIdGet bulk campaign
UI: Bulk Campaigns page → campaign detail
Response: { success, data: { campaign } }
curl -X GET "https://bkbharatai.blutec.ai/api/calls/bulk/BULK_ID" \
-H "Authorization: Bearer YOUR_TOKEN"/api/calls/bulkCreate bulk campaign
UI: Bulk Campaigns page → Create New Campaign form
Body: "name, from_number_id or phone_number_id, contacts[] or contact_list[], is_scheduled, scheduled_datetime, timezone, retry_config{}, enabled_reschedule_call, concurrent_call_limit"
Response: { success, data: { id, ... } }
curl -X POST "https://bkbharatai.blutec.ai/api/calls/bulk" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Campaign","from_number_id":"pn_xxx","contacts":[{"phone":"+15551234567","name":"John"}],"is_scheduled":false,"retry_config":{"auto_retry":true,"retry_limit":2},"concurrent_call_limit":1}'/api/calls/bulk/:bulkIdPause / Resume / Reschedule
UI: Bulk Campaigns page → Pause, Resume, Reschedule buttons
Body: "action: \"pause\" | \"resume\" | \"reschedule\"; for reschedule: new_scheduled_datetime, new_timezone"
Response: { success, data }
curl -X PUT "https://bkbharatai.blutec.ai/api/calls/bulk/BULK_ID" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"action":"pause"}'/api/calls/bulk/:bulkIdCancel bulk campaign
UI: Bulk Campaigns page → Cancel button
Response: { success }
curl -X DELETE "https://bkbharatai.blutec.ai/api/calls/bulk/BULK_ID" \
-H "Authorization: Bearer YOUR_TOKEN"Billing & Balance
Plans, balance, usage-based billing toggle.
Used in UI: Dashboard → Balance & Plans page.
/api/billing/plansList plans
UI: Balance & Plans → plans list
Response: { success, data: { plans[] } }
curl -X GET "https://bkbharatai.blutec.ai/api/billing/plans" \
-H "Authorization: Bearer YOUR_TOKEN"/api/billing/balanceGet balance
UI: Balance & Plans → balance display
Response: { success, data: { balance, ... } }
curl -X GET "https://bkbharatai.blutec.ai/api/billing/balance" \
-H "Authorization: Bearer YOUR_TOKEN"/api/billing/usage-basedToggle usage-based billing
UI: Balance & Plans → usage-based toggle
Body: {"enabled":"boolean"}
Response: { success }
curl -X PUT "https://bkbharatai.blutec.ai/api/billing/usage-based" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"enabled":true}'API Keys
Create and list API keys for server-side or script access.
Used in UI: Dashboard → API Access page.
/api/api-keysList API keys
UI: API Access page → keys list
Response: { success, data: { keys[] } }
curl -X GET "https://bkbharatai.blutec.ai/api/api-keys" \
-H "Authorization: Bearer YOUR_TOKEN"/api/api-keysCreate API key
UI: API Access page → Create key
Body: {"name":"string (optional)"}
Response: { success, data: { key, id, ... } }
curl -X POST "https://bkbharatai.blutec.ai/api/api-keys" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"My Key"}'/api/api-keys/:idDelete API key
UI: API Access page → Delete key
Response: { success }
curl -X DELETE "https://bkbharatai.blutec.ai/api/api-keys/KEY_ID" \
-H "Authorization: Bearer YOUR_TOKEN"Phone Numbers
List, create, assign/detach to agents. Used for outbound/inbound caller ID.
Used in UI: Agent detail (from number), Bulk Campaigns (from number). Phone Numbers page if enabled.
/api/phone-numbersList my numbers
UI: Bulk Campaigns → From number dropdown; Agent config (from number)
Response: { success, data: { phoneNumbers[] } }
curl -X GET "https://bkbharatai.blutec.ai/api/phone-numbers" \
-H "Authorization: Bearer be_your_api_key"/api/phone-numbers/upstreamList upstream (provider) numbers
UI: Phone Numbers page → upstream list (if used)
Query: "pageno, pagesize"
Response: { success, data: { upstreamPhoneNumbers[] } }
curl -X GET "https://bkbharatai.blutec.ai/api/phone-numbers/upstream?pageno=1&pagesize=20" \
-H "Authorization: Bearer YOUR_TOKEN"/api/phone-numbersCreate / add number
UI: Phone Numbers page → add number
Body: "number, country_code, provider, label, external_id (optional)"
Response: { success, data: { phoneNumber } }
curl -X POST "https://bkbharatai.blutec.ai/api/phone-numbers" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"number":"+15551234567","country_code":"+1","provider":"blutec"}'/api/phone-numbers/from-upstreamAdd from upstream provider
UI: Phone Numbers page → import from provider
Body: {"phone_number_id":"number","phone_number":"string","label":"optional"}
Response: { success, data: { phoneNumber } }
curl -X POST "https://bkbharatai.blutec.ai/api/phone-numbers/from-upstream" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"phone_number_id":123,"phone_number":"+15551234567"}'/api/phone-numbers/import-twilioImport Twilio number via OmniDimension
UI: Phone Numbers page → Import from Twilio
Body: "phone_number, account_sid, account_token, name (optional)"
Response: { success, data: { phoneNumber } }
curl -X POST "https://bkbharatai.blutec.ai/api/phone-numbers/import-twilio" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"phone_number":"+15551234567","account_sid":"AC...","account_token":"...","name":"Support Line"}'/api/phone-numbers/import-sipImport SIP trunk via OmniDimension
UI: Phone Numbers page → Import SIP trunk
Body: "phone_number, sip_host, sip_trunk_name, name, sip_port, sip_username, sip_password, sip_dial_prefix, sip_strip_plus (optional)"
Response: { success, data: { phoneNumber } }
curl -X POST "https://bkbharatai.blutec.ai/api/phone-numbers/import-sip" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"phone_number":"+15551234567","sip_host":"sip.provider.com","sip_trunk_name":"my-trunk","sip_port":5060}'/api/phone-numbers/:id/assignAssign number to agent
UI: Phone Numbers page → assign to agent
Body: {"agent_id":"string"}
Response: { success }
curl -X POST "https://bkbharatai.blutec.ai/api/phone-numbers/PN_ID/assign" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"agent_id":"AGENT_ID"}'/api/phone-numbers/:id/detachDetach number from agent
UI: Phone Numbers page → detach
Response: { success }
curl -X POST "https://bkbharatai.blutec.ai/api/phone-numbers/PN_ID/detach" \
-H "Authorization: Bearer YOUR_TOKEN"/api/phone-numbers/:idRemove number
UI: Phone Numbers page → delete
Response: { success }
curl -X DELETE "https://bkbharatai.blutec.ai/api/phone-numbers/PN_ID" \
-H "Authorization: Bearer YOUR_TOKEN"Providers (Voices, STT, TTS)
List voices, STT and TTS providers. Used by Agent config (voice, transcriber) and modals.
Used in UI: Agent detail → Call Config (voice, STT); Voice/LLM/STT modals.
/api/providers/voicesList voices
UI: Voice modal → voice list (with pagination/filters)
Query: "provider, language, page, page_size, ..."
Response: { success, data: { voices[] } }
curl -X GET "https://bkbharatai.blutec.ai/api/providers/voices?provider=eleven_labs" \
-H "Authorization: Bearer YOUR_TOKEN"/api/providers/voice/:idGet voice
UI: Voice modal → single voice detail
Response: { success, data: { voice } }
curl -X GET "https://bkbharatai.blutec.ai/api/providers/voice/VOICE_ID" \
-H "Authorization: Bearer YOUR_TOKEN"/api/providers/sttList STT providers
UI: STT modal → provider list
Response: { success, data: { providers[] } }
curl -X GET "https://bkbharatai.blutec.ai/api/providers/stt" \
-H "Authorization: Bearer YOUR_TOKEN"/api/providers/ttsList TTS providers
UI: TTS / Voice modal → provider list
Response: { success, data }
curl -X GET "https://bkbharatai.blutec.ai/api/providers/tts" \
-H "Authorization: Bearer YOUR_TOKEN"/api/providers/allAll providers (STT + TTS + models)
UI: LLM/STT modals → combined list
Response: { success, data }
curl -X GET "https://bkbharatai.blutec.ai/api/providers/all" \
-H "Authorization: Bearer YOUR_TOKEN"Analytics
Summary metrics for calls and usage.
Used in UI: Dashboard → Analytics page.
/api/analytics/summaryAnalytics summary
UI: Analytics page
Response: { success, data: { summary } }
curl -X GET "https://bkbharatai.blutec.ai/api/analytics/summary" \
-H "Authorization: Bearer YOUR_TOKEN"Demo (Public)
Landing page "Try Echo" — trigger a call without auth.
Used in UI: Landing page → Try Echo form.
/api/demo/status(no auth)Demo available
UI: Landing → check if demo is enabled
Response: { success, data: { available } }
curl -X GET "https://bkbharatai.blutec.ai/api/demo/status"/api/demo/dispatch(no auth)Trigger demo call
UI: Landing → Try Echo → submit phone number
Body: {"to_number":"string","country_code":"string (optional)","industry":"string (optional industry slug; omit to use master agent)"}
Response: { success, data }
curl -X POST "https://bkbharatai.blutec.ai/api/demo/dispatch" \
-H "Content-Type: application/json" \
-d '{"to_number":"15551234567","country_code":"1"}'Admin
User management, master agent, limits. Requires is_admin.
Used in UI: Dashboard (admin) → Admin, Users.
/api/admin/overviewAdmin overview
UI: Admin dashboard
Response: { success, data }
curl -X GET "https://bkbharatai.blutec.ai/api/admin/overview" \
-H "Authorization: Bearer YOUR_TOKEN"/api/admin/usersList users
UI: Admin → Users list
Response: { success, data: { users[] } }
curl -X GET "https://bkbharatai.blutec.ai/api/admin/users" \
-H "Authorization: Bearer YOUR_TOKEN"/api/admin/users/:userIdGet user
UI: Admin → User detail
Response: { success, data: { user } }
curl -X GET "https://bkbharatai.blutec.ai/api/admin/users/USER_ID" \
-H "Authorization: Bearer YOUR_TOKEN"/api/admin/usersCreate user
UI: Admin → Create user
Body: "email, password, name, ..."
Response: { success, data: { user } }
curl -X POST "https://bkbharatai.blutec.ai/api/admin/users" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"email":"u@example.com","password":"pass","name":"User"}'/api/admin/users/:userIdUpdate user
UI: Admin → Edit user
Body: "Partial user object"
Response: { success }
curl -X PUT "https://bkbharatai.blutec.ai/api/admin/users/USER_ID" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"New Name"}'/api/admin/users/:userIdDelete user
UI: Admin → Delete user
Response: { success }
curl -X DELETE "https://bkbharatai.blutec.ai/api/admin/users/USER_ID" \
-H "Authorization: Bearer YOUR_TOKEN"/api/admin/master-agentGet master agent
UI: Dashboard → Set Master Agent
Response: { success, data: { master_agent_id } }
curl -X GET "https://bkbharatai.blutec.ai/api/admin/master-agent" \
-H "Authorization: Bearer YOUR_TOKEN"/api/admin/master-agentSet master agent
UI: Dashboard → Set Master Agent link
Body: {"master_agent_id":"string"}
Response: { success }
curl -X PUT "https://bkbharatai.blutec.ai/api/admin/master-agent" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"master_agent_id":"AGENT_ID"}'/api/admin/demo-industry-agentsGet industry demo agent mappings
UI: Admin → Industry demo agents
Response: { success, data: { mappings } }
curl -X GET "https://bkbharatai.blutec.ai/api/admin/demo-industry-agents" \
-H "Authorization: Bearer YOUR_TOKEN"/api/admin/demo-industry-agentsSet industry demo agent mappings
UI: Admin → Industry demo agents
Body: {"mappings":"{ [industrySlug]: agentId }"}
Response: { success, data: { mappings } }
curl -X PUT "https://bkbharatai.blutec.ai/api/admin/demo-industry-agents" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"mappings":{"healthcare":"AGENT_ID"}}'/api/admin/users/:userId/limitsGet user limits
UI: Admin → User limits
Response: { success, data: { limits } }
curl -X GET "https://bkbharatai.blutec.ai/api/admin/users/USER_ID/limits" \
-H "Authorization: Bearer YOUR_TOKEN"/api/admin/users/:userId/limitsUpdate user limits
UI: Admin → Edit user limits
Body: "maxAgents, etc."
Response: { success }
curl -X PUT "https://bkbharatai.blutec.ai/api/admin/users/USER_ID/limits" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"maxAgents":5}'/api/admin/agentsList all agents (admin)
UI: Admin → agents overview
Response: { success, data: { agents[] } }
curl -X GET "https://bkbharatai.blutec.ai/api/admin/agents" \
-H "Authorization: Bearer YOUR_TOKEN"Voice Sessions
Create a short-lived voice session (server-side). The client then connects to the returned ws_url using the OmniDim web SDK or the raw WebSocket protocol. API keys never leave the server. See also realtime streaming and errors guidance.
Used in UI: Agent detail → Deploy → Web voice session.
/api/sessions/createCreate voice session
UI: Agent → Deploy → Web voice session → Start session
Body: {"agent_id":"string|number (required)","type":"voice","custom_variables":"object (optional)"}
Response: { success, data: { session: { session_id, token, expires_at, ws_url } } }
curl -X POST "https://bkbharatai.blutec.ai/api/sessions/create" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"agent_id":158910,"type":"voice","custom_variables":{"name":"Demo User"}}'Simulations
Scenario-based agent testing: list, create, get, update, delete, start, stop, and enhance prompt. Proxies OmniDimension /simulations APIs.
Used in UI: Dashboard → Simulations.
/api/simulationsList simulations
UI: Simulations page list
Query: {"pageno":"number","pagesize":"number (max 150)"}
Response: { success, data: { records[], total_records } }
curl -X GET "https://bkbharatai.blutec.ai/api/simulations?pageno=1&pagesize=10" \
-H "Authorization: Bearer YOUR_TOKEN"/api/simulationsCreate simulation
UI: Simulations → New simulation
Body: {"name":"string","agent_id":"number","number_of_call_to_make":"1-3","concurrent_call_count":"1-3","max_call_duration_in_minutes":"1-10","scenarios":"[{ name, description, expected_result, selected_voices[] }]"}
Response: { success, data: { simulation } }
curl -X POST "https://bkbharatai.blutec.ai/api/simulations" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"My Simulation","agent_id":158910,"scenarios":[{"name":"Polite cancellation","description":"Ask to cancel, be friendly.","expected_result":"Agent routes to retention.","selected_voices":[{"provider":"eleven_labs"}]}]}'/api/simulations/:idGet simulation
UI: Simulations → Details panel
Response: { success, data: { simulation } }
curl -X GET "https://bkbharatai.blutec.ai/api/simulations/456" \
-H "Authorization: Bearer YOUR_TOKEN"/api/simulations/:idUpdate simulation
UI: Simulations → Details → Save
Body: "name, agent_id, number_of_call_to_make, concurrent_call_count, max_call_duration_in_minutes, scenarios[]"
Response: { success, data: { simulation } }
curl -X PUT "https://bkbharatai.blutec.ai/api/simulations/456" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name":"Updated Simulation","max_call_duration_in_minutes":5}'/api/simulations/:idDelete simulation
UI: Simulations → Delete
Response: { success }
curl -X DELETE "https://bkbharatai.blutec.ai/api/simulations/456" \
-H "Authorization: Bearer YOUR_TOKEN"/api/simulations/:id/startStart simulation
UI: Simulations → Start
Body: {"scenarios":"optional array to update before start"}
Response: { success, data }
curl -X POST "https://bkbharatai.blutec.ai/api/simulations/456/start" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'/api/simulations/:id/stopStop simulation
UI: Simulations → Stop
Response: { success, data }
curl -X POST "https://bkbharatai.blutec.ai/api/simulations/456/stop" \
-H "Authorization: Bearer YOUR_TOKEN"/api/simulations/:id/enhance-promptEnhance prompt from simulation results
UI: Simulations → Enhance prompt
Response: { success, data: { previous_context[], prompt_breakdown[] } }
curl -X POST "https://bkbharatai.blutec.ai/api/simulations/456/enhance-prompt" \
-H "Authorization: Bearer YOUR_TOKEN"Realtime & Errors
Realtime voice streaming is handled inside calls/sessions. For campaign progress, poll live-status. Upstream errors use { error, error_description }; call endpoints may use { success: false, plan_expire }. Retry 429/5xx with backoff; do not blind-retry dispatch.
Used in UI: Bulk Campaigns live progress; Session voice modal; API error handling.
/api/calls/bulk/:bulkId/live-statusBulk campaign live status
UI: Bulk Campaigns → poll while running
Response: { success, data: { campaign_status, summary{ total_contacts, queued, in_progress, completed, failed, ... } } }
curl -X GET "https://bkbharatai.blutec.ai/api/calls/bulk/BULK_ID/live-status" \
-H "Authorization: Bearer YOUR_TOKEN"Next steps
Start with Getting Started, then explore individual API pages for deeper configuration options.