public

POST /v1/public/chat-agents/{publicKey}/messages

One visitor turn — a question, and the answer from that site's own pages.

Усі кінцеві точки public

Уся документація для розробників

Автентифікація

Ця кінцева точка є публічною. Вона не потребує жодних облікових даних чи організації — це те, що читають наш власний маркетинговий сайт та пошукові системи на основі штучного інтелекту.

Цей кінцевий пункт не потребує ідентифікатора організації. Ваш ключ уже ідентифікує організацію, якій він належить, і відповідь обмежується її межами.

Спробувати

Замініть усе в кутових дужках власними значеннями, а заповнювач ключа — ключем із вашої панелі керування.

curl -X POST https://api.zinndigital.com/v1/public/chat-agents/{publicKey}/messages \
  -H "Content-Type: application/json" \
  -d '{ "message": <string> }'

Увійшли в систему? Консоль API у вашій панелі керування автоматично підставляє ваш реальний ідентифікатор організації та ваш власний ключ, а також виконує запит до робочого API, щоб ви могли побачити справжню відповідь. Відкрийте цю кінцеву точку в консолі API

Деталі

The agent answers only from content belonging to this one site. That is enforced in the database query, not by instructing the model, so there is no phrasing a visitor can use to reach another customer's content. handoff_suggested is its own field and is not an error. It is true when the agent could not find the answer on the site — nothing is broken, those pages simply do not say — and the right response is to offer a person, never a guess. refusal is present only when the turn was refused rather than answered, and names the class so a widget can render the right thing: provider_outage, credential_problem, refused (a deliberate decline, such as a monthly cap reached) or unavailable (our fault, and no vendor is named). Answers 404 for an unauthorised Origin, exactly as the config route does and for the same reason.

Параметри

НазваТипОбов'язковеЩо це таке
publicKey (path)stringТакThe agent's public key, as carried in the embed snippet.

Тіло запиту

НазваТипОбов'язковеЩо це таке
messagestringТак
conversation_idstringНіContinue an existing thread. Omit to start one.
localestringНіThe visitor's language. The agent answers in this, not in the site owner's language.
page_urlstringНі

Відповідь

НазваТипОбов'язковеЩо це таке
conversation_idstringТак
replystringТак
citationsobject[]ТакThe pages of this site the answer was drawn from.
handoff_suggestedbooleanТакNot an error. true means the agent could not answer from this site's content and a person should take over. Rendering it as a fault would blame a vendor outage for an…
refusalstring<provider_outage, credential_problem, refused, unavailable>НіPresent only when the turn was refused rather than answered. refused is a deliberate decline of ours (a monthly cap reached, an agent switched off) and names no vendor;…
failureVendorFailureНіThe classified §2.57 failure behind a refusal — which vendor, whose key, which door. ⛔ Returned ONLY by the owner's preview endpoint; the public widget endpoint never carries it,…

Помилки, які може повертати ця кінцева точка

404 · 429