live-chat
PATCH /v1/chat/widgets/{widgetId}
Change a chat's settings, or switch it on.
ການພິສູດຕົວຕົນ
ສົ່ງລະຫັດ API ເປັນ bearer token. ລະຫັດຕ້ອງມີສິດ livechat.manage; ລະຫັດທີ່ບໍ່ມີສິດດັ່ງກ່າວຈະຖືກປະຕິເສດດ້ວຍລະຫັດ 403, ບໍ່ແມ່ນ 404.
ຈຸດເຊື່ອມຕໍ່ນີ້ບໍ່ໄດ້ຮັບ ID ອົງກອນ. ລະຫັດຂອງທ່ານໄດ້ລະບຸອົງກອນທີ່ມັນຂຶ້ນກັບແລ້ວ, ແລະ ຄໍາຕອບແມ່ນຖືກຈໍາກັດຂອບເຂດໄວ້ສໍາລັບອົງກອນນັ້ນ.
ລອງໃຊ້ເບິ່ງ
ປ່ຽນແທນທຸກຢ່າງທີ່ຢູ່ໃນວົງເລັບມຸມດ້ວຍຄ່າຂອງທ່ານເອງ, ແລະ ປ່ຽນແທນຕົວແທນບ່ອນວ່າງຄີດ້ວຍຄີຈາກແຜງຄວບຄຸມຂອງທ່ານ.
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 | ແມ່ນແລ້ວ | — |
ເນື້ອຫາຂອງຄຳຮ້ອງ
| ຊື່ | ປະເພດ | ຕ້ອງການ | ສິ່ງທີ່ມັນເປັນ |
|---|---|---|---|
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