Kroos Developers
Kroos Developers › APIs

Website chatbot API

The endpoints the Kroos widget uses, for building your own chat interface, voice experience or app integration.

All endpoints live on https://api.kroos.ai, take your publishable key as pk (body or query), and must be called from a verified domain or allowed origin. Add userToken to identify a signed-in customer (end-user tokens).

Get configuration#

http
GET /api/public/v1/config?pk=kroos_pk_...
json
{
  "name": "Bright Smile Dental",
  "summary": "Family dental clinic…",
  "verified": true,
  "verifiedDomains": ["brightsmile.example"],
  "mode": "full",
  "topQuestions": ["Do you take walk-ins?", "…"],
  "promos": [{ "text": "New patient exam $59", "valid_until": "2027-01-31" }],
  "helpCopy": "Ask about appointments, prices or insurance.",
  "disclosure": "You're chatting with an AI assistant. Answers come from this organization's own published information.",
  "languages": ["en", "es"],
  "voice": false,
  "tts": false,
  "ui": { "en": { "...": "localized interface strings" } }
}

Always show disclosure to visitors.

Send a message#

http
POST /api/public/v1/chat
FieldRequiredNotes
pkyesPublishable key
messageyesUp to 1,000 characters
conversationIdnoContinue a conversation (returned by the first answer)
conversationKeynoThe signed key returned with each answer. Send it with conversationId so the conversation continues even when the browser blocks cookies (valid 24 hours)
userTokennoEnd-user token
pownoProof-of-work solution after abuse.challenge_required
contextnoPage, time zone and clock, so answers know where and when they are (visitor context)
jsonResponse
{
  "conversationId": "conv_…",
  "conversationKey": "…",
  "turnId": "turn_…",
  "answer": "Yes, we take walk-ins on weekdays from 9 to 11am.",
  "citations": [{ "title": "Visit us", "url": "https://brightsmile.example/visit" }],
  "handoffOffered": false,
  "collectContact": false,
  "action": null,
  "confidence": 0.86,
  "language": "en",
  "policyVersion": 3,
  "segment": "anonymous",
  "degraded": [],
  "enforcement": null
}
  • citations only ever point to your verified domains and allowed links.
  • handoffOffered: true means the answer offered a person (in its text); show a "talk to a person" option.
  • Keep conversationId and conversationKey for the visitor's session (the hosted widget keeps them per tab, so the conversation follows the visitor from page to page). Without a valid key, a conversation started by someone else is never continued: a new one starts.
  • collectContact: true means the visitor asked for a person or accepted the offer: ask for an email or phone number now and send it to /api/public/v1/handoff. Don't ask for contact details otherwise.
  • degraded lists limits that changed this answer (for example a smaller model tier).
  • enforcement is set when the visitor has been throttled or blocked.
  • mesh appears when a partner organization can help better (Federation Mesh).
  • presence says whether the visitor's location is open and how to reach a person now (locations & hours). See also GET /api/public/v1/presence.

POST /api/public/v1/chat/stream takes the same body and streams the answer (streaming).

Feedback#

http
POST /api/public/v1/feedback
{ "pk": "kroos_pk_...", "turnId": "turn_…", "signal": "up" | "down", "correction": "optional text" }

Corrections go to your review queue; they never change answers directly.

Hand off to a person#

http
POST /api/public/v1/handoff
{ "pk": "kroos_pk_...", "conversationId": "conv_…", "contact": "visitor@example.com", "summary": "Wants a quote for 3 crowns" }

Returns { id, status: "sent" | "queued", dueAt, message }.

Fit check for a visitor's business#

http
POST /api/public/v1/match
{ "pk": "kroos_pk_...", "url": "https://visitors-company.example" }

Compares the visitor's public site with your approved capabilities and returns a strong fit, possible fit or not a fit, with reasons. Limited per visitor because each check reads several pages.

Read aloud#

http
POST /api/public/v1/speech/tts
{ "pk": "kroos_pk_...", "text": "…", "lang": "en" }

Returns audio/mpeg when a speech provider is configured (config.tts: true).

Voice sessions#

See Voice, SMS & WhatsApp.

Partner continuation#

When an answer includes mesh with a capsule, ask the visitor's consent, then:

RequestBody
POST /api/public/v1/mesh/consentpk, capsuleId
POST /api/public/v1/mesh/continuepk, capsuleId, optional message

Last updated 2026-12-03