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#
GET /api/public/v1/config?pk=kroos_pk_...{
"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#
POST /api/public/v1/chat| Field | Required | Notes |
|---|---|---|
pk | yes | Publishable key |
message | yes | Up to 1,000 characters |
conversationId | no | Continue a conversation (returned by the first answer) |
conversationKey | no | The signed key returned with each answer. Send it with conversationId so the conversation continues even when the browser blocks cookies (valid 24 hours) |
userToken | no | End-user token |
pow | no | Proof-of-work solution after abuse.challenge_required |
context | no | Page, time zone and clock, so answers know where and when they are (visitor context) |
{
"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
}citationsonly ever point to your verified domains and allowed links.handoffOffered: truemeans the answer offered a person (in its text); show a "talk to a person" option.- Keep
conversationIdandconversationKeyfor 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: truemeans 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.degradedlists limits that changed this answer (for example a smaller model tier).enforcementis set when the visitor has been throttled or blocked.meshappears when a partner organization can help better (Federation Mesh).presencesays whether the visitor's location is open and how to reach a person now (locations & hours). See alsoGET /api/public/v1/presence.
POST /api/public/v1/chat/stream takes the same body and streams the answer (streaming).
Feedback#
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#
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#
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#
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#
Partner continuation#
When an answer includes mesh with a capsule, ask the visitor's consent, then:
| Request | Body |
|---|---|
POST /api/public/v1/mesh/consent | pk, capsuleId |
POST /api/public/v1/mesh/continue | pk, capsuleId, optional message |