REST API
ChatReact REST API v1 giver Dem programmatisk adgang til understøttede dashboard-operationer: chatbots, knowledge base og crawling, strukturerede priser, FAQs, chatgennemgang og Improvement Agent, leads, kontaktformularer, live chat, virksomhed og team, Email Assistant, analytics og notifikationer. Browser-bundne handlinger (betalinger, mailbox-godkendelse, passkeys, sletning af konto og API-nøgleadministration) forbliver i dashboardet.
Foretrækker De at tale med en AI-assistent? De samme funktioner er tilgængelige som MCP-værktøjer — se MCP Server Integration. Den interaktive API Explorer med request- og response-skemaer findes på /api-reference, hvor De også kan downloade OpenAPI 3.0-specifikationen.
Authentication
- Gå til Dashboard → Virksomhed → API fanen og klik Opret API-nøgle
- Vælg et navn og de tilladelses-scopes, nøglen behøver (se nedenfor)
- Kopiér nøglen — den starter med
cr_og vises kun én gang
Send nøglen med hver request:
curl https://www.chatreact.ai/api/v1/chatbots \
-H "Authorization: Bearer cr_your_api_key"
Et X-API-Key: cr_your_api_key header accepteres også. API-nøgler tilhører én virksomhed og udfører med virksomhedsejerens rettigheder; planbegrænsninger og feature gates gælder nøjagtigt som i dashboardet.
API-adgang er tilgængelig på betalte planer — se Pricing page. Nøgler kan tilbagekaldes når som helst fra dashboardet.
Scopes
Hver nøgle bærer ét eller flere scopes. Et endpoint returnerer 403, når nøglen mangler det krævede scope.
| Scope | Grants |
|---|---|
chatbots:read / chatbots:write | Chatbot-konfiguration: persona, sprog, widget, adfærd, begrænsninger, core instructions, embed-kode, learning phase, chatbot-templates, FAQ-widget-indstillinger |
knowledge:read / knowledge:write | Knowledge base: dokumenter, website-crawling, crawlede sider |
faqs:read / faqs:write | FAQs, FAQ-kategorier, forslag, oversættelser |
chats:read / chats:write | Chathistorik, chatvurderinger, confidence-kategorier, live chat (agent-handlinger kræver chats:write) |
leads:read / leads:write | Leads, lead-kategorier, lead capture-indstillinger, eksport |
forms:read / forms:write | Kontaktformularer og indsendelser |
analytics:read | Statistikker, aktivitetsserier, funnels, confidence-status |
company:read / company:write | Virksomhedsprofil og indstillinger, teammedlemmer, invitationer |
email:read / email:write | Email Assistant-forbindelser, kategorier, kontakter, aktivitet |
prices:read | Læs strukturerede prisoptegnelser, revisioner, berettigelse og forslag |
prices:write | Opret og rediger prisudkast, importer CSV og anvend et forslag som udkast; kræver virksomhedsejeren |
prices:approve | Godkend nøjagtige versioner eller arkivér poster; kræver virksomhedsejeren |
blog:read / blog:write | Platform blogindhold (ChatReact internt) |
| any valid key | /v1/me, konto-brug, Deres notifikationer |
Conventions
- Base URL:
https://www.chatreact.ai/api/v1, JSON ind og ud (Content-Type: application/json). - Responses:
{ "success": true, "data": … }; lister tilføjer"pagination": { "total", "page", "pageSize", "totalPages" }. BrugpageogpageSize(maks. 100) på listeendpoints; nogle endpoints tilbyder cursor-paginering (cursor/nextCursor). - Errors:
{ "success": false, "error": "message", "code": "BAD_REQUEST" }med valgfridetailsfor valideringsfejl. Statuskoder:400ugyldigt input,401manglende eller ugyldig nøgle,403manglende scope, planfeature ikke inkluderet eller utilstrækkelig rolle,404ressource ikke fundet (også for ressourcer tilhørende andre virksomheder),409konflikt,429rate limit overskredet. - Partial updates:
PATCHendpoints ændrer kun de felter, De sender; ukendte felter afvises. - Rate limit: 30 requests per minut per IP-adresse.
- Long-running operations (crawls, AI-generation, oversættelser) returnerer hurtigt med et job eller resultat, som De kan polle; de forbruger token- og crawl-budgettet i Deres plan.
Endpoints
Prices & services
At gemme, redigere, importere og anvende et forslag opretter udkast uden godkendelse. Godkendelses- og arkiveringsoperationer gennemgår nøjagtige versioner; en forældet version returnerer en konflikt. Eksisterende nøgler får ikke automatisk prisrettigheder. Kun virksomhedsejeren kan tildele skrive- eller godkendelsesrettigheder. For kundens arbejdsgang, se 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 |
Brug for hjælp? Kontakt vores supportteam →