LemuAIDocs

Tickets · 3 min read

Update a Ticket

Change fields on a LemuTickets ticket, safely with If-Match

Open in ChatGPTOpen in ClaudeMarkdown

Changes the fields you send and leaves the rest alone. To change the status, use Transition a ticket instead.

PATCH/v1/tickets/{ref}

Needs the tickets.write scope in the ticket's project. Assigning a ticket to someone other than the caller also needs tickets.assign.

Path parameters#

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

Headers#

NameRequiredDescription
If-MatchNo, but recommendedThe version you last read. If the ticket changed since, nothing is saved and you get 412. See versions and If-Match.

Request body#

Send only the fields you want to change. Send null to clear a field.

FieldTypeDescription
titlestringThe title.
descriptionstringThe body of the ticket.
prioritystringp1, p2, p3 or p4.
severitystringOptional severity.
type_idstring (UUID)Another ticket type in the same project. It must use the same workflow.
assignee_user_idstring (UUID)The person to assign. null unassigns.
assignee_team_idstring (UUID)The team to assign.
requester_idstring (UUID)Change the requester. The account follows the new requester unless you also send account_id.
account_idstring (UUID)The customer account.
labelsarray of stringsReplaces all labels.
due_atstring (date-time)The due date.
custom_fieldsobjectMerged into the existing values: keys you send are updated, others are kept.
parent_idstring (UUID)Make it a sub-task of another ticket.
estimate_minutesintegerEstimated work.
story_pointsnumberStory points, for task tracking projects.
external_idstringYour own id for the ticket.
restrictedbooleanOnly organization or project admins may change this.
restricted_toobjectWho else may see a restricted ticket: {"user_ids": [...], "roles": [...]}. Only organization or project admins may change this.

Any other field is rejected with 422.

Example request:

cURL
curl -X PATCH https://api.tickets.lemuai.com/v1/tickets/SUP-1042 \
  -H "Authorization: Bearer ltk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -H "If-Match: 4" \
  -d '{
    "priority": "p1",
    "assignee_user_id": "0e2a4c6b-8d1f-4a3e-9b5c-7d9f1a3c5e7b",
    "labels": ["refund", "escalated"],
    "custom_fields": { "refund_reference": "RF-99120" }
  }'

Response#

200 with the updated ticket object. The ETag header holds the new version.

JSON
{
  "id": "2f9c7e1a-5b3d-4c8e-9a6f-1d0e2b4c6a8f",
  "key": "SUP-1042",
  "title": "Refund not received for order 58213",
  "status": { "id": "5c8a1d3e-7f2b-4e6a-9b0c-d4e1f2a3b5c6", "name": "Open", "category": "open", "color": "blue" },
  "status_category": "open",
  "priority": "p1",
  "assignee": {
    "id": "0e2a4c6b-8d1f-4a3e-9b5c-7d9f1a3c5e7b",
    "name": "Arjun Mehta",
    "email": "arjun@yourcompany.com",
    "avatar_url": null
  },
  "labels": ["escalated", "refund"],
  "custom_fields": { "order_id": "58213", "refund_reference": "RF-99120" },
  "version": 5,
  "updated_at": "2026-11-25T09:41:07.220000+00:00"
}

The example is shortened; the response has every ticket field. A change fires the ticket.updated webhook with the changed fields, and ticket.assigned when the assignee or team changed. The new assignee becomes a watcher.

Errors#

StatuscodeWhen
403missing_capabilityYou assigned someone else without tickets.assign, or changed restricted without being an admin
404ticket_not_foundNo ticket with this key or id, or you cannot see it
412version_mismatchThe ticket changed since the version in If-Match. data.current_version has the current one
422invalid_if_matchIf-Match is not a version number
422invalid_fieldsAn unknown field was sent, or a value has the wrong type
422invalid_priority, invalid_assignee, invalid_team, invalid_typeA value does not exist or is not allowed
422workflow_changeThe new type uses another workflow
422invalid_parentA ticket cannot be its own parent
422invalid_custom_fieldsA custom field value is wrong. See field_errors