hosting

POST /v1/sites/{siteId}/chat-agent

Switch on the chat agent for this site.

すべての hosting エンドポイント

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

認証

ベアラー トークンとして API キーを送信します。このエンドポイントでは仕様に特定の権限が記載されていないため、キーに必要な最小限の権限を付与し、推測するのではなくレスポンスを確認してください。

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

試してみる

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

curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/chat-agent \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{  }'

ログインしていますか?ダッシュボード内のAPIコンソールでは、実際の組織IDやお客様ご自身のキーが自動入力され、ライブAPIに対してリクエストが実行されるため、実際のレスポンスを確認することができます。 API コンソールでこのエンドポイントを開く

詳細

Creates the agent, named after the site and pre-authorised for the site's own domains so the snippet works the moment it is pasted. ⛔ Refuses with 422 when the product has not been bought for this site, or when the account is not in good standing — two different refusals with two different remedies, told apart by the code in the error details (not_purchased / not_in_good_standing). A suspension is not cleared by credit, so that refusal deliberately offers no top-up. Calling it twice returns the existing agent with 200 rather than an error.

パラメータ

名前タイプ必須これがその内容です
siteId (path)UuidはいSite ID (UUIDv7).

リクエスト本文

名前タイプ必須これがその内容です
namestringいいえ
greetingstringいいえ
personastringいいえ
brand_colourstringいいえ
launcher_positionstring<left, right>いいえ
handoff_enabledbooleanいいえ
statusstring<active, paused>いいえ
allowed_originsstring[]いいえ
monthly_message_capintegerいいえ

返信

名前タイプ必須これがその内容です
idstringはい
site_idstringいいえ
namestringはいWhat the agent calls itself to visitors. The customer's brand, not ours.
greetingstringいいえ
personastringいいえFree text describing tone and what to say. ⛔ It cannot widen what the agent may read — retrieval decides that before the model sees anything.
brand_colourstringいいえ
launcher_positionstring<left, right>いいえ
statusstring<active, paused>はいpaused stops it answering and keeps everything it has learned, so switching back on is instant rather than a re-index.
handoff_enabledbooleanいいえOffer to pass the visitor to a person when the agent cannot answer.
public_keystringはいCarried in the embed snippet. It identifies the agent and authorises nothing a page's reader could not already do — the fence is allowed_origins.
allowed_originsstring[]はいOrigins the public endpoints will answer for. ⛔ Empty refuses everything — it means "not installed yet", never "allow anything".
monthly_message_capintegerいいえMessages included per calendar month. Checked before each answer.
messages_this_monthintegerいいえ
indexed_chunksintegerいいえPassages of the site currently searchable. Zero means it knows nothing yet.
embed_snippetstringいいえThe two lines to paste into any website.
sourcesChatAgentSource[]はい

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

401 · 403 · 404 · 422