live-chat
POST /v1/chat/widgets/{widgetId}/copy-settings
Copy this chat's branding and settings onto other sites' chats.
Аутентификација
Пошаљите API кључ као bearer токен. Кључ мора имати дозволу livechat.view; кључ без ње се одбија уз 403, а не 404.
Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
curl -X POST https://api.zinndigital.com/v1/chat/widgets/{widgetId}/copy-settings \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
Requires livechat.view or livechat.manage on this chat and livechat.manage on every target. Copies the colour, position, team name, greeting, logo, opening hours, the "hide Zinn® Chat branding" choice and this chat's own saved replies (a mirror: replies the target has and this chat does not are removed). Never copies the public key, the allowed web addresses, the on/off switch, the name, the missed-chat email address, the AI switch, the tier or any conversation. A site with no chat gets one, created switched off with no web addresses. With dry_run the full diff is returned and nothing is written. At most 100 targets per request — a page, not a limit on the work: send the rest in the next request. A target outside the organisations you manage answers 404, and nothing is changed.
Параметри
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
widgetId (path) | string | Да | — |
Тело захтева
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
target_widget_ids | string[] | Не | — |
target_site_ids | string[] | Не | Sites to copy to. A site with no chat gets one, created switched off. |
dry_run | boolean | Не | — |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
source_widget_id | string | Да | — |
dry_run | boolean | Да | — |
results | ChatSettingsTransferResult[] | Да | — |
Грешке које ова крајња тачка може вратити
401 · 403 · 404 · 422