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

Надішліть ключ API як маркер носія (bearer token). Ключ повинен мати дозвіл livechat.manage; ключ без нього відхиляється з кодом 403, а не 404.

Де вказується ідентифікатор вашої організації

Цей ендпоінт приймає org_id як поле в тілі JSON.

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

Спробувати

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

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

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

Деталі

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.

Тіло запиту

НазваТипОбов'язковеЩо це таке
org_idstringНі
site_idstringНі
namestringТак
team_namestringНі
allowed_originsstring[]Ні

Відповідь

НазваТипОбов'язковеЩо це таке
idstringТак
site_idstringТак
namestringТак
public_keystringТак
enabledbooleanТакWhether 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 for…
allowed_originsstring[]ТакOrigins 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…
tierstringТакThe tier this widget is EFFECTIVELY on. Premium is included free with Zinn® hosting, so this may read premium on a widget nobody has paid for — read purchased_tier for what…
tier_sourcestring<free, purchase, hosting>ТакWhy the widget is on that tier. hosting means it is included with the customer's Zinn® hosting and there is nothing to buy; purchase means the Premium extra was bought for…
purchased_tierstringТакThe tier actually PAID for, independent of any hosting inclusion.
greetingstringТак
team_namestringТак
accent_colourstringТак
positionstring<left, right>Так
hide_brandingbooleanТак
ai_enabledbooleanТак
offline_emailstringТак
business_hoursobjectНі
open_nowbooleanТак
ai_allowanceChatAiAllowanceТак
limitsobjectТак
premium_extra_codestringТакThe catalogue code to buy for the premium tier.

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

401 · 403 · 422