support

POST /v1/tickets

Open a support ticket.

所有 support 端点

所有开发者文档

身份验证

请将 API 密钥作为 bearer 令牌发送。该密钥必须具有 tickets.reply 权限;缺少该权限的密钥将被拒绝并返回 403 状态码,而非 404。

您的组织 ID 应填在此处

此端点接受 org_id 作为 JSON 正文中的一个字段。

您的组织ID位于控制面板的API密钥屏幕上,就在密钥本身的旁边。这是您在每次调用时使用的相同ID。

免费试用

将尖括号中的内容替换为您自己的值,并将键占位符替换为您仪表板中的一个键。

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 控制台会自动填入您真实的组织 ID 和您自己的密钥,并针对实时 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.

请求正文

名称类型必填内容简介
subjectstring
bodystringThe customer's description — becomes the first message in the thread.
priorityTicketPriorityHow urgent the ticket is. The customer may propose one; staff decide.
site_idstringThe site this is about. Must belong to the same org or the request is a 404.
invoice_idstringThe invoice this is about. Must belong to the same org or the request is a 404.
org_idstringThe organization to open it in. Required only when the caller holds tickets.reply in more than one org.
on_behalf_of_org_idstringThe 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…

响应

名称类型必填内容简介
idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
org_idUuidUUIDv7 identifier — sortable by creation time (docs/02 §8).
subjectstring
statusTicketStatusWhere 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 =…
priorityTicketPriorityHow urgent the ticket is. The customer may propose one; staff decide.
channelstringHow the ticket reached us — dashboard, api or staff. Server-decided; an open string so a future channel is additive on both sides.
site_idobject
invoice_idobject
on_behalf_of_org_idobjectThe client org a reseller opened this ticket about. Null on every ordinary ticket. ⛔ Validated as a descendant of the ticket's own org and 404d otherwise, so it can never…
assignee_nameobjectThe 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…
first_response_atobject
resolved_atobject
closed_atobject
last_message_atobject
reopened_countinteger
message_countintegerCustomer-visible messages in the thread — internal notes are not counted.
created_atstring
updated_atstring
messagesTicketMessage[]The customer-visible thread in chronological order.

此端点可能返回的错误

401 · 403 · 404 · 422 · 429