public

POST /v1/public/chat/{publicKey}/conversations/{conversationId}/messages

The visitor says something else.

Tüm public uç noktaları

Tüm geliştirici belgeleri

Kimlik Doğrulama

Bu uç nokta arakatmana açıktır. Kimlik bilgisi ve organizasyon gerektirmez; kendi pazarlama sitemizin ve yapay zeka yanıt motorlarımızın okuduğu yerdir.

Bu uç nokta hiçbir organizasyon kimliği almaz. Anahtarınız zaten ait olduğu organizasyonu tanımlar ve yanıt bu organizasyonla sınırlandırılır.

Dene

Köşeli parantez içindeki her şeyi kendi değerlerinizle ve anahtar yer tutucusunu panonuzdan bir anahtarla değiştirin.

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

Oturum açtınız mı? Panonuzdaki API konsolu, gerçek organizasyon kimliğinizi ve kendi anahtarınızı otomatik olarak doldurur ve isteği canlı API üzerinde çalıştırarak gerçek yanıtı görmenizi sağlar. Bu uç noktayı API konsolunda açın

Ayrıntılar

Anonymous, authorised by X-Zinn-Chat-Token. The message is written to the database in this request, before any operator or assistant is involved — so nothing is lost when a consumer is down. A visitor writing into a conversation the operator had closed reopens it rather than being told it is over.

Parametreler

AdTürZorunluNe olduğu
publicKey (path)stringEvetThe widget's public key. Public by design — it ships in the page source of every site that embeds the widget — so it NAMES a widget and authorises nothing; the Origin header is…
conversationId (path)stringEvet

İstek gövdesi

AdTürZorunluNe olduğu
messagestringEvet
page_urlstringHayır
page_titlestringHayır
referrerstringHayır
localestringHayır
namestringHayır
emailstringHayır

Yanıt

AdTürZorunluNe olduğu
statestring<ai, waiting, open, offline, closed>Evet
cursorintegerEvet
poll_after_msintegerEvetHow long the widget should wait before asking again. Decided by the SERVER on every response, because a cadence baked into the widget is cached on somebody else's site behind…
messagesChatMessage[]Evet

Bu uç noktanın dönderebileceği hatalar

404 · 422 · 429