live-chat
PATCH /v1/chat/widgets/{widgetId}
Change a chat's settings, or switch it on.
Autentifikacija
Pošaljite API ključ kao bearer token. Ključ mora imati dozvolu livechat.manage; ključ bez nje se odbija sa 403, a ne sa 404.
Ovaj krajnji tačka ne prihvata ID organizacije. Vaš ključ već identifikuje organizaciju kojoj pripada, a odgovor je ograničen na nju.
Isprobajte
Zamenite bilo šta u uglastim zagradama sopstvenim vrednostima, a ključni placeholder sa ključem sa vaše kontrolne table.
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 kontrolnoj tabli automatski popunjava ID vaše stvarne organizacije i vaš sopstveni ključ, i izvršava zahtev nad API-jem uživo tako da možete videti stvarni odgovor. Otvorite ovu krajnju tačku u API konzoli
Detalji
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 | Šta je ovo |
|---|---|---|---|
widgetId (path) | string | Da | — |
Telo zahteva
| Naziv | Vrsta | Obavezno | Šta je ovo |
|---|---|---|---|
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 | Šta je ovo |
|---|---|---|---|
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. |
Greške koje ovaj krajnji tačka može da vrati
401 · 403 · 404 · 422