live-chat

POST /v1/chat/widgets

Create a chat for a site.

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

認証

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

組織 ID を入力する場所

このエンドポイントは、JSONボディのフィールドとして org_id を受け取ります。

組織IDは、ダッシュボードのAPIキー画面にキーのすぐ横に表示されています。これは、実行するすべての呼び出しで同じIDになります。

試してみる

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

curl -X POST https://api.zinndigital.com/v1/chat/widgets \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "name": <string> }'

ログインしていますか?ダッシュボード内のAPIコンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブ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.

リクエスト本文

名前タイプ必須これがその内容です
org_idstringいいえ
site_idstringいいえ
namestringはい
team_namestringいいえ
allowed_originsstring[]いいえ

返信

名前タイプ必須これがその内容です
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 fo…
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 a…
tierstringはい
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 · 422