LemuAIDocs

Tickets · 1 min read

Link Tickets

Link two LemuTickets tickets: relates to, blocks, duplicates, caused by or clones

Open in ChatGPTOpen in ClaudeMarkdown

Links one ticket to another, for example to show that a delivery issue blocks a refund, or that two complaints are about the same problem.

POST/v1/tickets/{ref}/links

Use a key with the tickets.write scope. You must be able to see both tickets.

Path parameters#

NameTypeRequiredDescription
refstringYesThe ticket the link starts from: key (SUP-1042) or id.

Request body#

FieldTypeRequiredDescription
targetstringYesThe other ticket: key or id.
kindstringNoHow they relate, read as "this ticket kind target". Default relates_to.
kindMeaningSeen from the target as
relates_toThe tickets are relatedrelates_to
blocksThis ticket blocks the targetblocked_by
duplicatesThis ticket duplicates the targetduplicated_by
caused_byThis ticket was caused by the targetcauses
clonesThis ticket is a copy of the targetcloned_by

Example request:

cURL
curl -X POST https://api.tickets.lemuai.com/v1/tickets/SUP-1042/links \
  -H "Authorization: Bearer ltk_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{ "target": "SUP-1039", "kind": "caused_by" }'

Response#

201

JSON
{
  "id": "0a2c4e6b-8d0f-4a1c-9e3b-5d7f9a1c3e5b",
  "kind": "caused_by",
  "target": "SUP-1039"
}
FieldTypeDescription
idstringThe link's id.
kindstringThe link kind.
targetstringThe target ticket's key.

Linking the same two tickets with the same kind again returns the existing link, so it is safe to retry. A new link fires the ticket.linked webhook on the source ticket.

Errors#

StatuscodeWhen
404ticket_not_foundEither ticket does not exist, or you cannot see it
422invalid_linkA ticket cannot link to itself
422invalid_fieldstarget is missing or kind is not one of the values above