توثيقِ شناخت
ایک بیرر ٹوکن کے طور پر ایک API کی بھیجیں۔ کی کے پاس tickets.reply اجازت ہونی چاہیے؛ اس کے بغیر کی کو 404 کے بجائے 403 کے ساتھ مسترد کر دیا جاتا ہے۔
جہاں آپ کی تنظیم کی آئی ڈی آتی ہے
یہ اینڈ پوائنٹ JSON باڈی میں ایک فیلڈ کے طور پر org_id لیتا ہے۔
آپ کی تنظیم کی آئی ڈی آپ کے ڈیش بورڈ پر 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