live-chat

PATCH /v1/chat/widgets/{widgetId}

Change a chat's settings, or switch it on.

Барлық live-chat соңғы нүктелері

Барлық әзірлеуші құжаттамасы

Аутентификация

API кілтін bearer токені ретінде жіберіңіз. Кілтте livechat.manage рұқсаты болуы тиіс; онсыз кілтке 404 емес, 403 қатесі қайтарылады.

Бұл соңғы нүкте ұйым идентификаторын қабылдамайды. Сіздің кілтіңіз оның қай ұйымға тиесілі екенін өзі анықтайды және жауап соған шектеледі.

Әрекет етіп көру

Бұрыштық жақшалардағы кез келген нәрсені өз мәндеріңізбен, ал кілт орналастырушысын басқару тақтасынан алынған кілтпен алмастырыңыз.

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

Жүйеге кіргенсіз бе? Бақылау тақтасындағы API консолі ұйымыңыздың нақты идентификаторы мен жеке кілтіңізді автоматты түрде толтырады да, нақты жауапты көре алуыңыз үшін сұрауды тікелей жұмыс істеп тұрған API арқылы орындайды. Бұл соңғы нүктені API консолінде ашыңыз

Мәліметтер

Requires livechat.manage. Switching a widget on with no allowedOrigins is refused with 422 rather than accepted: the widget only answers pages on origins the customer listed, so an empty list would leave the chat live, looking configured, and invisible on every page with nothing saying why.

Параметрлер

АтыTүріМіндеттіМазмұны
widgetId (path)stringИә

Сұрау денесі

АтыTүріМіндеттіМазмұны
namestringЖоқ
enabledbooleanЖоқ
allowed_originsstring[]Жоқ
greetingstringЖоқ
team_namestringЖоқ
accent_colourstringЖоқ
positionstring<left, right>Жоқ
hide_brandingbooleanЖоқ
ai_enabledbooleanЖоқ
offline_emailstringЖоқ
business_hoursobjectЖоқ

Жауап

АтыTүріМіндеттіМазмұны
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 · 404 · 422