live-chat
POST /v1/chat/widgets
Create a chat for a site.
Doğrulama
API açarını bearer token kimi göndərin. Açar livechat.manage icazəsinə malik olmalıdır; bu icazəsi olmayan açar 404 deyil, 403 xətası ilə rədd edilir.
Təşkilatınızın identifikatorunun yerləşdiyi yer
Bu son nöqtə JSON gövdəsində sahə kimi org_id qəbul edir.
Təşkilatınızın identifikatoru idarə panelinizdəki API açarları ekranında, açarın özünün yanında yerləşir. Bu, etdiyiniz hər bir sorğuda eyni identifikatordur.
Sınaqdan keçir
Bucaqlı mötərizələrdə olan hór şeyi öz qiymətlərinizlə, açar yertutucusunu isə idarə panelinizdən bir açarla əvəz edin.
curl -X POST https://api.zinndigital.com/v1/chat/widgets \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string> }'Sistemə daxil olmusunuz? İdarə panelinizdəki API konsolu real təşkilatınızın identifikatorunu və öz açarınızı avtomatik doldurur, sorğunu canlı API-yə qarşı icra edir ki, siz faktiki cavabı görə biləsiniz. Bu son nöqtəni API konsolunda açın
Təfərrüatlar
Requires livechat.manage. The new widget is created switched off: a chat window that starts talking to a customer's visitors before they have asked for one is a consent problem, not a feature.
Sorğu gövdəsi
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
org_id | string | Xeyr | — |
site_id | string | Xeyr | — |
name | string | Bəli | — |
team_name | string | Xeyr | — |
allowed_origins | string[] | Xeyr | — |
Cavab
| Ad | Tip | Tələb olunur | Nədir |
|---|---|---|---|
id | string | Bəli | — |
site_id | string | Bəli | — |
name | string | Bəli | — |
public_key | string | Bəli | — |
enabled | boolean | Bəli | 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[] | Bəli | 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 | Bəli | 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> | Bəli | 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 | Bəli | The tier actually PAID for, independent of any hosting inclusion. |
greeting | string | Bəli | — |
team_name | string | Bəli | — |
accent_colour | string | Bəli | — |
position | string<left, right> | Bəli | — |
hide_branding | boolean | Bəli | — |
ai_enabled | boolean | Bəli | — |
offline_email | string | Bəli | — |
business_hours | object | Xeyr | — |
open_now | boolean | Bəli | — |
ai_allowance | ChatAiAllowance | Bəli | — |
limits | object | Bəli | — |
premium_extra_code | string | Bəli | The catalogue code to buy for the premium tier. |
Bu son nöqtənin qaytara biləcəyi xətalar
401 · 403 · 422