创建工单
提供创建工单的功能.
地址
POST /V2/accounts/tickets
鉴权
Authorization: Bearer base64(api_key:api_secret)
请求头
curl --request GET \
--url https://livedesk.engagelab.com/V2/accounts/tickets \
--H "Content-Type: application/json" \
--H "Authorization: Bearer base64(api_key:api_secret)"
curl --request GET \
--url https://livedesk.engagelab.com/V2/accounts/tickets \
--H "Content-Type: application/json" \
--H "Authorization: Bearer base64(api_key:api_secret)"
此代碼塊在浮窗中顯示
请求体
{
"title": "打印机卡纸,无法打印",
"description": "客户反映A4纸卡在出纸口,急需处理。",
"attachments": [
{
"file_url": "https://example.com/files/error.jpg"
}
],
"requester": {
"euid": "contact_12345",
"channel_contacts": {
"channel_id": "inbox_100",
"contact_id": "-1001234567890",
"sub_contact_id": "23232323",
"followers": [
{
"id": "7562646527",
}
]
},
"submitter": {
"id": "u_12345"
},
"assignment_team": "IT支持",
"priority": "high",
"ticket_type": "incident",
"custom_fields": {
"device_sn": "PRN-2024-001",
"location": "北京总部-3楼打印室"
}
}
}
{
"title": "打印机卡纸,无法打印",
"description": "客户反映A4纸卡在出纸口,急需处理。",
"attachments": [
{
"file_url": "https://example.com/files/error.jpg"
}
],
"requester": {
"euid": "contact_12345",
"channel_contacts": {
"channel_id": "inbox_100",
"contact_id": "-1001234567890",
"sub_contact_id": "23232323",
"followers": [
{
"id": "7562646527",
}
]
},
"submitter": {
"id": "u_12345"
},
"assignment_team": "IT支持",
"priority": "high",
"ticket_type": "incident",
"custom_fields": {
"device_sn": "PRN-2024-001",
"location": "北京总部-3楼打印室"
}
}
}
此代碼塊在浮窗中顯示
请求体参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| title | String | 是 | 工单标题. |
| description | String | 否 | 工单内容描述,支持md格式. |
| attachments | Array | 否 | 附件数组,需先通过 /upload 上传. |
| file_url | String | 是 | 文件地址. |
| requester | Object | 是 | 请求者信息. |
| submitter | Object | 否 | 提交者(内部成员). |
| assignment_team | Object | 否 | 分配团队名称(需已存在). |
| priority | String | 否 | 优先级:high/medium/low,不传默认为medium. |
| ticket_type | String | 否 | 工单类型:problem/incident/question/task/否ne,不传默认为None. |
| custom_fields | Object | 否 | 自定义字段(来源信息等). |
requester
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| euid | String | 否 | 联系人唯一ID. |
| channel_contacts | Object | 否 | 渠道联系人映射(与 euid 至少存在一个). |
channel_contacts
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| channel_id | String | 是 | 渠道ID. |
| contact_id | String | 是 | 渠道联系人ID(如TG 的 chat_id). |
| sub_contact_id | String | 否 | 渠道子联系人ID(如 TG 的 topic_id / Email thread_id). |
| followers | Array | 否 | 关注者ID列表(用于渠道内推送/通知)第三方id. |
followers
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| id | String | 否 | 关注者ID. |
| name | String | 否 | 关注者名称. |
custom_fields
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| device_sn | String | 是 | 关注者ID. |
| location | String | 否 | 关注者名称. |
响应示例
成功响应
{
"code": 0,
"message": "Success",
"data": {
"ticket_id": "tk_20251104_789abc",
"message": "Ticket created successfully"
}
}
{
"code": 0,
"message": "Success",
"data": {
"ticket_id": "tk_20251104_789abc",
"message": "Ticket created successfully"
}
}
此代碼塊在浮窗中顯示
响应参数
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| ticket_id | String | 否 | 工单ID. |
| message | String | 否 | 返回消息内容。eg:"Ticket created successfully" |










