Connect component item to task
Connects a component item (epic, feature, or task) to an existing task in the task management system. If the item already has a task connection, it will be disconnected first before establishing the new connection. Component tags are automatically merged into the task’s tags. To disconnect an item from a task without connecting to a new one, pass null or omit the taskId in the request body.
POST
/projects/{projectId}/items/{itemId}/tasks/connectAuthorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
projectIdstringrequiredProject UUID
itemIdstringrequiredComponent item UUID
Request body
requiredapplication/jsontaskIdobject | nullTask ID to connect the item to. Pass null or omit to disconnect the item from any existing task.
Responses
200Item connected/disconnected successfully
successboolean400Invalid request: invalid UUID format for projectId, itemId, or taskId
401Unauthorized - Invalid or missing authentication token
403Insufficient permissions to manage components or access to project denied
404Project not found, item not found, item does not belong to project, or task not found
Request
curl -X POST "https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/e57dc37b-7693-4d06-b49c-17084b773aff/tasks/connect" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}'const response = await fetch("https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/e57dc37b-7693-4d06-b49c-17084b773aff/tasks/connect", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
})
});import requests
response = requests.post(
"https://leadtime.app/api/public/projects/a47dc37b-7693-4d06-b49c-17084b773aff/items/e57dc37b-7693-4d06-b49c-17084b773aff/tasks/connect",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"taskId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
)Response
{
"success": true
}Invalid request: invalid UUID format for projectId, itemId, or taskId
Unauthorized - Invalid or missing authentication token
Insufficient permissions to manage components or access to project denied
Project not found, item not found, item does not belong to project, or task not found