Cerrar un ticket abierto
POST
/tickets/close
const url = 'https://api.matiasimpulso.com/tickets/close';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"ticketId":1,"userId":1,"farewellMessage":"example","reason":"example","skipClosingMessages":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.matiasimpulso.com/tickets/close \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "ticketId": 1, "userId": 1, "farewellMessage": "example", "reason": "example", "skipClosingMessages": true }'Finaliza la atención de un ticket cambiando su estado a cerrado, enviando despedida si aplica y registrando trazabilidad.
Authorizations
Sección titulada « Authorizations »Request Bodyrequired
Sección titulada « Request Bodyrequired » Media type application/json
object
ticketId
required
number
userId
number
farewellMessage
Se acepta por compatibilidad y se ignora: la despedida es de la conexión o del usuario.
string
reason
string
skipClosingMessages
Cerrar sin despedida ni encuesta NPS.
boolean
Example generated
{ "ticketId": 1, "userId": 1, "farewellMessage": "example", "reason": "example", "skipClosingMessages": true}Responses
Sección titulada « Responses »Ticket cerrado correctamente
Datos inválidos o transición no permitida
Sin permisos para cerrar este ticket
Ticket no encontrado