live-chat
PATCH /v1/chat/widgets/{widgetId}
Change a chat's settings, or switch it on.
ავტორიზაცია
API გასაღები გაგზავნეთ როგორც მატარებელი ტოკენი (bearer token). გასაღებს უნდა ჰქონდეს livechat.manage ნებართვა; ამის გარეშე გასაღები უარყოფილი იქნება 403 და არა 404 სტატუსით.
ეს ბოლო წერტილი არ იღებს ორგანიზაციის იდენტიფიკატორს. თქვენი გასაღები უკვე აიდენტიფიცირებს იმ ორგანიზაციას, რომელსაც ის ეკუთვნის, და პასუხი შემოფარგლულია მისით.
სცადეთ
შეSubstituted any value inside angle brackets with your own and the key placeholder with a key from your dashboard.
curl -X PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'შესული ხართ? თქვენი სამართავ პანელში არსებული API კონსოლი ავტომატურად ამატებს თქვენი რეალური ორგანიზაციის ID-სა და საკუთარ გასაღებს და ატარებს მოთხოვნას ცოცხალ API-ს წინააღმდეგ, რათა იხილოთ რეალური პასუხი. გაAღით ეს ენდპოინტი 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 | დიახ | — |
მოთხოვნის სხეული
| სახელი | ტიპი | სავალდებულო | რა არის ეს |
|---|---|---|---|
name | string | არა | — |
enabled | boolean | არა | — |
allowed_origins | string[] | არა | — |
greeting | string | არა | — |
team_name | string | არა | — |
accent_colour | string | არა | — |
position | string<left, right> | არა | — |
hide_branding | boolean | არა | — |
ai_enabled | boolean | არა | — |
offline_email | string | არა | — |
business_hours | object | არა | — |
პასუხი
| სახელი | ტიპი | სავალდებულო | რა არის ეს |
|---|---|---|---|
id | string | დიახ | — |
site_id | string | დიახ | — |
name | string | დიახ | — |
public_key | string | დიახ | — |
enabled | boolean | დიახ | 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_origins | string[] | დიახ | 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… |
tier | string | დიახ | 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_source | string<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_tier | string | დიახ | The tier actually PAID for, independent of any hosting inclusion. |
greeting | string | დიახ | — |
team_name | string | დიახ | — |
accent_colour | string | დიახ | — |
position | string<left, right> | დიახ | — |
hide_branding | boolean | დიახ | — |
ai_enabled | boolean | დიახ | — |
offline_email | string | დიახ | — |
business_hours | object | არა | — |
open_now | boolean | დიახ | — |
ai_allowance | ChatAiAllowance | დიახ | — |
limits | object | დიახ | — |
premium_extra_code | string | დიახ | The catalogue code to buy for the premium tier. |
შეცდომები, რომლებიც ამ ენდპოინტს შეუძლია დააბრუნოს
401 · 403 · 404 · 422