Bulk Create ITSM Tickets (Async)
curl --request POST \
--url https://api.leen.dev/v1/itsm/tickets/bulk \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-CONNECTION-ID: <api-key>' \
--data '
{
"tickets": [
{
"name": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_vendor_id": "<string>",
"type": "<string>",
"type_vendor_id": "<string>",
"type_id": "<string>",
"description": "<string>",
"status": "<string>",
"priority": "<string>",
"assigned_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assigned_user_vendor_id": "<string>",
"parent_ticket_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_ticket_vendor_id": "<string>",
"identifier": "<string>"
}
]
}
'import requests
url = "https://api.leen.dev/v1/itsm/tickets/bulk"
payload = { "tickets": [
{
"name": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_vendor_id": "<string>",
"type": "<string>",
"type_vendor_id": "<string>",
"type_id": "<string>",
"description": "<string>",
"status": "<string>",
"priority": "<string>",
"assigned_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assigned_user_vendor_id": "<string>",
"parent_ticket_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_ticket_vendor_id": "<string>",
"identifier": "<string>"
}
] }
headers = {
"X-CONNECTION-ID": "<api-key>",
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-CONNECTION-ID': '<api-key>',
'X-API-KEY': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
tickets: [
{
name: '<string>',
project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
project_vendor_id: '<string>',
type: '<string>',
type_vendor_id: '<string>',
type_id: '<string>',
description: '<string>',
status: '<string>',
priority: '<string>',
assigned_user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
assigned_user_vendor_id: '<string>',
parent_ticket_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
parent_ticket_vendor_id: '<string>',
identifier: '<string>'
}
]
})
};
fetch('https://api.leen.dev/v1/itsm/tickets/bulk', 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/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tickets' => [
[
'name' => '<string>',
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'project_vendor_id' => '<string>',
'type' => '<string>',
'type_vendor_id' => '<string>',
'type_id' => '<string>',
'description' => '<string>',
'status' => '<string>',
'priority' => '<string>',
'assigned_user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'assigned_user_vendor_id' => '<string>',
'parent_ticket_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'parent_ticket_vendor_id' => '<string>',
'identifier' => '<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/bulk"
payload := strings.NewReader("{\n \"tickets\": [\n {\n \"name\": \"<string>\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_vendor_id\": \"<string>\",\n \"type\": \"<string>\",\n \"type_vendor_id\": \"<string>\",\n \"type_id\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": \"<string>\",\n \"priority\": \"<string>\",\n \"assigned_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assigned_user_vendor_id\": \"<string>\",\n \"parent_ticket_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parent_ticket_vendor_id\": \"<string>\",\n \"identifier\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.leen.dev/v1/itsm/tickets/bulk")
.header("X-CONNECTION-ID", "<api-key>")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tickets\": [\n {\n \"name\": \"<string>\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_vendor_id\": \"<string>\",\n \"type\": \"<string>\",\n \"type_vendor_id\": \"<string>\",\n \"type_id\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": \"<string>\",\n \"priority\": \"<string>\",\n \"assigned_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assigned_user_vendor_id\": \"<string>\",\n \"parent_ticket_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parent_ticket_vendor_id\": \"<string>\",\n \"identifier\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leen.dev/v1/itsm/tickets/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CONNECTION-ID"] = '<api-key>'
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tickets\": [\n {\n \"name\": \"<string>\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_vendor_id\": \"<string>\",\n \"type\": \"<string>\",\n \"type_vendor_id\": \"<string>\",\n \"type_id\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": \"<string>\",\n \"priority\": \"<string>\",\n \"assigned_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assigned_user_vendor_id\": \"<string>\",\n \"parent_ticket_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parent_ticket_vendor_id\": \"<string>\",\n \"identifier\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>"
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"detail": [
{}
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"detail": [
{}
]
}Tickets
Bulk Create ITSM Tickets (Async)
Create multiple ITSM tickets asynchronously.
Creates an async job to process the bulk ticket creation and returns immediately with a job_id. Use GET /jobs/ to poll for job completion and results.
Request:
- tickets: List of 1-50 ticket creation requests
Response (202 Accepted):
- job_id: UUID to poll for job status and results
Job Status Polling:
- Use GET /jobs/ to check status
- Status flow: QUEUED → RUNNING → SUCCESS/FAILED
- On SUCCESS: all tickets were created; no per-ticket result data is returned
- On FAILED: job.failure_reason contains a JSON object with per-ticket breakdown:
- total/succeeded/failed counts
- results[]: per-ticket entries with success, error, request_index, identifier
This follows the vendor-first pattern:
- Job creates tickets in the vendor system (e.g., JIRA) using bulk API
- For each successful vendor creation, persists to local database
Performance: Returns immediately; processing happens asynchronously
POST
/
itsm
/
tickets
/
bulk
Bulk Create ITSM Tickets (Async)
curl --request POST \
--url https://api.leen.dev/v1/itsm/tickets/bulk \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-CONNECTION-ID: <api-key>' \
--data '
{
"tickets": [
{
"name": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_vendor_id": "<string>",
"type": "<string>",
"type_vendor_id": "<string>",
"type_id": "<string>",
"description": "<string>",
"status": "<string>",
"priority": "<string>",
"assigned_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assigned_user_vendor_id": "<string>",
"parent_ticket_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_ticket_vendor_id": "<string>",
"identifier": "<string>"
}
]
}
'import requests
url = "https://api.leen.dev/v1/itsm/tickets/bulk"
payload = { "tickets": [
{
"name": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"project_vendor_id": "<string>",
"type": "<string>",
"type_vendor_id": "<string>",
"type_id": "<string>",
"description": "<string>",
"status": "<string>",
"priority": "<string>",
"assigned_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"assigned_user_vendor_id": "<string>",
"parent_ticket_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"parent_ticket_vendor_id": "<string>",
"identifier": "<string>"
}
] }
headers = {
"X-CONNECTION-ID": "<api-key>",
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'X-CONNECTION-ID': '<api-key>',
'X-API-KEY': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
tickets: [
{
name: '<string>',
project_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
project_vendor_id: '<string>',
type: '<string>',
type_vendor_id: '<string>',
type_id: '<string>',
description: '<string>',
status: '<string>',
priority: '<string>',
assigned_user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
assigned_user_vendor_id: '<string>',
parent_ticket_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
parent_ticket_vendor_id: '<string>',
identifier: '<string>'
}
]
})
};
fetch('https://api.leen.dev/v1/itsm/tickets/bulk', 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/bulk",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tickets' => [
[
'name' => '<string>',
'project_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'project_vendor_id' => '<string>',
'type' => '<string>',
'type_vendor_id' => '<string>',
'type_id' => '<string>',
'description' => '<string>',
'status' => '<string>',
'priority' => '<string>',
'assigned_user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'assigned_user_vendor_id' => '<string>',
'parent_ticket_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'parent_ticket_vendor_id' => '<string>',
'identifier' => '<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/bulk"
payload := strings.NewReader("{\n \"tickets\": [\n {\n \"name\": \"<string>\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_vendor_id\": \"<string>\",\n \"type\": \"<string>\",\n \"type_vendor_id\": \"<string>\",\n \"type_id\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": \"<string>\",\n \"priority\": \"<string>\",\n \"assigned_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assigned_user_vendor_id\": \"<string>\",\n \"parent_ticket_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parent_ticket_vendor_id\": \"<string>\",\n \"identifier\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.leen.dev/v1/itsm/tickets/bulk")
.header("X-CONNECTION-ID", "<api-key>")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"tickets\": [\n {\n \"name\": \"<string>\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_vendor_id\": \"<string>\",\n \"type\": \"<string>\",\n \"type_vendor_id\": \"<string>\",\n \"type_id\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": \"<string>\",\n \"priority\": \"<string>\",\n \"assigned_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assigned_user_vendor_id\": \"<string>\",\n \"parent_ticket_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parent_ticket_vendor_id\": \"<string>\",\n \"identifier\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.leen.dev/v1/itsm/tickets/bulk")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CONNECTION-ID"] = '<api-key>'
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tickets\": [\n {\n \"name\": \"<string>\",\n \"project_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"project_vendor_id\": \"<string>\",\n \"type\": \"<string>\",\n \"type_vendor_id\": \"<string>\",\n \"type_id\": \"<string>\",\n \"description\": \"<string>\",\n \"status\": \"<string>\",\n \"priority\": \"<string>\",\n \"assigned_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"assigned_user_vendor_id\": \"<string>\",\n \"parent_ticket_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"parent_ticket_vendor_id\": \"<string>\",\n \"identifier\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"job_id": "<string>"
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"detail": [
{}
]
}{
"type": "<string>",
"code": "<string>",
"message": "<string>",
"detail": [
{}
]
}Body
application/json
List of tickets to create (1-50 items)
Required array length:
1 - 50 elementsShow child attributes
Show child attributes
Response
Successful Response
Response model for job creation endpoints that return a job ID.
Job ID for tracking async operation status
⌘I