live-chat

PATCH /v1/chat/widgets/{widgetId}

Change a chat's settings, or switch it on.

すべての live-chat エンドポイント

すべての開発者向けドキュメント

認証

ベアラー トークンとして API キーを送信します。キーには livechat.manage 権限が付与されている必要があります。権限のないキーは 404 ではなく 403 で拒否されます。

このエンドポイントは組織IDを受け付けません。お使いのキーによって所属する組織がすでに特定されており、レスポンスはその組織にスコープされます。

試してみる

アングルブラケット内のすべてをご自身の値に置き換え、キーのプレースホルダーをご利用中のダッシュボードのキーに置き換えてください。

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に対してリクエストが実行されるため、実際のレスポンスを確認することができます。 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はい

リクエスト本文

名前タイプ必須これがその内容です
namestringいいえ
enabledbooleanいいえ
allowed_originsstring[]いいえ
greetingstringいいえ
team_namestringいいえ
accent_colourstringいいえ
positionstring<left, right>いいえ
hide_brandingbooleanいいえ
ai_enabledbooleanいいえ
offline_emailstringいいえ
business_hoursobjectいいえ

返信

名前タイプ必須これがその内容です
idstringはい
site_idstringはい
namestringはい
public_keystringはい
enabledbooleanはい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_originsstring[]はい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…
tierstringはい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_sourcestring<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_tierstringはいThe tier actually PAID for, independent of any hosting inclusion.
greetingstringはい
team_namestringはい
accent_colourstringはい
positionstring<left, right>はい
hide_brandingbooleanはい
ai_enabledbooleanはい
offline_emailstringはい
business_hoursobjectいいえ
open_nowbooleanはい
ai_allowanceChatAiAllowanceはい
limitsobjectはい
premium_extra_codestringはいThe catalogue code to buy for the premium tier.

このエンドポイントが返すエラー

401 · 403 · 404 · 422