hosting
POST /v1/sites/{siteId}/chat-agent
Switch on the chat agent for this site.
প্রমাণীকরণ
একটি বিয়ার টোকেন হিসেবে একটি এপিআই কি পাঠান। এই এন্ডপয়েন্টটি স্পেসিফিকেশনে কোনো নির্দিষ্ট অনুমতির কথা বলে না, তাই অনুমান না করে আপনার কি-কে এর জন্য ন্যূনতম প্রয়োজনীয় অনুমতি দিন এবং রেসপন্স পরীক্ষা করুন।
এই এন্ডপয়েন্টটি কোনো অর্গানাইজেশন আইডি নেয় না। আপনার কীটি ইতিমধ্যে এটি যে অর্গানাইজেশনের অন্তর্গত তা শনাক্ত করে এবং প্রতিক্রিয়াটি সেই অনুযায়ী নির্ধারিত হয়।
চেষ্টা করুন
কোণ বন্ধনীতে থাকা যেকোনো কিছু আপনার নিজস্ব মান দিয়ে এবং কী প্লেসহোল্ডারটি আপনার ড্যাশবোর্ডের একটি কী দিয়ে প্রতিস্থাপন করুন।
curl -X POST https://api.zinndigital.com/v1/sites/{siteId}/chat-agent \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'লগ ইন করা আছে? আপনার ড্যাশবোর্ডের এপিআই কনসোল আপনার আসল অর্গানাইজেশন আইডি এবং আপনার নিজের কি পূরণ করে দেয়, এবং লাইভ এপিআই-এর বিপরীতে অনুরোধটি চালায় যাতে আপনি প্রকৃত প্রতিক্রিয়া দেখতে পান। এই এন্ডপয়েন্টটি এপিআই কনসোলে খুলুন
বিবরণ
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