REST API
REST API v1 al ChatReact vă oferă acces programatic la operațiunile acceptate din panou: chatbots, baza de cunoștințe și crawling, prețuri structurate, FAQ-uri, revizuirea chat-urilor și Improvement Agent, lead-uri, formulare de contact, live chat, companie și echipă, Email Assistant, analytics și notificări. Acțiunile care necesită browser (plăți, autorizare căsuță poștală, passkeys, ștergerea contului și gestionarea cheilor API) rămân în panou.
Preferați să discutați cu un asistent AI? Aceleași capabilități sunt disponibile ca instrumente MCP — vedeți MCP Server Integration. API Explorer interactiv cu schemele cerere și răspuns se găsește la /api-reference, unde puteți descărca și specificația OpenAPI 3.0.
Autentificare
- Mergeți la Tablou de bord → Companie → fila API și faceți clic pe Creați cheie API
- Alegeți un nume și scope-urile de permisiuni de care are nevoie cheia (vezi mai jos)
- Copiați cheia — începe cu
cr_și este afișată o singură dată
Trimiteți cheia cu fiecare cerere:
curl https://www.chatreact.ai/api/v1/chatbots \
-H "Authorization: Bearer cr_your_api_key"
Un header X-API-Key: cr_your_api_key este acceptat de asemenea. Cheile API aparțin unei singure companii și execută cu permisiunile proprietarului companiei; limitele planului și gate-urile de funcționalitate se aplică exact ca în panou.
Accesul API este disponibil în planurile plătite — vedeți Pricing page. Cheile pot fi revocate în orice moment din panou.
Scope-uri
Fiecare cheie poartă unul sau mai multe scope-uri. Un endpoint returnează 403 atunci când cheia nu are scope-ul necesar.
| Scope | Grants |
|---|---|
chatbots:read / chatbots:write | Configurare chatbot: persona, limbi, widget, comportament, restricții, instrucțiuni de bază, cod embed, faza de învățare, șabloane chatbot, setări widget FAQ |
knowledge:read / knowledge:write | Baza de cunoștințe: documente, crawling site-uri, pagini crawl-uite |
faqs:read / faqs:write | FAQ-uri, categorii FAQ, sugestii, traduceri |
chats:read / chats:write | Istoric chat, evaluări chat, categorii de încredere, live chat (acțiunile agentului necesită chats:write) |
leads:read / leads:write | Lead-uri, categorii lead, setări captare lead, export |
forms:read / forms:write | Formulare de contact și trimitere |
analytics:read | Statisticile, serii de activitate, funnel-uri, status de încredere |
company:read / company:write | Profilul și setările companiei, membri ai echipei, invitații |
email:read / email:write | Conexiuni Email Assistant, categorii, contacte, activitate |
prices:read | Citire intrări de preț structurat, revizii, eligibilitate și sugestii |
prices:write | Creare și editare drafturi de preț, import CSV și aplicare a unei sugestii ca draft; necesită proprietarul companiei |
prices:approve | Aprobare versiuni exacte sau arhivare intrări; necesită proprietarul companiei |
blog:read / blog:write | Conținut blog platformă (ChatReact intern) |
| any valid key | /v1/me, utilizarea contului, notificările dvs. |
Convenții
- Base URL:
https://www.chatreact.ai/api/v1, JSON la intrare și ieșire (Content-Type: application/json). - Răspunsuri:
{ "success": true, "data": … }; listele adaugă"pagination": { "total", "page", "pageSize", "totalPages" }. FolosițipageșipageSize(max 100) la endpoint-urile de listare; unele endpoint-uri oferă paginare cursor (cursor/nextCursor). - Erori:
{ "success": false, "error": "message", "code": "BAD_REQUEST" }cu opționaldetailspentru erori de validare. Coduri de stare:400input invalid,401cheie lipsă sau invalidă,403scope lipsă, funcționalitate de plan neincluse sau rol insuficient,404resursă negăsită (inclusiv pentru resurse ale altor companii),409conflict,429depășire rată limită. - Actualizări parțiale: Endpoint-urile
PATCHschimbă doar câmpurile pe care le trimiteți; câmpurile necunoscute sunt respinse. - Limită de rată: 30 de cereri pe minut per adresă IP.
- Operațiuni de durată lungă (crawls, generare AI, traduceri) răspund rapid cu un job sau rezultat pe care îl puteți interoga; acestea consumă token-ul și bugetul de crawl al planului dvs.
Endpoints
Prices & services
Salvarea, editarea, importul și aplicarea unei sugestii creează drafturi fără aprobare. Operațiunile de aprobare și arhivare revizuiesc versiuni exacte; o versiune învechită returnează conflict. Cheile existente nu primesc automat permisiuni pentru prețuri. Doar proprietarul companiei poate acorda permisiuni de scriere sau aprobare. Pentru fluxul de lucru al clientului, vedeți Prices & services.
| Method | Path | Description | Scope |
|---|---|---|---|
GET | /api/v1/chatbots/{id}/prices | List price entries and eligibility | prices:read |
POST | /api/v1/chatbots/{id}/prices | Create a draft | prices:write |
GET | /api/v1/chatbots/{id}/prices/{itemId} | Read details and paginated history | prices:read |
PATCH | /api/v1/chatbots/{id}/prices/{itemId} | Create an edited draft from an expected version | prices:write |
GET | /api/v1/chatbots/{id}/prices/{itemId}/state | Read full item state | prices:read |
POST | /api/v1/chatbots/{id}/prices/{itemId}/approve | Approve an exact version | prices:approve |
POST | /api/v1/chatbots/{id}/prices/{itemId}/archive | Archive an exact version | prices:approve |
POST | /api/v1/chatbots/{id}/prices/approve-many | Approve an explicit version selection atomically | prices:approve |
POST | /api/v1/chatbots/{id}/prices/import | Import CSV drafts with a stable import ID | prices:write |
GET | /api/v1/chatbots/{id}/prices/suggestions | List price suggestions | prices:read |
POST | /api/v1/chatbots/{id}/prices/suggestions/{suggestionId}/apply | Apply a selected suggestion as a draft | prices:write |
Chatbots
| Method | Path | Description | Scope |
|---|---|---|---|
GET | /api/v1/chatbots | List chatbots | chatbots:read |
POST | /api/v1/chatbots | Create chatbot | chatbots:write |
GET | /api/v1/chatbots/{id} | Get chatbot | chatbots:read |
PATCH | /api/v1/chatbots/{id} | Update chatbot | chatbots:write |
DELETE | /api/v1/chatbots/{id} | Delete chatbot | chatbots:write |
GET | /api/v1/chatbots/{id}/personality | Get chatbot personality | chatbots:read |
PATCH | /api/v1/chatbots/{id}/personality | Update chatbot personality | chatbots:write |
GET | /api/v1/chatbots/{id}/widget | Get widget settings | chatbots:read |
PATCH | /api/v1/chatbots/{id}/widget | Update widget settings | chatbots:write |
GET | /api/v1/chatbots/{id}/widget/translations | Get widget translations | chatbots:read |
PUT | /api/v1/chatbots/{id}/widget/translations | Replace widget translations | chatbots:write |
GET | /api/v1/chatbots/{id}/embed | Get embed code | chatbots:read |
POST | /api/v1/chatbots/{id}/embed/confirm | Confirm embed | chatbots:write |
GET | /api/v1/chatbots/{id}/learning-phase | Get learning-phase settings | chatbots:read |
PATCH | /api/v1/chatbots/{id}/learning-phase | Update learning-phase settings | chatbots:write |
POST | /api/v1/chatbots/{id}/learning-phase/end | End learning phase | chatbots:write |
GET | /api/v1/chatbots/{id}/instructions | List core instructions | chatbots:read |
POST | /api/v1/chatbots/{id}/instructions | Add core instruction | chatbots:write |
PUT | /api/v1/chatbots/{id}/instructions/reorder | Reorder core instructions | chatbots:write |
POST | /api/v1/chatbots/{id}/instructions/improve | Improve instructions with AI | chatbots:write |
GET | /api/v1/instructions/{id} | Get core instruction | chatbots:read |
PATCH | /api/v1/instructions/{id} | Update core instruction | chatbots:write |
DELETE | /api/v1/instructions/{id} | Delete core instruction | chatbots:write |
GET | /api/v1/chatbot-templates | List chatbot templates | chatbots:read |
Knowledge base
| Method | Path | Description | Scope |
|---|---|---|---|
GET | /api/v1/chatbots/{id}/knowledge | Knowledge base overview | knowledge:read |
GET | /api/v1/chatbots/{id}/documents | List documents for chatbot | knowledge:read |
POST | /api/v1/chatbots/{id}/documents | Upload document | knowledge:write |
POST | /api/v1/chatbots/{id}/documents/presign | Presign document upload | knowledge:write |
GET | /api/v1/documents/{id} | Get document | knowledge:read |
DELETE | /api/v1/documents/{id} | Delete document | knowledge:write |
POST | /api/v1/documents/{id}/confirm | Confirm presigned upload | knowledge:write |
GET | /api/v1/chatbots/{id}/crawl/limits | Crawl limits | knowledge:read |
POST | /api/v1/chatbots/{id}/crawl/preview | Preview scan website | knowledge:write |
GET | /api/v1/chatbots/{id}/crawl | List crawl jobs | knowledge:read |
POST | /api/v1/chatbots/{id}/crawl | Start crawl | knowledge:write |
GET | /api/v1/crawl-jobs/{jobId} | Get crawl job | knowledge:read |
POST | /api/v1/crawl-jobs/{jobId}/cancel | Cancel crawl job | knowledge:write |
GET | /api/v1/chatbots/{id}/pages | List crawled pages | knowledge:read |
POST | /api/v1/chatbots/{id}/pages | Add single URL | knowledge:write |
POST | /api/v1/chatbots/{id}/pages/bulk-delete | Bulk-delete crawled pages | knowledge:write |
GET | /api/v1/pages/{id} | Get crawled page | knowledge:read |
DELETE | /api/v1/pages/{id} | Delete crawled page | knowledge:write |
POST | /api/v1/pages/{id}/recrawl | Re-crawl page | knowledge:write |
GET | /api/v1/chatbots/{id}/websites | List crawled websites | knowledge:read |
DELETE | /api/v1/chatbots/{id}/websites/{domain} | Delete website | knowledge:write |
POST | /api/v1/chatbots/{id}/websites/{domain}/recrawl | Re-crawl website | knowledge:write |
POST | /api/v1/chatbots/{id}/websites/{domain}/recrawl/cancel | Cancel website re-crawl | knowledge:write |
FAQs
| Method | Path | Description | Scope |
|---|---|---|---|
GET | /api/v1/chatbots/{id}/faqs | List FAQs for chatbot | faqs:read |
POST | /api/v1/chatbots/{id}/faqs | Create FAQ | faqs:write |
POST | /api/v1/chatbots/{id}/faqs/bulk | Bulk import FAQs | faqs:write |
POST | /api/v1/chatbots/{id}/faqs/reorder | Reorder FAQs | faqs:write |
GET | /api/v1/chatbots/{id}/faqs/embed | Get FAQ widget embed code | chatbots:read |
POST | /api/v1/chatbots/{id}/faqs/purge-cache | Purge remote FAQ caches | faqs:write |
GET | /api/v1/faqs/{id} | Get FAQ | faqs:read |
PATCH | /api/v1/faqs/{id} | Update FAQ | faqs:write |
DELETE | /api/v1/faqs/{id} | Delete FAQ | faqs:write |
PUT | /api/v1/faqs/{id}/translations | Update FAQ translations | faqs:write |
POST | /api/v1/faqs/{id}/translate | AI-translate FAQ | faqs:write |
GET | /api/v1/chatbots/{id}/faq-suggestions | List FAQ suggestions | faqs:read |
POST | /api/v1/chatbots/{id}/faq-suggestions/generate | Generate FAQ suggestions from knowledge base | faqs:write |
GET | /api/v1/faq-suggestions/{id} | Get FAQ suggestion | faqs:read |
POST | /api/v1/faq-suggestions/{id}/approve | Approve FAQ suggestion | faqs:write |
POST | /api/v1/faq-suggestions/{id}/reject | Reject FAQ suggestion | faqs:write |
GET | /api/v1/chatbots/{id}/faq-categories | List FAQ categories | faqs:read |
POST | /api/v1/chatbots/{id}/faq-categories | Create FAQ category | faqs:write |
POST | /api/v1/chatbots/{id}/faq-categories/reorder | Reorder FAQ categories | faqs:write |
GET | /api/v1/faq-categories/{id} | Get FAQ category | faqs:read |
PATCH | /api/v1/faq-categories/{id} | Update FAQ category | faqs:write |
DELETE | /api/v1/faq-categories/{id} | Delete FAQ category | faqs:write |
PUT | /api/v1/faq-categories/{id}/translations | Update FAQ category translations | faqs:write |
GET | /api/v1/chatbots/{id}/faq-widget-settings | Get FAQ widget settings | chatbots:read |
PATCH | /api/v1/chatbots/{id}/faq-widget-settings | Update FAQ widget settings | chatbots:write |
Chats, feedback & Improvement Agent
| Method | Path | Description | Scope |
|---|---|---|---|
GET | /api/v1/chats | List chat sessions | chats:read |
GET | /api/v1/chats/{sessionId} | Get chat session | chats:read |
PATCH | /api/v1/chats/{sessionId} | Set chat confidence category | chats:write |
POST | /api/v1/chats/{sessionId}/feedback | Rate chat (Good / Needs Work) | chats:write |
POST | /api/v1/chats/{sessionId}/feedback/dismiss | Dismiss chat review | chats:write |
POST | /api/v1/chats/{sessionId}/improve | Start Improvement Agent for chat | chatbots:write |
GET | /api/v1/chatbots/{id}/feedback | List chat reviews of a chatbot | chats:read |
GET | /api/v1/chatbots/{id}/feedback/stats | Chat review stat cards | chats:read |
GET | /api/v1/feedback/{id} | Get chat review | chats:read |
PATCH | /api/v1/feedback/{id} | Override review severity | chats:write |
POST | /api/v1/feedback/{id}/improvement-session | Start Improvement Agent for review | chatbots:write |
GET | /api/v1/chatbots/{id}/confidence | Get confidence status | analytics:read |
GET | /api/v1/chatbots/{id}/confidence-categories | List confidence categories | chats:read |
POST | /api/v1/chatbots/{id}/confidence-categories | Create confidence category | chatbots:write |
PATCH | /api/v1/confidence-categories/{id} | Update confidence category | chatbots:write |
DELETE | /api/v1/confidence-categories/{id} | Delete confidence category | chatbots:write |
POST | /api/v1/confidence-categories/{id}/merge | Merge confidence categories | chatbots:write |
GET | /api/v1/chatbots/{id}/improvement-sessions | List improvement sessions | chatbots:read |
GET | /api/v1/improvement-sessions/{id} | Get improvement session | chatbots:read |
POST | /api/v1/improvement-sessions/{id}/messages | Send message to Improvement Agent | chatbots:write |
POST | /api/v1/improvement-sessions/{id}/complete | Complete improvement session | chatbots:write |
POST | /api/v1/improvement-sessions/{id}/reset | Reset improvement session | chatbots:write |
POST | /api/v1/improvement-proposals/{id}/apply | Apply improvement proposal | chatbots:write |
POST | /api/v1/improvement-proposals/{id}/reject | Reject improvement proposal | chatbots:write |
POST | /api/v1/improvement-proposals/{id}/simulations | Simulate improvement proposal | chatbots:write |
POST | /api/v1/improvement-simulations/{id}/assessment | Rate simulation result | chatbots:write |
Leads
| Method | Path | Description | Scope |
|---|---|---|---|
GET | /api/v1/leads | List leads | leads:read |
POST | /api/v1/leads | Create lead | leads:write |
GET | /api/v1/leads/{id} | Get lead | leads:read |
PATCH | /api/v1/leads/{id} | Update lead | leads:write |
DELETE | /api/v1/leads/{id} | Delete lead | leads:write |
POST | /api/v1/leads/{id}/assign | Assign lead | leads:write |
POST | /api/v1/leads/bulk-status | Bulk update lead status | leads:write |
GET | /api/v1/leads/stats | Lead statistics | leads:read |
GET | /api/v1/leads/export | Export leads | leads:read |
GET | /api/v1/chatbots/{id}/lead-config | Get lead capture configuration | leads:read |
PUT | /api/v1/chatbots/{id}/lead-config | Update lead capture configuration | leads:write |
GET | /api/v1/chatbots/{id}/lead-categories | List lead categories | leads:read |
POST | /api/v1/chatbots/{id}/lead-categories | Create lead category | leads:write |
GET | /api/v1/lead-categories/{id} | Get lead category | leads:read |
PATCH | /api/v1/lead-categories/{id} | Update lead category | leads:write |
DELETE | /api/v1/lead-categories/{id} | Delete lead category | leads:write |
PUT | /api/v1/lead-categories/{id}/users/{userId} | Assign member to lead category | leads:write |
DELETE | /api/v1/lead-categories/{id}/users/{userId} | Remove member from lead category | leads:write |
Contact forms
| Method | Path | Description | Scope |
|---|---|---|---|
GET | /api/v1/chatbots/{id}/forms | List contact forms | forms:read |
POST | /api/v1/chatbots/{id}/forms | Create contact form | forms:write |
GET | /api/v1/forms/{id} | Get contact form | forms:read |
PATCH | /api/v1/forms/{id} | Update contact form | forms:write |
DELETE | /api/v1/forms/{id} | Delete contact form | forms:write |
GET | /api/v1/forms/{id}/submissions | List form submissions | forms:read |
GET | /api/v1/forms/{id}/stats | Form submission statistics | forms:read |
GET | /api/v1/submissions/{id} | Get form submission | forms:read |
PATCH | /api/v1/submissions/{id} | Review form submission | forms:write |
DELETE | /api/v1/submissions/{id} | Delete form submission | forms:write |
Live chat
| Method | Path | Description | Scope |
|---|---|---|---|
GET | /api/v1/live-chat/availability | Get own live chat availability | chats:read |
PUT | /api/v1/live-chat/availability | Set own live chat availability | chats:write |
POST | /api/v1/live-chat/heartbeat | Send presence heartbeat | chats:write |
GET | /api/v1/live-chat/agents | List available live chat agents | chats:read |
GET | /api/v1/live-chat/sessions | List live chat sessions | chats:read |
GET | /api/v1/live-chat/sessions/{sessionId} | Get live chat session | chats:read |
POST | /api/v1/live-chat/sessions/{sessionId}/assign | Take live chat (assign to key owner) | chats:write |
POST | /api/v1/live-chat/sessions/{sessionId}/messages | Send message as agent | chats:write |
POST | /api/v1/live-chat/sessions/{sessionId}/close | End live chat | chats:write |
Analytics
| Method | Path | Description | Scope |
|---|---|---|---|
GET | /api/v1/analytics | Get analytics overview | analytics:read |
GET | /api/v1/analytics/activity | Get chat activity series | analytics:read |
GET | /api/v1/analytics/chatbots | List per-chatbot performance stats | analytics:read |
GET | /api/v1/analytics/chatbots/{id} | Get chatbot analytics | analytics:read |
GET | /api/v1/analytics/leads | Get lead funnel | analytics:read |
GET | /api/v1/analytics/forms | Get form submission stats | analytics:read |
GET | /api/v1/activity | Get attention summary | analytics:read |
Company & team
| Method | Path | Description | Scope |
|---|---|---|---|
GET | /api/v1/company | Get company | any key |
PATCH | /api/v1/company | Update company | company:write |
GET | /api/v1/company/settings | Get company settings | company:read |
PATCH | /api/v1/company/settings | Update company settings | company:write |
DELETE | /api/v1/company/logo | Remove company logo | company:write |
GET | /api/v1/company/members | List team members | company:read |
PATCH | /api/v1/company/members/{userId} | Change member role | company:write |
DELETE | /api/v1/company/members/{userId} | Remove team member | company:write |
GET | /api/v1/company/invites | List invitations | company:read |
POST | /api/v1/company/invites | Invite team member | company:write |
DELETE | /api/v1/company/invites/{id} | Cancel invitation | company:write |
POST | /api/v1/company/invites/{id}/resend | Resend invitation | company:write |
Email Assistant
| Method | Path | Description | Scope |
|---|---|---|---|
GET | /api/v1/email/connections | List mailbox connections | email:read |
GET | /api/v1/email/connections/{id} | Get mailbox connection | email:read |
PATCH | /api/v1/email/connections/{id} | Update mailbox connection | email:write |
DELETE | /api/v1/email/connections/{id} | Disconnect mailbox | email:write |
GET | /api/v1/email/connections/{id}/categories | List email categories | email:read |
POST | /api/v1/email/connections/{id}/categories | Create email category | email:write |
GET | /api/v1/email/connections/{id}/folders | List mail folders | email:read |
POST | /api/v1/email/connections/{id}/folders | Create mail folder | email:write |
GET | /api/v1/email/connections/{id}/activity | List email activity log | email:read |
GET | /api/v1/email/categories/{id} | Get email category | email:read |
PATCH | /api/v1/email/categories/{id} | Update email category | email:write |
DELETE | /api/v1/email/categories/{id} | Delete email category | email:write |
GET | /api/v1/email/contacts | List email contacts | email:read |
GET | /api/v1/email/contacts/{id} | Get email contact | email:read |
PATCH | /api/v1/email/contacts/{id} | Update email contact | email:write |
DELETE | /api/v1/email/contacts/{id} | Delete email contact | email:write |
Account & notifications
| Method | Path | Description | Scope |
|---|---|---|---|
GET | /api/v1/me | Get key context (whoami) | any key |
GET | /api/v1/account/usage | Get plan and usage | any key |
GET | /api/v1/notifications | List notifications | any key |
DELETE | /api/v1/notifications | Delete old read notifications | any key |
GET | /api/v1/notifications/unread-count | Get unread notification count | any key |
POST | /api/v1/notifications/mark-all-read | Mark all notifications as read | any key |
GET | /api/v1/notifications/{id} | Get notification | any key |
PATCH | /api/v1/notifications/{id} | Mark notification as read | any key |
Blog (platform)
| Method | Path | Description | Scope |
|---|---|---|---|
GET | /api/v1/blog | List blog posts | any key |
POST | /api/v1/blog | Create blog post | any key |
POST | /api/v1/blog/assets | Upload blog asset | any key |
GET | /api/v1/blog/{id} | Get blog post | any key |
PATCH | /api/v1/blog/{id} | Update blog post | any key |
DELETE | /api/v1/blog/{id} | Delete blog post | any key |
POST | /api/v1/blog/{id}/translations | Queue blog translations | any key |
Aveți nevoie de ajutor? Contactați echipa noastră de suport →