跳到正文
会nokai.studio

Support tickets

Auth: 需要 Authorization: Bearer zpk_...。


POST /v1/support/tickets

开启一个新的支持工单。

Request body

{
  "subject": "Job stuck in queuing for 10 minutes",
  "category": "bug",
  "severity": "high",
  "description": "Task ID task_01abc... has been in queuing state for over 10 minutes. Expected completion in under 2 minutes based on docs."
}
字段类型必填备注
subjectstring是3-200 字符。
categorystring是bug 或 question 或 feature_request 或 billing 或 integration 或 other
severitystring否low 或 medium 或 high 或 critical。默认为 medium。
descriptionstring是20-2000 字符。请附上 task IDs、错误码、request IDs。

Response 201

返回一个 SupportTicketDetail,包含该工单和一个空的 messages[] 数组。


GET /v1/support/tickets

列出你的支持工单。

Response 200

{
  "data": [
    {
      "id": "ticket_uuid",
      "customer_id": "cust_uuid",
      "user_id": "user_uuid",
      "subject": "Job stuck in queuing for 10 minutes",
      "category": "bug",
      "severity": "high",
      "status": "open",
      "description": "...",
      "last_message_at": null,
      "message_count": 0,
      "created_at": "2026-05-29T12:00:00Z",
      "updated_at": "2026-05-29T12:00:00Z"
    }
  ]
}

工单状态: open | in_progress | waiting_on_customer | resolved | closed


GET /v1/support/tickets/:id

获取工单详情,包括完整的消息会话。

Response 200

与列表项相同,外加 messages[]:

{
  "messages": [
    {
      "id": "msg_uuid",
      "ticket_id": "ticket_uuid",
      "author_type": "customer",
      "author_id": "user_uuid",
      "body": "Task ID task_01abc... has been in queuing state...",
      "created_at": "2026-05-29T12:00:00Z"
    }
  ]
}

POST /v1/support/tickets/:id/messages

回复一个工单。

Request body

{ "body": "Here is the request_id from the error: req_01xyz..." }
字段必填备注
body是1-4000 字符。

Response 201

返回已创建的消息。