Vexar API

Chatbot Settings

Configure the chatbot per site: AI provider/model, widget appearance, behavior, lead collection, operator routing and the Data API. Some fields are plan-gated and return 403 if not available. Authentication required.

GET /api/v1/sites/{id}/chatbot Auth

Get the full chatbot configuration object.

Response
{ "success": true, "config": { "bot_name": "Assistant", "ai_provider": "deepseek", "ai_model": "deepseek-chat", … } }
PUT /api/v1/sites/{id}/chatbot Auth

Update settings. Send any subset of the allowed fields (a selection is listed below).

Request body
{
  "bot_name": "Assistant",
  "welcome_message": "Hi! How can I help?",
  "ai_provider": "openai",
  "ai_model": "gpt-4o-mini",
  "system_prompt": "You are a helpful assistant…",
  "behavior_preset": "sales",
  "collect_data": "both",
  "operator_enabled": true,
  "data_api_enabled": false
}
Response
{ "success": true, "config": { … } }
GET /api/v1/sites/{id}/widget-code Auth

Get the HTML snippet to embed the widget.

Response
{ "success": true, "code": "<script src=\"https://vexar.chat/widget/chatbot.js\" data-key=\"sk_…\" async></script>", "site_key": "sk_…" }
GET /api/v1/ai-providers Auth

List AI providers and models, marking which are allowed on your plan and which are configured server-side.

Response
{ "success": true, "providers": [ { "id": "openai", "name": "OpenAI", "allowed": true, "models": [ { "id": "gpt-4o-mini", "allowed": true } ] } ], "crawl_providers": [ … ] }

Common fields

ParamDescription
bot_name, bot_avatar_url, welcome_messageBot identity
primary_color, position, button_style, header_colorWidget appearance
ai_provider, ai_modelAI provider/model (validated against plan)
system_prompt, custom_instructionsCustom prompt (plan-gated)
behavior_preset, behavior_tone, behavior_goalsPersonality & behavior
collect_email, collect_data, lead_when, lead_strategyLead collection
operator_enabled, operator_timeout, operator_routingOperator routing (plan-gated)
response_languageauto | ru | en | uk | de | fr | es | pl
data_api_enabled, data_api_url, data_api_key, data_api_timeoutData API / function calling (plan-gated) — see Data API