การยืนยันตัวตน

ส่ง API key เป็น bearer token เอนด์พอยต์นี้ไม่ได้ระบุสิทธิ์การใช้งานเฉพาะในข้อกำหนด ดังนั้นควรให้คีย์ของคุณมีสิทธิ์น้อยที่สุดเท่าที่จำเป็นและให้ตรวจสอบจากการตอบกลับแทนที่จะคาดเดา

ปลายทางนี้ไม่ต้องใช้รหัสองค์กร คีย์ของคุณระบุองค์กรที่เป็นเจ้าของอยู่แล้ว และการตอบกลับจะถูกจำกัดขอบเขตไว้เฉพาะองค์กรนั้น

ทดลองใช้เลย

แทนที่สิ่งใดๆ ที่อยู่ภายในวงเล็บแหลมด้วยค่าของคุณเอง และตัวยึดตำแหน่งคีย์ด้วยคีย์จากแดชบอร์ดของคุณ

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

เข้าสู่ระบบแล้วใช่ไหม คอนโซล API ในแดชบอร์ดของคุณจะเติมรหัสองค์กรจริงและคีย์ของคุณเองโดยอัตโนมัติ และทำการส่งคำขอไปยัง 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