Πισtoποίηση
Στείλτε ένα κλειδί API ως διακριτικό φορέα (bearer token). Το κλειδί πρέπει να διαθέτει το δικαίωμα livechat.manage· ένα κλειδί που δεν το διαθέτει απορρίπτεται με 403, όχι 404.
Πού μπαίνει το αναγνωριστικό του οργανισμού σας
Αυτό το endpoint δέχεται το πεδίο org_id στο σώμα JSON.
Το αναγνωριστικό του οργανισμού σας βρίσκεται στην οθόνη των κλειδιών API στον πίνακα ελέγχου σας, δίπλα στο ίδιο το κλειδί. Είναι το ίδιο αναγνωριστικό σε κάθε κλήση που πραγματοποιείτε.
Δοκιμάστε το
Ατικatastήstε ό,τι βρίskεtai μέσα σe γώniaδeς μe τis δikές sas timές, kai to placeholder klεidioύ μe éna klεidi apó ton pinaka ελέgchou sas.
curl -X POST https://api.zinndigital.com/v1/chat/widgets \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "name": <string> }'Συνδεθήκατε; Η κονσόλα API στον πίνακα ελέγχου σας συμπληρώνει το πραγματικό αναγνωριστικό του οργανισμού σας και το δικό σας κλειδί, και εκτελεί το αίτημα στο ζωντανό API, ώστε να μπορείτε να δείτε την πραγματική απόκριση. Ανοίξτε αυτό το τελικό σημείο στην κονσόλα API
Λεπτομέρειες
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.
Σώμα αίτησης
| Όνομα | Τύpος | Υποχρεωτικό | Τι είναι |
|---|---|---|---|
org_id | string | Όχι | — |
site_id | string | Όχι | — |
name | string | Ναι | — |
team_name | string | Όχι | — |
allowed_origins | string[] | Όχι | — |
Απάντηση
| Όνομα | Τύpος | Υποχρεωτικό | Τι είναι |
|---|---|---|---|
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 · 422