hosting
POST /v1/sites/{siteId}/chat-agent
Switch on the chat agent for this site.
認証
ベアラー トークンとして 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). |
リクエスト本文
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
name | string | いいえ | — |
greeting | string | いいえ | — |
persona | string | いいえ | — |
brand_colour | string | いいえ | — |
launcher_position | string<left, right> | いいえ | — |
handoff_enabled | boolean | いいえ | — |
status | string<active, paused> | いいえ | — |
allowed_origins | string[] | いいえ | — |
monthly_message_cap | integer | いいえ | — |
返信
| 名前 | タイプ | 必須 | これがその内容です |
|---|---|---|---|
id | string | はい | — |
site_id | string | いいえ | — |
name | string | はい | What the agent calls itself to visitors. The customer's brand, not ours. |
greeting | string | いいえ | — |
persona | string | いいえ | 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_colour | string | いいえ | — |
launcher_position | string<left, right> | いいえ | — |
status | string<active, paused> | はい | paused stops it answering and keeps everything it has learned, so switching back on is instant rather than a re-index. |
handoff_enabled | boolean | いいえ | Offer to pass the visitor to a person when the agent cannot answer. |
public_key | string | はい | 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_origins | string[] | はい | Origins the public endpoints will answer for. ⛔ Empty refuses everything — it means "not installed yet", never "allow anything". |
monthly_message_cap | integer | いいえ | Messages included per calendar month. Checked before each answer. |
messages_this_month | integer | いいえ | — |
indexed_chunks | integer | いいえ | Passages of the site currently searchable. Zero means it knows nothing yet. |
embed_snippet | string | いいえ | The two lines to paste into any website. |
sources | ChatAgentSource[] | はい | — |
このエンドポイントが返すエラー
401 · 403 · 404 · 422