Skip to main content
POST
/
itsm
/
tickets
Create ITSM Ticket
curl --request POST \
  --url https://api.leen.dev/v1/itsm/tickets \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --header 'X-CONNECTION-ID: <api-key>' \
  --data '
{
  "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>"
}
'
{
  "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>",
  "parent_ticket_vendor_id": "<string>",
  "assigned_user_vendor_id": "<string>",
  "type_vendor_id": "<string>"
}

Authorizations

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

Body

application/json
name
string
required

Name/Title of the Ticket

project_id
string<uuid> | null

Leen project UUID. Either project_id or project_vendor_id must be provided.

project_vendor_id
string | null

Vendor's project identifier (e.g., Jira project key 'PROJ'). Alternative to project_id.

type
string | null

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

type_vendor_id
string | null

Vendor issue type ID (e.g., Jira issue type ID). Alternative to type — at least one must be provided. Preferred over type when both are given.

type_id
string | null
deprecated

Deprecated: use type_vendor_id instead. Vendor issue type ID.

description
string | null

Description of the Ticket

status
string | null

Status of the Ticket. Note: Jira does not support setting status at creation time — tickets are always created with the workflow's default status. Use the update endpoint to change status after creation.

priority
string | null

Priority of the Ticket

assigned_user_id
string<uuid> | null

Leen user UUID. Either assigned_user_id or assigned_user_vendor_id can be provided.

assigned_user_vendor_id
string | null

Vendor's user identifier (e.g., Jira accountId). Alternative to assigned_user_id.

parent_ticket_id
string<uuid> | null

Parent Ticket ID (for sub-tasks)

parent_ticket_vendor_id
string | null

Vendor's ticket identifier (e.g., Jira issue key 'PROJ-123'). Alternative to parent_ticket_id.

identifier
string | null

User-provided tracking identifier (auto-generated from project-type-hash if not provided)

Response

Successful Response

Response model for ticket creation. Extends ScopedITSMTicketRespModel with vendor ID fields that are echoed back when vendor IDs were provided in the request (rather than Leen UUIDs).

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

parent_ticket_vendor_id
string | null

Vendor key of the parent ticket (e.g. 'PROJ-42'). Populated when the request used parent_ticket_vendor_id.

assigned_user_vendor_id
string | null

Vendor account ID of the assigned user (e.g. Jira accountId). Populated when the request used assigned_user_vendor_id.

type_vendor_id
string | null

Vendor issue type ID (e.g. '10034'). Populated when the request used type_vendor_id.