live-chat

PATCH /v1/chat/widgets/{widgetId}

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

כל נקודות הקצה מסוג live-chat

כל תיעוד המפתחים

אימות

שלחו מפתח API כאסימון נושא (bearer token). על המפתח לכלול את הרשאה livechat.manage; מפתח שאינו כולל אותה יידחה בסטטוס 403, ולא 404.

נקודת קצה זו אינה דורשת מזהה ארגון. המפתח שלך כבר מזהה את הארגון שאליו הוא שייך, והתגובה מוגבלת אליו בלבד.

נסה זאת

החלף כל דבר בסוגריים זוויתיים בערכים משלך, ואת מציין מיקום המפתח במפתח מלוח הבקרה שלך.

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.

פרמטרים

שםסוגנדרשמה זה
widgetId (path)stringכן

גוף הבקשה

שםסוגנדרשמה זה
namestringלא
enabledbooleanלא
allowed_originsstring[]לא
greetingstringלא
team_namestringלא
accent_colourstringלא
positionstring<left, right>לא
hide_brandingbooleanלא
ai_enabledbooleanלא
offline_emailstringלא
business_hoursobjectלא

תשובה

שםסוגנדרשמה זה
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