Move a request
Workforce module
POST/help-desk-requests/{id}/transitionhelpDeskRequests.transition
A team member moves the request through Open, Waiting, Resolved and Closed with a reason. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.
- Requires the capability inbox.notifications.write.
- OAuth scopes: inbox.
- Send an Idempotency-Key header. A replay with the same key returns the original response.
- Error statuses: 400, 401, 404, 409, 422, 429. Errors are RFC 9457 problem details.
Path and query parameters
| Field | Type | Required | Description |
|---|---|---|---|
| id | string (uuid) | Yes | Identifier of the help desk request. |
Request body: HelpDeskTransitionRequest
| Field | Type | Required | Description |
|---|---|---|---|
| expected_state | "Open" | "Waiting" | "Resolved" | "Closed" | Yes | The state the caller believes the row is in. |
| to_state | "Open" | "Waiting" | "Resolved" | "Closed" | Yes | Target state. |
| reason | string | Yes | Why the state changes.Constraints: length 1 to 500 |
{
"expected_state": "Open",
"to_state": "Resolved",
"reason": "Ready to go."
}Response 200: WorkforceLedgerEntry
| Field | Type | Required | Description |
|---|---|---|---|
| ledger_id | string (uuid) | Yes | The state transition ledger entry written. |
{
"ledger_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"
}Code samples
curl -X POST "$XOS_BASE_URL/help-desk-requests/0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f/transition" \
-H "Authorization: Bearer $XOS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"expected_state":"Open","to_state":"Resolved","reason":"Ready to go."}'const { data } = await xos.helpDeskRequests.transition("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", {
"expected_state": "Open",
"to_state": "Resolved",
"reason": "Ready to go."
});response = xos.help_desk_requests.transition("0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", {"expected_state": "Open", "to_state": "Resolved", "reason": "Ready to go."})xos help-desk-requests transition 0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f --data '{"expected_state":"Open","to_state":"Resolved","reason":"Ready to go."}'