Mettre à jour un ticket
Mettre à jour un ticket vous permet de modifier les informations du ticket.
Méthode de requête
PUT
Point de terminaison
https://livedesk-api.engagelab.com/api/v2/accounts/tickets/:ticket_id
Authentification
Pour plus de détails, consultez la description de la méthode d'authentification dans la Vue d'ensemble de l'API.
Requête
Exemple de requête
curl -X PUT 'https://livedesk-api.engagelab.com/api/v2/accounts/tickets/:ticket_id' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic base64(api_key:api_secret)' \
-d '{
"title": "Printer jammed and unable to print (updated)",
"description": "The customer reported that A4 paper is jammed in the output tray and needs urgent handling.\nA technician has been dispatched.",
"attachments": [
{
"file_url": "https://example.com/files/error-photo.jpg"
}
],
"priority": "normal",
"ticket_type": "incident",
"custom_fields": {
"department": "IT Support",
"device_sn": "PRN-2024-001",
"location": "Beijing Headquarters - 3rd Floor Print Room",
"resolution_note": "Replaced the paper feeder"
},
"tags": ["printer", "hardware", "resolved"]
}'
curl -X PUT 'https://livedesk-api.engagelab.com/api/v2/accounts/tickets/:ticket_id' \
-H 'Content-Type: application/json' \
-H 'Authorization: Basic base64(api_key:api_secret)' \
-d '{
"title": "Printer jammed and unable to print (updated)",
"description": "The customer reported that A4 paper is jammed in the output tray and needs urgent handling.\nA technician has been dispatched.",
"attachments": [
{
"file_url": "https://example.com/files/error-photo.jpg"
}
],
"priority": "normal",
"ticket_type": "incident",
"custom_fields": {
"department": "IT Support",
"device_sn": "PRN-2024-001",
"location": "Beijing Headquarters - 3rd Floor Print Room",
"resolution_note": "Replaced the paper feeder"
},
"tags": ["printer", "hardware", "resolved"]
}'
Afficher ce bloc de code dans la fenêtre flottante
En-têtes de requête
| Field | Type | Description |
|---|---|---|
| Authorization | string | Utilisez Authorization: Basic base64(API Key:API Secret) pour l'authentification. Accédez à la page des clés API pour obtenir l'API Key et l'API Secret, joignez-les avec un deux-points, puis encodez le résultat en Base64. |
| Content-Type | application/json | Type de données. La valeur est application/json. |
Paramètres de chemin
| Field | Type | Required | Description |
|---|---|---|---|
| ticket_id | String | Yes | ID du ticket. |
Paramètres du corps de la requête
| Field | Type | Required | Description |
|---|---|---|---|
| title | String | Yes | Titre du ticket. |
| description | String | Yes | Description détaillée du ticket (Markdown pris en charge). |
| attachments | Array | No | Liste des pièces jointes au niveau du ticket.file_url : URL du fichier. |
| priority | String | No | Priorité : low / medium / high / urgent. La valeur par défaut est medium si elle n'est pas fournie. |
| ticket_type | String | No | Type de ticket : incident / question / problem / task. |
| custom_fields | Object | No | Champs personnalisés, tels que le numéro de série de l'appareil ou le numéro de commande. |
| tags | Array | No | Tags du ticket. |
Réponse
Réponse réussie
{
"code": 0,
"message": "Success",
"data": {
"ticket_id": "tk_20251104_789abc",
"updated_at": "2025-11-04T10:30:00+08:00"
}
}
{
"code": 0,
"message": "Success",
"data": {
"ticket_id": "tk_20251104_789abc",
"updated_at": "2025-11-04T10:30:00+08:00"
}
}
Afficher ce bloc de code dans la fenêtre flottante
Paramètres de réponse
| Field | Type | Required | Description |
|---|---|---|---|
| ticket_id | String | No | ID du ticket. |
| updated_at | String | No | Date et heure de mise à jour. |










