live-chat
PATCH /v1/chat/widgets/{widgetId}
Change a chat's settings, or switch it on.
تصدیقهویت
یو API کی د بیئرر ټوکن (bearer token) په توګه ولیکئ. کی باید د livechat.manage اجازه ولري؛ له دې اجازې پرته کی د 404 پرځای د 403 په واسطه رد کیږي.
دا پای نقطه د سازمان هېڅ آی ډي نه اخلي. ستاسو کیلي مخکې تر مخکې هغه سازمان په ګوته کوي چې پورې اړه لري، او ځواب ورته محدود دی.
هڅه وکړئ
د انګلیسي په زاوي پنسونو کې هرڅه د خپلو ارزښتونو سره بدل کړئ، او د کلي ځای لرونکی ستاسو د ډشبورډ د کلي سره.
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 په وړاندې پرمخ وړي ترڅو تاسو وکولی شئ اصلي ځواب وګورئ. دا پای ټکی (endpoint) د 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 fo… |
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 a… |
tier | 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 | نه | — |
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