Create Ticket
Developers can create tickets via the API. After the ticket is created, the ticket ID will be returned.
Request Method
POST
Request URL
https://livedesk-api.engagelab.com/api/v2/accounts/tickets
Authentication
See the authentication description in API Overview for details.
Request
Request Example
curl -X POST 'https://livedesk-api.engagelab.com/api/v2/accounts/tickets' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic base64(api_key:api_secret)' \
-d '{
"title": "Printer paper jam, unable to print",
"description": "Customer reported A4 paper jammed at the output tray, needs urgent handling.",
"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",
"name": "Zhang San"
}
]
}
},
"submitter": {
"id": "u_12345"
},
"assignment_team": "IT Support",
"priority": "high",
"ticket_type": "incident",
"custom_fields": {
"device_sn": "PRN-2024-001",
"location": "Beijing HQ - 3rd Floor Print Room"
}
}'
curl -X POST 'https://livedesk-api.engagelab.com/api/v2/accounts/tickets' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic base64(api_key:api_secret)' \
-d '{
"title": "Printer paper jam, unable to print",
"description": "Customer reported A4 paper jammed at the output tray, needs urgent handling.",
"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",
"name": "Zhang San"
}
]
}
},
"submitter": {
"id": "u_12345"
},
"assignment_team": "IT Support",
"priority": "high",
"ticket_type": "incident",
"custom_fields": {
"device_sn": "PRN-2024-001",
"location": "Beijing HQ - 3rd Floor Print Room"
}
}'
This code block in the floating window
Request Headers
| Field | Type | Description |
|---|---|---|
| Authorization | string | Use Authorization: Basic base64(API Key:API Secret) for authentication. Please go to the API Key page to get the API Key and API Secret, and connect them with a colon before Base64 encoding. |
| Content-Type | application/json | Data type, value is application/json. |
Body Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| title | String | Yes | Ticket title. |
| description | String | No | Ticket content description, supports md format. |
| attachments | Array | No | Array of attachments, need to upload via /upload first. |
| file_url | String | Yes | File address. |
| requester | Object | Yes | Requester information. |
| euid | String | No | Contact unique ID. |
| channel_contacts | Object | No | Channel contact mapping (at least one with euid exists). |
| channel_id | String | Yes | Channel ID. |
| contact_id | String | Yes | Channel contact ID (e.g., TG chat_id). |
| sub_contact_id | String | No | Channel sub-contact ID (e.g., TG topic_id / Email thread_id). |
| followers | Array | No | Follower ID information (for push/notification within the channel), including id and name fields. |
| submitter | Object | No | Submitter ID (internal member account ID), including id field. |
| assignment_team | String | No | Assigned team name (must exist). |
| priority | String | No | Priority: high/medium/low, default is medium if not passed. |
| ticket_type | String | No | Ticket type: problem/incident/question/task/None, default is None if not passed. |
| custom_fields | Object | No | Custom fields (source information, etc.), using key-value format. |
Response Example
Success Response
{
"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"
}
}
This code block in the floating window
Response Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| ticket_id | String | No | Ticket ID. |
| message | String | No | Return message content. eg: "Ticket created successfully" |

