प्रमाणीकरण
एपिआई कुञ्जीलाई बियरर टोकन (bearer token) को रूपमा पठाउनुहोस्। कुञ्जीसँग tickets.reply अनुमति हुनुपर्छ; अनुमति नभएको कुञ्जीलाई 404 होइन, 403 मार्फत अस्वीकार गरिन्छ।
तपाईंको संस्थाको आइडी राख्ने ठाउँ
यो इन्डपोटले JSON बडीमा एक फिल्डको रूपमा org_id लिन्छ।
तपाईंको संस्थाको आइडी (ID) तपाईंको ड्यासबोर्डमा रहेको API कुञ्जीहरू (keys) स्क्रिनमा, कुञ्जीको छेउमा हुन्छ। तपाईंले गर्ने प्रत्येक कलमा यही आइडी प्रयोग हुन्छ।
प्रयास गर्नुहोस्
कोणीय कोष्ठकभित्र भएका जुनसुकै कुरालाई आफ्नो मानहरूद्वारा बदल्नुहोस्, र मुख्य स्थानहोल्डरलाई तपाईंको ड्यासबोर्डको कुञ्जीद्वारा बदल्नुहोस्।
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