live-chat

POST /v1/chat/widgets

Create a chat for a site.

Lahat ng live-chat endpoint

Pagpapatotoo

Magpadala ng API key bilang isang bearer token. Kailangang taglayin ng key ang pahintulot na livechat.manage; ang key na wala nito ay tatanggihan gamit ang 403, hindi 404.

Kung saan mapupunta ang id ng iyong organisasyon

Ang endpoint na ito ay kumukuha ng org_id bilang isang field sa JSON body.

Ang id ng iyong organisasyon ay nasa screen ng mga API key sa iyong dashboard, sa tabi mismo ng key. Ito ang parehong id sa bawat tawag na gagawin mo.

Subukan ito

Palitan ang anuman sa loob ng mga panaklong na may anggulo ng iyong sariling mga halaga, at ang placeholder ng key na may key mula sa iyong dashboard.

curl -X POST https://api.zinndigital.com/v1/chat/widgets \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "name": <string> }'

Nakalagda? Ang API console sa iyong dashboard ay awtomatikong naglalagay ng iyong tunay na ID ng organisasyon at sariling susi, at pinapatakbo ang kahilingan laban sa live na API upang makita mo ang aktwal na tugon. Buksan ang endpoint na ito sa console ng API

Mga Detalye

Requires `livechat.manage`. The new widget is created **switched off**: a chat window that starts talking to a customer's visitors before they have asked for one is a consent problem, not a feature.

Katawan ng kahilingan

PangalanUriKailanganAno ito
org_idstringHindi
site_idstringHindi
namestringOo
team_namestringHindi
allowed_originsstring[]Hindi

Tugon

PangalanUriKailanganAno ito
idstringOo
site_idstringOo
namestringOo
public_keystringOo
enabledbooleanOoWhether the chat renders. Created FALSE always: the plugin ships in the deploy footprint of every WordPress site we host, so a widget may exist for a customer who never asked fo…
allowed_originsstring[]OoOrigins the widget may be embedded on. An EMPTY list refuses every page rather than allowing any — this is the only control stopping somebody else's site opening conversations a…
tierstringOo
greetingstringOo
team_namestringOo
accent_colourstringOo
positionstring<left, right>Oo
hide_brandingbooleanOo
ai_enabledbooleanOo
offline_emailstringOo
business_hoursobjectHindi
open_nowbooleanOo
ai_allowanceChatAiAllowanceOo
limitsobjectOo
premium_extra_codestringOoThe catalogue code to buy for the premium tier.

Mga error na maibabalik ng endpoint na ito

401 · 403 · 422