live-chat
PATCH /v1/chat/widgets/{widgetId}
Change a chat's settings, or switch it on.
Ìfàṣẹ́pọ̀
Fi bọ́ọ̀lù (bearer token) ranṣẹ gẹ́gẹ́ bí kọ́kọ́rọ́ API. Kọ́kọ́rọ́ náà gbọ́dọ̀ ní ìyọ̀ǹda livechat.manage; a ó kọ̀ ọ́ silẹ pẹlu 403, kii ṣe 404, ti kọ́kọ́rọ́ náà kò bá ní i.
Ojú abánisọ̀rọ̀ yìí kò gba id ajọ kankan. Kọ́kọ́rọ́ rẹ ti mọ ajọ ti o jẹ ti e, a o si fèsì nipa rẹ̀.
Gbiyanju rẹ
Rọ́pọ̀ èyíkéyìí nínú àwọn àmì ìtọ́ka < > pẹ̀lú iye tirẹ̀, àti àmì ìdánimọ̀ bọ́tìnnì náà pẹ̀lú bọ́tìnnì kan láti inú dásibọ̀ọ̀dù rẹ.
curl -X PATCH https://api.zinndigital.com/v1/chat/widgets/{widgetId} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Ṣé o ti wọlé? Iwọ̀n api ní nú ìgbékalẹ̀ rẹ kún id àjọ gidi rẹ ati bọtini tirẹ, o si nṣiṣẹ ibeere na lòdì si api gidi ki o le rii esi gidi na. Ṣí ojú abáná yìí sílẹ̀ nínú kọnsólù API
Àwọn kúlẹ̀kúlẹ̀
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.
Àwọn ìpìlẹ̀
| Orúkọ | Iru | Tí a nílò | Kini o jẹ |
|---|---|---|---|
widgetId (path) | string | Bẹẹni | — |
Akoonu ibeere naa
| Orúkọ | Iru | Tí a nílò | Kini o jẹ |
|---|---|---|---|
name | string | Bẹẹkọ | — |
enabled | boolean | Bẹẹkọ | — |
allowed_origins | string[] | Bẹẹkọ | — |
greeting | string | Bẹẹkọ | — |
team_name | string | Bẹẹkọ | — |
accent_colour | string | Bẹẹkọ | — |
position | string<left, right> | Bẹẹkọ | — |
hide_branding | boolean | Bẹẹkọ | — |
ai_enabled | boolean | Bẹẹkọ | — |
offline_email | string | Bẹẹkọ | — |
business_hours | object | Bẹẹkọ | — |
Idahun
| Orúkọ | Iru | Tí a nílò | Kini o jẹ |
|---|---|---|---|
id | string | Bẹẹni | — |
site_id | string | Bẹẹni | — |
name | string | Bẹẹni | — |
public_key | string | Bẹẹni | — |
enabled | boolean | Bẹẹni | 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[] | Bẹẹni | 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 | Bẹẹni | — |
greeting | string | Bẹẹni | — |
team_name | string | Bẹẹni | — |
accent_colour | string | Bẹẹni | — |
position | string<left, right> | Bẹẹni | — |
hide_branding | boolean | Bẹẹni | — |
ai_enabled | boolean | Bẹẹni | — |
offline_email | string | Bẹẹni | — |
business_hours | object | Bẹẹkọ | — |
open_now | boolean | Bẹẹni | — |
ai_allowance | ChatAiAllowance | Bẹẹni | — |
limits | object | Bẹẹni | — |
premium_extra_code | string | Bẹẹni | The catalogue code to buy for the premium tier. |
Awọn aṣiṣe ti ibudo ipari yii le da pada
401 · 403 · 404 · 422