Create a new task
Creates a new task (ticket) in the specified project. Tasks are the core work units in Leadtime and represent actionable items that need to be completed. Each task belongs to a project, has a type (e.g., Feature, Bug), a status (e.g., New, In Progress), and can include assignments, deadlines, time estimates, custom fields, tags, and subtasks. The description field accepts HTML or Markdown format and will be automatically converted to the internal editor format. Project access is validated before task creation. Requires Tasks.create permission.
Some fields are dynamically required by workspace and task-type configuration. The global OpenAPI schema shows the universal request shape, but it cannot mark every conditionally required field as required for every workspace. Before creating tasks, read task type metadata from GET /tasks/types or GET /administration/task-settings/types, find the selected typeId, and include every field listed in that type requiredFields. Standard fields such as summary and estimatedTime can be listed there, as well as task custom fields. The API still validates the final request and returns field-level 400 errors when configured requirements are missing.
Assignment fields are project-scoped. assignedToId and accountableId must reference a Leadtime User.id that is assignable in the selected project: either a project user/member with access to that project, or the workspace Leadtime agent user. Read GET /projects/{id} and use its users array before assigning; if a workspace user is missing from the project, add them with PATCH /projects/{id} first.
/tasksAuthorizationOAuth2 access token · headerrequiredapi:writeAuthorizationBearer token (JWT) · headerrequiredfieldsToReturnstringresponseShapestringcompactfullLT-Response-Shapestringfullapplication/jsonaccountableIdobject | nullassignedToIdobject | nullcomponentItemEntityUniqueIdobjectcustomFieldsTaskCustomFieldValueDto[]Show propertiesHide properties
TaskCustomFieldValueDtofieldIdstringrequiredvaluestringrequireddeadlinestringdescriptionstringrequiredenableSupportContingentbooleanestimatedTimenumberguestAccessobject | nulliconobjectisChangeRequestbooleanlinkedObjectIdsstring[]prioritystringrequiredLowNormalHighproductsTaskProductSettingsDto[]Show propertiesHide properties
TaskProductSettingsDtoactiveFromFixedDatestring<date> | nullactiveFromTypestringImmediatelyProjectBillingFixedDateactiveVariantIdobject | nullcustomPricesobjectrequiredoptionsProductSettingOptionDto[]requiredShow propertiesHide properties
ProductSettingOptionDtoidstringrequiredvaluestring[]requiredquantitynumberrequiredprojectIdstringrequiredstatusIdstringrequiredsubTasksIdsstring[]summarystringtagsstring[]titlestringrequiredtypeIdstringrequiredaccountableobjectaccountableIdstringassignedToobjectassignedToIdstringbilledbooleanrequiredchildSpentTimenumberrequiredcommentsany[][]requiredcomponentItemIdobjectcreatedAtstring<date-time>requiredcustomFieldsobjectrequireddeadlinestring<date-time>descriptionstringrequiredemailDetailsobjectemailSendErrorstringemailSendErrorCodestringemailSendFailedAtstring<date-time>emailSendFailedToany[][]enableSupportContingentbooleanrequiredestimatedTimenumberguestAccessbooleanrequiredhistoryany[][]requirediconobjecticonIsGeneratingbooleanrequiredidstringrequiredisChangeRequestbooleanrequiredisParticipantbooleanrequirednotificationSettingsobjectrequiredparentTaskIdobjectparticipantsCountnumberrequiredparticipantsListany[][]requiredpriorityobjectrequiredproductsany[][]requiredprojectobjectrequiredprojectIdstringrequiredquotationsany[][]requiredshortNumbernumberrequiredskipFromBillingbooleanspentTimenumberrequiredstatusIdstringrequiredsubTasksIdsany[][]requiredsummarystringsummaryIsGeneratingbooleanrequiredtagsany[][]requiredtitlestringrequiredtitleIsGeneratingbooleanrequiredtypeIdstringrequireduserIdstringrequirederrorsobjectmessagestringstatusCodenumbercurl -X POST "https://leadtime.app/api/public/tasks" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"accountableId": "990e8400-e29b-41d4-a716-446655440004",
"assignedToId": "880e8400-e29b-41d4-a716-446655440003",
"componentItemEntityUniqueId": "unique-component-id",
"customFields": [
{
"fieldId": "550e8400-e29b-41d4-a716-446655440000",
"value": "Custom value"
}
],
"deadline": "2024-12-31T23:59:59Z",
"description": "<p>Task description in HTML</p>",
"enableSupportContingent": false,
"estimatedTime": 2.5,
"guestAccess": false,
"icon": ":rocket:",
"isChangeRequest": false,
"linkedObjectIds": [
"string"
],
"priority": "Normal",
"products": [
{
"activeFromFixedDate": "2024-01-01",
"activeFromType": "Immediately",
"activeVariantId": "550e8400-e29b-41d4-a716-446655440006",
"customPrices": {
"base": {
"priceFixed": 100.5,
"pricePerUnit": null,
"priceSubscription": null
},
"variant_550e8400": {
"priceFixed": 150,
"pricePerUnit": null,
"priceSubscription": null
}
},
"options": [
{
"id": "550e8400-e29b-41d4-a716-446655440004",
"value": [
"550e8400-e29b-41d4-a716-446655440007"
]
}
],
"quantity": 3
}
],
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"statusId": "770e8400-e29b-41d4-a716-446655440002",
"subTasksIds": [
"bb0e8400-e29b-41d4-a716-446655440006"
],
"summary": "Brief summary of the task",
"tags": [
"aa0e8400-e29b-41d4-a716-446655440005"
],
"title": "Implement new feature",
"typeId": "660e8400-e29b-41d4-a716-446655440001"
}'const response = await fetch("https://leadtime.app/api/public/tasks", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"accountableId": "990e8400-e29b-41d4-a716-446655440004",
"assignedToId": "880e8400-e29b-41d4-a716-446655440003",
"componentItemEntityUniqueId": "unique-component-id",
"customFields": [
{
"fieldId": "550e8400-e29b-41d4-a716-446655440000",
"value": "Custom value"
}
],
"deadline": "2024-12-31T23:59:59Z",
"description": "<p>Task description in HTML</p>",
"enableSupportContingent": false,
"estimatedTime": 2.5,
"guestAccess": false,
"icon": ":rocket:",
"isChangeRequest": false,
"linkedObjectIds": [
"string"
],
"priority": "Normal",
"products": [
{
"activeFromFixedDate": "2024-01-01",
"activeFromType": "Immediately",
"activeVariantId": "550e8400-e29b-41d4-a716-446655440006",
"customPrices": {
"base": {
"priceFixed": 100.5,
"pricePerUnit": null,
"priceSubscription": null
},
"variant_550e8400": {
"priceFixed": 150,
"pricePerUnit": null,
"priceSubscription": null
}
},
"options": [
{
"id": "550e8400-e29b-41d4-a716-446655440004",
"value": [
"550e8400-e29b-41d4-a716-446655440007"
]
}
],
"quantity": 3
}
],
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"statusId": "770e8400-e29b-41d4-a716-446655440002",
"subTasksIds": [
"bb0e8400-e29b-41d4-a716-446655440006"
],
"summary": "Brief summary of the task",
"tags": [
"aa0e8400-e29b-41d4-a716-446655440005"
],
"title": "Implement new feature",
"typeId": "660e8400-e29b-41d4-a716-446655440001"
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/tasks",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"accountableId": "990e8400-e29b-41d4-a716-446655440004",
"assignedToId": "880e8400-e29b-41d4-a716-446655440003",
"componentItemEntityUniqueId": "unique-component-id",
"customFields": [
{
"fieldId": "550e8400-e29b-41d4-a716-446655440000",
"value": "Custom value"
}
],
"deadline": "2024-12-31T23:59:59Z",
"description": "<p>Task description in HTML</p>",
"enableSupportContingent": False,
"estimatedTime": 2.5,
"guestAccess": False,
"icon": ":rocket:",
"isChangeRequest": False,
"linkedObjectIds": [
"string"
],
"priority": "Normal",
"products": [
{
"activeFromFixedDate": "2024-01-01",
"activeFromType": "Immediately",
"activeVariantId": "550e8400-e29b-41d4-a716-446655440006",
"customPrices": {
"base": {
"priceFixed": 100.5,
"pricePerUnit": None,
"priceSubscription": None
},
"variant_550e8400": {
"priceFixed": 150,
"pricePerUnit": None,
"priceSubscription": None
}
},
"options": [
{
"id": "550e8400-e29b-41d4-a716-446655440004",
"value": [
"550e8400-e29b-41d4-a716-446655440007"
]
}
],
"quantity": 3
}
],
"projectId": "550e8400-e29b-41d4-a716-446655440000",
"statusId": "770e8400-e29b-41d4-a716-446655440002",
"subTasksIds": [
"bb0e8400-e29b-41d4-a716-446655440006"
],
"summary": "Brief summary of the task",
"tags": [
"aa0e8400-e29b-41d4-a716-446655440005"
],
"title": "Implement new feature",
"typeId": "660e8400-e29b-41d4-a716-446655440001"
},
){
"accountable": {},
"accountableId": "string",
"assignedTo": {},
"assignedToId": "string",
"billed": true,
"childSpentTime": 0,
"comments": [
[
null
]
],
"componentItemId": {},
"createdAt": "2024-01-01T00:00:00Z",
"customFields": {},
"deadline": "2024-01-01T00:00:00Z",
"description": "string",
"emailDetails": {},
"emailSendError": "string",
"emailSendErrorCode": "string",
"emailSendFailedAt": "2024-01-01T00:00:00Z",
"emailSendFailedTo": [
[
null
]
],
"enableSupportContingent": true,
"estimatedTime": 0,
"guestAccess": true,
"history": [
[
null
]
],
"icon": {},
"iconIsGenerating": true,
"id": "string",
"isChangeRequest": true,
"isParticipant": true,
"notificationSettings": {},
"parentTaskId": {},
"participantsCount": 0,
"participantsList": [
[
null
]
],
"priority": {},
"products": [
[
null
]
],
"project": {},
"projectId": "string",
"quotations": [
[
null
]
],
"shortNumber": 0,
"skipFromBilling": true,
"spentTime": 0,
"statusId": "string",
"subTasksIds": [
[
null
]
],
"summary": "string",
"summaryIsGenerating": true,
"tags": [
[
null
]
],
"title": "string",
"titleIsGenerating": true,
"typeId": "string",
"userId": "string"
}{
"errors": {
"accountableId": [
"Invalid user: user must be assignable in the selected project"
],
"assignedToId": [
"Invalid user: user must be assignable in the selected project"
],
"description": [
"Description is required"
],
"estimatedTime": [
"This field is required by the selected task type"
],
"priority": [
"Priority is required"
],
"projectId": [
"Invalid project"
],
"statusId": [
"Invalid status"
],
"summary": [
"This field is required by the selected task type"
],
"title": [
"Title is required"
],
"typeId": [
"Invalid type"
]
},
"message": "Bad Request",
"statusCode": 400
}