Saltar al contenido

Assign a request

Módulo Workforce

POST/help-desk-requests/{id}/assignhelpDeskRequests.assign

Assigns the request to a member of its team, optionally moving it to another team. 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

helpDeskRequests.assign: Parámetros de ruta y de consulta
CampoTipoObligatorioDescripción
idstring (uuid)SíIdentifier of the help desk request.

Cuerpo de la solicitud: AssignHelpDeskRequest

helpDeskRequests.assign: AssignHelpDeskRequest
CampoTipoObligatorioDescripción
assignee_membership_idstring (uuid) | nullSíTeam member; null unassigns.
help_desk_team_idstring (uuid)NoTeam to move the request to.
{
  "assignee_membership_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "help_desk_team_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"
}

Respuesta 200: HelpDeskRequest

helpDeskRequests.assign: HelpDeskRequest
CampoTipoObligatorioDescripción
idstring (uuid)SíIdentifier of the help desk request.
org_idstring (uuid)SíIdentifier of the owning organization, derived from the parent row and never accepted from the caller.
created_atstring (date-time)SíWhen the row was created.
created_bystring (uuid) | nullSíPerson who created the row; null for seed, platform or system writes.
updated_atstring (date-time)SíWhen the row was last updated.
updated_bystring (uuid) | nullSíPerson who last updated the row; null for seed, platform or system writes.
ticket_numberstringSíDisplay number.Restricciones: pattern ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$
help_desk_team_idstring (uuid)SíIdentifier of the team the request is routed to.
category"Question" | "Problem" | "Access" | "Billing" | "Account" | "Feature Request"SíWhat it is about.
severity"Severity 3" | "Severity 1" | "Severity 2" | "Severity 4"SíSeverity.
subjectstringSíOne-line summary.Restricciones: length 1 to 200
bodystringSíWhat happened and what is needed.Restricciones: length 1 to 20000
ticket_state"Open" | "Waiting" | "Resolved" | "Closed"SíRequest state.
membership_idstring (uuid)SíIdentifier of the member who asked.
assignee_membership_idstring (uuid) | nullSíIdentifier of the team member it is assigned to.
help_desk_response_due_atstring (date-time) | nullSíWhen the first response is due.
first_responded_atstring (date-time) | nullSíWhen the team first answered.
{
  "id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "org_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "created_at": "2026-10-08T14:30:00Z",
  "created_by": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "updated_at": "2026-10-08T14:30:00Z",
  "updated_by": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "ticket_number": "SUP-0001",
  "help_desk_team_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "category": "Question",
  "severity": "Severity 3",
  "subject": "Tablet will not sign in",
  "body": "The dock tablet shows a blank screen.",
  "ticket_state": "Open",
  "membership_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "assignee_membership_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "help_desk_response_due_at": "2026-10-08T14:30:00Z",
  "first_responded_at": "2026-10-08T14:30:00Z"
}

Ejemplos de código

curl -X POST "$XOS_BASE_URL/help-desk-requests/0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f/assign" \
  -H "Authorization: Bearer $XOS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"assignee_membership_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","help_desk_team_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"}'
const { data } = await xos.helpDeskRequests.assign("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", {
    "assignee_membership_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
    "help_desk_team_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"
  });
response = xos.help_desk_requests.assign("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", {"assignee_membership_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", "help_desk_team_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"})
xos help-desk-requests assign 0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f --data '{"assignee_membership_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","help_desk_team_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"}'