การยืนยันตัวตน
ส่ง API key ในรูปแบบ bearer token คีย์ดังกล่าวต้องมีสิทธิ์ tickets.reply หากไม่มีสิทธิ์ ระบบจะปฏิเสธด้วยรหัส 403 แทนที่จะเป็น 404
ตำแหน่งสำหรับใส่รหัสองค์กรของคุณ
Endpoint นี้รับ org_id เป็นฟิลด์ใน JSON body
รหัสองค์กรของคุณจะแสดงอยู่บนหน้าคีย์ API ในแดชบอร์ดของคุณ โดยอยู่ถัดจากคีย์นั้นๆ รหัสนี้จะเป็นรหัสเดิมในการเรียกใช้งานทุกครั้งของคุณ
ทดลองใช้เลย
แทนที่สิ่งใดๆ ที่อยู่ภายในวงเล็บแหลมด้วยค่าของคุณเอง และตัวยึดตำแหน่งคีย์ด้วยคีย์จากแดชบอร์ดของคุณ
curl -X POST https://api.zinndigital.com/v1/tickets \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "subject": <string>, "body": <string> }'เข้าสู่ระบบแล้วใช่ไหม คอนโซล API ในแดชบอร์ดของคุณจะเติมรหัสองค์กรจริงและคีย์ของคุณเองโดยอัตโนมัติ และทำการส่งคำขอไปยัง API จริง เพื่อให้คุณเห็นผลลัพธ์ที่เป็นข้อมูลจริง เปิดจุดสิ้นสุดนี้ในคอนโซล API
รายละเอียด
Opens a ticket in `open` with the supplied `body` as its first message, and publishes `ticket.created` (which sends the customer a localized acknowledgement via the notification consumer). `channel` is server-decided — it is not accepted from the client. A supplied `site_id` or `invoice_id` must belong to the same org or the request is a `404`. Requires `tickets.reply`.
เนื้อหาคำขอ
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
subject | string | ใช่ | — |
body | string | ใช่ | The customer's description — becomes the first message in the thread. |
priority | TicketPriority | ไม่ใช่ | How urgent the ticket is. The customer may propose one; staff decide. |
site_id | string | ไม่ใช่ | The site this is about. Must belong to the same org or the request is a 404. |
invoice_id | string | ไม่ใช่ | The invoice this is about. Must belong to the same org or the request is a 404. |
org_id | string | ไม่ใช่ | The organization to open it in. Required only when the caller holds `tickets.reply` in more than one org. |
on_behalf_of_org_id | string | ไม่ใช่ | The client org this is about — a reseller escalating to Zinn® on their client's behalf. Must be a **descendant** of the ticket's org or the request is a `404`; your client never… |
การตอบกลับ
| ชื่อ | ประเภท | จำเป็นต้องมี | ลักษณะของสิ่งนี้ |
|---|---|---|---|
id | Uuid | ใช่ | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
org_id | Uuid | ใช่ | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
subject | string | ใช่ | — |
status | TicketStatus | ใช่ | Where a ticket sits in its lifecycle. `open` = waiting on us; `pending` = waiting on the customer; `solved` = we believe it is resolved and a customer reply reopens it; `closed`… |
priority | TicketPriority | ใช่ | How urgent the ticket is. The customer may propose one; staff decide. |
channel | string | ใช่ | How the ticket reached us — `dashboard`, `api` or `staff`. Server-decided; an open string so a future channel is additive on both sides. |
site_id | object | ไม่ใช่ | — |
invoice_id | object | ไม่ใช่ | — |
on_behalf_of_org_id | object | ไม่ใช่ | The **client org** a reseller opened this ticket about. Null on every ordinary ticket. ⛔ Validated as a descendant of the ticket's own org and `404`d otherwise, so it can never… |
assignee_name | object | ใช่ | The owning agent's display name (first name), or null while unassigned. The customer sees a **name** so they know a person owns their ticket; the agent's id and email are staff-… |
first_response_at | object | ไม่ใช่ | — |
resolved_at | object | ไม่ใช่ | — |
closed_at | object | ไม่ใช่ | — |
last_message_at | object | ไม่ใช่ | — |
reopened_count | integer | ใช่ | — |
message_count | integer | ใช่ | Customer-visible messages in the thread — internal notes are not counted. |
created_at | string | ใช่ | — |
updated_at | string | ใช่ | — |
messages | TicketMessage[] | ใช่ | The customer-visible thread in chronological order. |
ข้อผิดพลาดที่เอนด์พอยต์นี้สามารถส่งกลับได้
401 · 403 · 404 · 422 · 429