Answer a request
Módulo Workforce
POST/help-desk-requests/{id}/answerhelpDeskRequests.answer
A team member answers; the first answer records the response time. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.
- Requiere la capacidad inbox.notifications.write.
- Alcances de OAuth: inbox.
- Envía el encabezado Idempotency-Key. Una repetición con la misma clave devuelve la respuesta original.
- Estados de error: 400, 401, 404, 409, 422, 429. Los errores son detalles de problema RFC 9457.
Parámetros de ruta y de consulta
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| id | string (uuid) | Sí | Identifier of the help desk request. |
Cuerpo de la solicitud: AnswerHelpDeskRequest
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| body | string | Sí | Answer.Restricciones: length 1 to 10000 |
{
"body": "Restarting the profile now."
}Respuesta 201: HelpDeskAnswer
| Campo | Tipo | Obligatorio | Descripción |
|---|---|---|---|
| message_id | string (uuid) | Sí | The message written. |
{
"message_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"
}Ejemplos de código
curl -X POST "$XOS_BASE_URL/help-desk-requests/0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f/answer" \
-H "Authorization: Bearer $XOS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"body":"Restarting the profile now."}'const { data } = await xos.helpDeskRequests.answer("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", {
"body": "Restarting the profile now."
});response = xos.help_desk_requests.answer("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", {"body": "Restarting the profile now."})xos help-desk-requests answer 0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f --data '{"body":"Restarting the profile now."}'