Skip to main content
PATCH
/
itsm
/
tickets
/
{ticket_id}
Update ITSM Ticket by ID
curl --request PATCH \
  --url https://api.leen.dev/v1/itsm/tickets/{ticket_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-CONNECTION-ID: <api-key>' \
  --data '
{
  "status": "<string>",
  "priority": "<string>",
  "assigned_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "description": "<string>"
}
'
import requests

url = "https://api.leen.dev/v1/itsm/tickets/{ticket_id}"

payload = {
"status": "<string>",
"priority": "<string>",
"assigned_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>"
}
headers = {
"X-CONNECTION-ID": "<api-key>",
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}

response = requests.patch(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PATCH',
headers: {
'X-CONNECTION-ID': '<api-key>',
'X-API-KEY': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
status: '<string>',
priority: '<string>',
assigned_user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
description: '<string>'
})
};

fetch('https://api.leen.dev/v1/itsm/tickets/{ticket_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.leen.dev/v1/itsm/tickets/{ticket_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => '<string>',
'priority' => '<string>',
'assigned_user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>",
"X-CONNECTION-ID: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.leen.dev/v1/itsm/tickets/{ticket_id}"

payload := strings.NewReader("{\n \"status\": \"<string>\",\n \"priority\": \"<string>\",\n \"assigned_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")

req, _ := http.NewRequest("PATCH", url, payload)

req.Header.Add("X-CONNECTION-ID", "<api-key>")
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.patch("https://api.leen.dev/v1/itsm/tickets/{ticket_id}")
.header("X-CONNECTION-ID", "<api-key>")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"<string>\",\n \"priority\": \"<string>\",\n \"assigned_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.leen.dev/v1/itsm/tickets/{ticket_id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Patch.new(url)
request["X-CONNECTION-ID"] = '<api-key>'
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"<string>\",\n \"priority\": \"<string>\",\n \"assigned_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "name": "<string>",
  "status": "<string>",
  "vendor_attributes": {
    "id": "<string>",
    "vendor": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "type": "<string>",
    "type_id": "<string>",
    "status": "<string>",
    "priority": "<string>",
    "data": {
      "vendor": "JIRA",
      "id": "<string>",
      "statusCategory": "<string>",
      "customFields": {}
    }
  },
  "active": true,
  "type": "<string>",
  "type_id": "<string>",
  "parent_ticket_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "description": "<string>",
  "ticket_created_at": "2023-11-07T05:31:56Z",
  "due_date": "2023-11-07T05:31:56Z",
  "closed_at": "2023-11-07T05:31:56Z",
  "assigned_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "status_updated_at": "2023-11-07T05:31:56Z",
  "project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tags": [
    "<string>"
  ],
  "priority": "<string>",
  "url": "<string>",
  "identifier": "<string>"
}
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"detail": [
{}
]
}
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"detail": [
{}
]
}
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"detail": [
{}
]
}
{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"detail": [
{}
]
}

Authorizations

X-CONNECTION-ID
string
header
required
X-API-KEY
string
header
required

Path Parameters

ticket_id
string<uuid>
required

Body

application/json
status
string | null

Status of the Ticket

priority
string | null

Priority of the Ticket

assigned_user_id
string<uuid> | null

User ID assigned to the Ticket

name
string | null

Name/Title of the Ticket

description
string | null

Description of the Ticket

Response

Successful Response

id
string<uuid>
required

Leen's UUID for the Ticket

name
string
required

Name of the Ticket

status
string
required

Status of the Ticket

vendor_attributes
ITSM Ticket Vendor Attributes · object
required

Vendor-specific attributes of the Ticket

active
boolean | null

Whether the Ticket is active

type
string | null

Type of the Ticket (e.g., Epic, Story, Task, Bug)

type_id
string | null

Vendor-specific type ID (e.g., Jira issue type ID)

parent_ticket_id
string<uuid> | null

Parent Ticket ID (for sub-tasks)

description
string | null

Description of the Ticket

ticket_created_at
string<date-time> | null

Creation time of the Ticket in the vendor system

due_date
string<date-time> | null

Due date of the Ticket

closed_at
string<date-time> | null

Closing time of the Ticket

assigned_user_id
string<uuid> | null

User ID assigned to the Ticket

created_by_user_id
string<uuid> | null

User ID who created the Ticket

status_updated_at
string<date-time> | null

Last status update time

project_id
string<uuid> | null

Project ID the Ticket belongs to

tags
string[] | null

Tags associated with the Ticket

priority
string | null

Priority of the Ticket

url
string | null

URL of the Ticket

identifier
string | null

User-provided tracking identifier for the Ticket