live-chat
PATCH /v1/chat/widgets/{widgetId}
Change a chat's settings, or switch it on.
Autentifikacija
Pošaljite API ključ kao nosivi token. Ključ mora imati dozvolu livechat.manage; ključ bez nje se odbija s kodom 403, a ne 404.
Ova krajnja točka ne prihvaća ID organizacije. Vaš ključ već identificira organizaciju kojoj pripada, a odgovor je ograničen na nju.
Isprobajte
Zamijenite sve unutar šiljastih zagrada svojim vlastitim vrijednostima, a rezervirano mjesto za ključ s ključem iz vaše nadzorne ploče.
curl -X PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Prijavljeni ste? API konzola na vašoj nadzornoj ploči automatski unosi stvarni ID vaše organizacije i vaš vlastiti ključ te šalje zahtjev prema aktivnom API-ju kako biste mogli vidjeti stvarni odgovor. Otvori ovu krajnju točku u API konzoli
Pojedinosti
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.
Parametri
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
widgetId (path) | string | Da | — |
Tijelo zahtjeva
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
name | string | Ne | — |
enabled | boolean | Ne | — |
allowed_origins | string[] | Ne | — |
greeting | string | Ne | — |
team_name | string | Ne | — |
accent_colour | string | Ne | — |
position | string<left, right> | Ne | — |
hide_branding | boolean | Ne | — |
ai_enabled | boolean | Ne | — |
offline_email | string | Ne | — |
business_hours | object | Ne | — |
Odgovor
| Naziv | Vrsta | Obavezno | Što je to |
|---|---|---|---|
id | string | Da | — |
site_id | string | Da | — |
name | string | Da | — |
public_key | string | Da | — |
enabled | boolean | Da | 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 fo… |
allowed_origins | string[] | Da | 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 a… |
tier | string | Da | — |
greeting | string | Da | — |
team_name | string | Da | — |
accent_colour | string | Da | — |
position | string<left, right> | Da | — |
hide_branding | boolean | Da | — |
ai_enabled | boolean | Da | — |
offline_email | string | Da | — |
business_hours | object | Ne | — |
open_now | boolean | Da | — |
ai_allowance | ChatAiAllowance | Da | — |
limits | object | Da | — |
premium_extra_code | string | Da | The catalogue code to buy for the premium tier. |
Pogreške koje ova krajnja točka može vratiti
401 · 403 · 404 · 422