LemuAIDocs

Tickets · 2 min read

Transition a Ticket

Move a LemuTickets ticket to another status in its workflow, with an optional comment

Open in ChatGPTOpen in ClaudeMarkdown

Moves a ticket to another status, following the project's workflow. You can add a comment and change fields in the same request.

POST/v1/tickets/{ref}/transitions

Needs the tickets.write scope in the ticket's project.

Path parameters#

NameTypeRequiredDescription
refstringYesThe ticket key (SUP-1042) or id.

Headers#

NameRequiredDescription
If-MatchNoThe version you last read. If the ticket changed since, nothing happens and you get 412. See versions and If-Match.

Request body#

Send either to_status or transition_id.

FieldTypeRequiredDescription
to_statusstringOne of the twoThe status to move to, by name (Resolved, not case sensitive) or id.
transition_idstring (UUID)One of the twoA transition id from List available transitions.
commentstringNoA comment to add with the move. Some transitions require one.
comment_visibilitystringNointernal (default) for a note to your team, or public to reply to the requester.
fieldsobjectNoTicket fields to change at the same time, with the same names as Update a ticket, for example {"priority": "p3"}.

If the transition has required_fields, they must already have a value or be set in fields. For required custom fields, set them with Update a ticket first.

Example request:

cURL
curl -X POST https://api.tickets.lemuai.com/v1/tickets/SUP-1042/transitions \
  -H "Authorization: Bearer ltk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -H "If-Match: 5" \
  -d '{
    "to_status": "Resolved",
    "comment": "Your refund of Rs 4,250 was processed today. It reaches your account in 3 to 5 working days.",
    "comment_visibility": "public"
  }'

Response#

200 with the updated ticket object.

JSON
{
  "id": "2f9c7e1a-5b3d-4c8e-9a6f-1d0e2b4c6a8f",
  "key": "SUP-1042",
  "title": "Refund not received for order 58213",
  "status": { "id": "7a2b3c4d-9e5f-4a6b-b7c8-d9e0f1a2b3c4", "name": "Resolved", "category": "done", "color": "green" },
  "status_category": "done",
  "priority": "p1",
  "first_response_at": "2026-11-25T10:02:18.640000+00:00",
  "resolved_at": "2026-11-25T10:02:18.640000+00:00",
  "closed_at": null,
  "version": 8,
  "updated_at": "2026-11-25T10:02:18.640000+00:00"
}

The example is shortened; the response has every ticket field.

Moving to a status in the done category sets resolved_at (or closed_at for a final status) and fires ticket.resolved or ticket.closed. Moving a done ticket back to another category reopens it: reopened_count goes up and ticket.reopened fires. Every move fires ticket.transitioned. See Webhooks.

When the transition needs approval#

If the transition needs approval, the ticket does not move yet. The response is the ticket in its current status, with a notes object:

JSON
{
  "key": "SUP-1042",
  "status_category": "open",
  "notes": {
    "transition_blocked": true,
    "approval_request_id": "c7e9b1d3-5f2a-4c6e-8b0d-3f5a7c9e1b2d",
    "approval_required": {
      "status": "pending",
      "created": true,
      "approver_user_ids": ["0e2a4c6b-8d1f-4a3e-9b5c-7d9f1a3c5e7b"],
      "approver_roles": []
    }
  }
}

Once approved, the transition is made with the comment and fields you sent. notes can also appear with other information, such as how the ticket was assigned. Always check status_category to see where the ticket ended up.

Errors#

StatuscodeWhen
403transition_forbiddenThe transition is limited to certain roles, or to the assignee
403transition_conditionThe ticket does not meet the transition's conditions
404ticket_not_foundNo ticket with this key or id, or you cannot see it
412version_mismatchThe ticket changed since the version in If-Match
422missing_targetNeither to_status nor transition_id was sent
422invalid_statusNo status with that name or id in this ticket's workflow
422invalid_transitionThe ticket cannot move to that status from its current status. data has from and to
422transition_validationA required field or comment is missing. field_errors lists them

Moving a ticket to the status it is already in does nothing and returns 200.