live-chat

POST /v1/chat/widgets

Create a chat for a site.

จุดสิ้นสุด live-chat ทั้งหมด

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

ส่ง API key ในรูปแบบ bearer token คีย์ดังกล่าวต้องมีสิทธิ์ livechat.manage หากไม่มีสิทธิ์ ระบบจะปฏิเสธด้วยรหัส 403 แทนที่จะเป็น 404

ตำแหน่งสำหรับใส่รหัสองค์กรของคุณ

Endpoint นี้รับ org_id เป็นฟิลด์ใน JSON body

รหัสองค์กรของคุณจะแสดงอยู่บนหน้าคีย์ API ในแดชบอร์ดของคุณ โดยอยู่ถัดจากคีย์นั้นๆ รหัสนี้จะเป็นรหัสเดิมในการเรียกใช้งานทุกครั้งของคุณ

ทดลองใช้เลย

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

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

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