Remove a subtask from a task
Removes the parent-child relationship between a task and its subtask by setting the subtask parentTaskId to null. The subtask itself is not deleted - it becomes a standalone task again. This is useful when reorganizing task hierarchies or when a subtask needs to be promoted to a main task. The parent task identifier can be either a UUID or a numeric shortNumber. The subtaskId must be a valid UUID. Requires Tasks.editAnyTitleAndDescription permission.
DELETE
/tasks/{identifier}/subtasks/{subtaskId}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
identifierstringrequiredParent task UUID or numeric shortNumber
subtaskIdstringrequiredSubtask UUID to remove
Responses
200Subtask removed successfully
accountableobjectAccountable user details
accountableIdstringAccountable user ID
assignedToobjectAssigned user details
assignedToIdstringAssigned user ID
billedbooleanrequiredWhether task is billed
childSpentTimenumberrequiredChild tasks spent time in minutes
commentsany[][]requiredTask comments; each `body` is HTML and may contain the same embedded `appImage` / `appFile` / `appVideo` divs with `fileId` as the task description. Fetch binaries via authenticated `/api/public/workspace/files/{fileId}` with the same Public API Bearer token when needed.
componentItemIdobjectComponent item ID
createdAtstring<date-time>requiredTask creation timestamp
customFieldsobjectrequiredCustom fields values
deadlinestring<date-time>Task deadline
descriptionstringrequiredTask description in HTML. May include embedded assets as elements such as `<div data-type="appImage" fileId="…" filename="…">` (images), `appFile`, or `appVideo`—binary content is not embedded; use authenticated GET `{appOrigin}/api/public/workspace/files/{fileId}` with the same Public API Bearer token to retrieve it.
emailDetailsobjectEmail details
emailSendErrorstringEmail send error message
emailSendErrorCodestringEmail send error code
emailSendFailedAtstring<date-time>Email send failed timestamp
emailSendFailedToany[][]Email send failed recipients
enableSupportContingentbooleanrequiredEnable support contingent
estimatedTimenumberEstimated time in hours
guestAccessbooleanrequiredGuest access enabled for organization members
historyany[][]requiredTask history entries
iconobjectTask icon identifier in the format `:icon_name:` (e.g., `:rocket:`, `:bug:`, `:memo:`). Can be null if no custom icon is set.
iconIsGeneratingbooleanrequiredWhether icon is being generated by AI
idstringrequiredTask ID (UUID)
isChangeRequestbooleanrequiredWhether task is a change request
isParticipantbooleanrequiredWhether current user is a participant
notificationSettingsobjectrequiredNotification settings
parentTaskIdobjectParent task ID for subtasks
participantsCountnumberrequiredNumber of participants
participantsListany[][]requiredList of participant user IDs
priorityobjectrequiredTask priority (TaskPriority enum)
productsany[][]requiredTask products
projectobjectrequiredProject information
projectIdstringrequiredProject ID
quotationsany[][]requiredExpress quotations
shortNumbernumberrequiredTask short number (workspace-scoped)
skipFromBillingbooleanSkip from billing
spentTimenumberrequiredTotal spent time in minutes
statusIdstringrequiredTask status ID
subTasksIdsany[][]requiredChild task IDs
summarystringTask summary
summaryIsGeneratingbooleanrequiredWhether summary is being generated by AI
tagsany[][]requiredTask tags
titlestringrequiredTask title
titleIsGeneratingbooleanrequiredWhether title is being generated by AI
typeIdstringrequiredTask type ID
userIdstringrequiredCreator user ID
400Invalid identifier format
401Unauthorized - Invalid or missing authentication token
403Access denied: No access to project or task not editable
404Task not found
Request
curl -X DELETE "https://leadtime.app/api/public/tasks/550e8400-e29b-41d4-a716-446655440000%20or%20123/subtasks/550e8400-e29b-41d4-a716-446655440001" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"const response = await fetch("https://leadtime.app/api/public/tasks/550e8400-e29b-41d4-a716-446655440000%20or%20123/subtasks/550e8400-e29b-41d4-a716-446655440001", {
method: "DELETE",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
});import requests
response = requests.delete(
"https://leadtime.app/api/public/tasks/550e8400-e29b-41d4-a716-446655440000%20or%20123/subtasks/550e8400-e29b-41d4-a716-446655440001",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
},
)Response
{
"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"
}Invalid identifier format
Unauthorized - Invalid or missing authentication token
Access denied: No access to project or task not editable
Task not found