Edit a planned task
What this does: Updates an existing pipeline item. This allows you to modify the scheduling of a task that has already been planned - for example, moving it to a different time slot, assigning it to a different team member, or changing the task itself. All fields are optional; only provided fields are updated.
How it works:
- Partial updates: Only send the fields you want to change
- If a field is not provided, the existing value is preserved
- The same validation rules apply as when creating a pipeline item
- Changes are reflected immediately in the pipeline view
Required Permission: User must have either Pipeline.canPlanAll OR Pipeline.canPlanOwnTeams permission
Permission-based Assignment:
- Users with Pipeline.canPlanAll can assign to any user
- Users with Pipeline.canPlanOwnTeams can only assign to themselves or users in their teams
Validation Rules:
- Date range: Maximum 2 weeks between dateStart and dateEnd
- Time validation: Start time must not exceed the work day length for the user
- Task access: Users can only plan tasks they have access to view
- Time increments: Times must be in 15-minute increments (0, 15, 30, 45, 60, 75, 90, etc.)
Date/Time Format:
- dateStart/dateEnd: ISO format (YYYY-MM-DDTHH:mm). CRITICAL: Only the date part (YYYY-MM-DD) is used - the time component is IGNORED. Always use “T00:00” or similar. Example: “2025-11-04T00:00”
- timeStart/timeEnd: MINUTES from the beginning of the work day (NOT from midnight, NOT absolute clock time)
- Range: 0 to workDayLength (typically 0-480 for an 8-hour day)
- Format: Must be in 15-minute increments: 0, 15, 30, 45, 60, 75, 90, 105, 120, etc.
- Calculation: Actual time = workDayStartTime + (timeStart/timeEnd minutes)
- Examples (assuming 8-hour work day starting at 09):
timeStart=0= 09 (start of work day)timeStart=60= 10 (1 hour after work day start)timeStart=240= 13 (4 hours = midday)timeStart=480= 17 (8 hours = end of work day)
- Planning Multiple Tasks for One Day (example with 8-hour work day starting at 09):
To schedule multiple tasks sequentially throughout the day, chain them together:
- Task 1:
timeStart: 0, timeEnd: 75= 09 to 10 (1.25 hours) - Task 2:
timeStart: 75, timeEnd: 150= 10 to 11 (1.25 hours) - Task 3:
timeStart: 150, timeEnd: 240= 11 to 13 (1.5 hours) - Task 4:
timeStart: 240, timeEnd: 330= 13 to 14 (1.5 hours) - Task 5:
timeStart: 330, timeEnd: 480= 14 to 17 (2.5 hours)
- Task 1:
- Important: timeStart/timeEnd are NOT hours since midnight. If work day starts at 09, timeStart=0 means 09, not 00.
- Response: The response dateStart/dateEnd values show calculated absolute times in UTC. To interpret them, extract the time component relative to work day start, not midnight.
Use cases:
- Adjust task timing during planning meetings
- Reassign tasks to different team members
- Extend or shorten task duration
- Move tasks to different days or weeks
PATCH
/tasks/pipeline/items/{id}Authorization
AuthorizationOAuth2 access token · headerrequiredScopes:
api:writeor
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idstringrequiredQuery parameters
fieldsToReturnstringComma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.
responseShapestringAdvanced override. Omit for the endpoint compact default. Use full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
compactfullHeader parameters
LT-Response-ShapestringAdvanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.
Allowed:
fullRequest body
requiredapplication/jsondateEndstringEnd date in ISO format (YYYY-MM-DDTHH:mm:ssZ). **IMPORTANT**: Only the date part (YYYY-MM-DD) is used - the time component is IGNORED. Use timeEnd to specify the actual end time relative to work day start. Maximum 2 weeks from dateStart. Optional - if not provided, the existing dateEnd is preserved. Example: "2025-11-04T00:00:00Z" (the time part is ignored).
dateStartstringStart date in ISO format (YYYY-MM-DDTHH:mm:ssZ). **IMPORTANT**: Only the date part (YYYY-MM-DD) is used - the time component is IGNORED. Use timeStart to specify the actual start time relative to work day start. Optional - if not provided, the existing dateStart is preserved. Example: "2025-11-04T00:00:00Z" (the time part is ignored).
taskIdstringUnique identifier of the task to plan. Optional - if not provided, the existing taskId is preserved. The task must exist and the user must have access to view it.
timeEndnumber**CRITICAL**: End time in MINUTES from the beginning of the work day (NOT from midnight, NOT absolute clock time). Optional - if not provided, the existing timeEnd is preserved.
**Range**: Must be greater than timeStart, up to workDayLength (typically 0-480 for an 8-hour day)
**Format**: Must be in 15-minute increments: 0, 15, 30, 45, 60, 75, 90, 105, 120, etc.
**Examples** (assuming 8-hour work day starting at 09:00):
- `timeEnd: 240` = 13:00 (4 hours after work day start = midday)
- `timeEnd: 330` = 14:30 (5.5 hours after work day start)
- `timeEnd: 480` = 17:00 (8 hours = end of work day)
**Planning Multiple Tasks for One Day** (example with 8-hour work day starting at 09:00):
To schedule multiple tasks sequentially throughout the day, chain them together:
- Task 1: `timeStart: 0, timeEnd: 75` = 09:00 to 10:15 (1.25 hours)
- Task 2: `timeStart: 75, timeEnd: 150` = 10:15 to 11:30 (1.25 hours)
- Task 3: `timeStart: 150, timeEnd: 240` = 11:30 to 13:00 (1.5 hours)
- Task 4: `timeStart: 240, timeEnd: 330` = 13:00 to 14:30 (1.5 hours)
- Task 5: `timeStart: 330, timeEnd: 480` = 14:30 to 17:00 (2.5 hours)
**Calculation**: Actual time = workDayStartTime + (timeEnd minutes)
**Important**: This is NOT the same as hours since midnight. If your work day starts at 09:00, timeEnd=480 means 17:00, not 08:00. Must be greater than timeStart.
min 0
timeStartnumber**CRITICAL**: Start time in MINUTES from the beginning of the work day (NOT from midnight, NOT absolute clock time). Optional - if not provided, the existing timeStart is preserved.
**Range**: 0 to workDayLength (typically 0-480 for an 8-hour day)
**Format**: Must be in 15-minute increments: 0, 15, 30, 45, 60, 75, 90, 105, 120, etc.
**Examples** (assuming 8-hour work day starting at 09:00):
- `timeStart: 0` = 09:00 (start of work day)
- `timeStart: 60` = 10:00 (1 hour after work day start)
- `timeStart: 240` = 13:00 (4 hours after work day start = midday)
- `timeStart: 480` = 17:00 (8 hours = end of work day)
**Planning Multiple Tasks for One Day** (example with 8-hour work day starting at 09:00):
To schedule multiple tasks sequentially throughout the day, chain them together:
- Task 1: `timeStart: 0, timeEnd: 75` = 09:00 to 10:15 (1.25 hours)
- Task 2: `timeStart: 75, timeEnd: 150` = 10:15 to 11:30 (1.25 hours)
- Task 3: `timeStart: 150, timeEnd: 240` = 11:30 to 13:00 (1.5 hours)
- Task 4: `timeStart: 240, timeEnd: 330` = 13:00 to 14:30 (1.5 hours)
- Task 5: `timeStart: 330, timeEnd: 480` = 14:30 to 17:00 (2.5 hours)
**Calculation**: Actual time = workDayStartTime + (timeStart minutes)
**Important**: This is NOT the same as hours since midnight. If your work day starts at 09:00, timeStart=0 means 09:00, not 00:00.
min 0
userIdstringUnique identifier of the user/team member to assign this task to. Optional - if not provided, the existing userId is preserved. Permission restrictions apply: users with Pipeline.canPlanOwnTeams can only assign to themselves or team members, while users with Pipeline.canPlanAll can assign to any user.
Responses
200Pipeline item successfully updated
dateEndstringrequiredEnd date and time in ISO format (RESPONSE VALUE - this is different from input). **Note**: In the request, the time component of dateEnd is IGNORED. In the response, the time component IS meaningful - it represents the calculated absolute time based on work day start + timeEnd minutes. The date part (YYYY-MM-DD) represents the calendar day. When reading this response value, extract the time relative to work day start, not midnight. Example: If work day starts at 09:00 and timeEnd was 330, this response will show 14:30 (5.5 hours from 09:00) on the specified date.
dateStartstringrequiredStart date and time in ISO format (RESPONSE VALUE - this is different from input). **Note**: In the request, the time component of dateStart is IGNORED. In the response, the time component IS meaningful - it represents the calculated absolute time based on work day start + timeStart minutes. The date part (YYYY-MM-DD) represents the calendar day. When reading this response value, extract the time relative to work day start, not midnight. Example: If work day starts at 09:00 and timeStart was 30, this response will show 09:30 on the specified date.
idstringrequiredUnique identifier of the created or updated pipeline item
taskIdstringrequiredUnique identifier of the task that was planned
userIdstringrequiredUnique identifier of the user/team member the task is assigned to
400Invalid input data or validation failed
401Unauthorized - Invalid or missing authentication token
403Missing required permissions or not allowed to assign to target user
404Pipeline item not found
Request
curl -X PATCH "https://leadtime.app/api/public/tasks/pipeline/items/string" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"dateEnd": "2025-11-04T00:00:00Z",
"dateStart": "2025-11-04T00:00:00Z",
"taskId": "123e4567-e89b-12d3-a456-426614174000",
"timeEnd": 240,
"timeStart": 0,
"userId": "123e4567-e89b-12d3-a456-426614174001"
}'const response = await fetch("https://leadtime.app/api/public/tasks/pipeline/items/string", {
method: "PATCH",
headers: {
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"dateEnd": "2025-11-04T00:00:00Z",
"dateStart": "2025-11-04T00:00:00Z",
"taskId": "123e4567-e89b-12d3-a456-426614174000",
"timeEnd": 240,
"timeStart": 0,
"userId": "123e4567-e89b-12d3-a456-426614174001"
})
});import requests
response = requests.patch(
"https://leadtime.app/api/public/tasks/pipeline/items/string",
headers={
"Authorization": "Bearer YOUR_ACCESS_TOKEN",
"Content-Type": "application/json"
},
json={
"dateEnd": "2025-11-04T00:00:00Z",
"dateStart": "2025-11-04T00:00:00Z",
"taskId": "123e4567-e89b-12d3-a456-426614174000",
"timeEnd": 240,
"timeStart": 0,
"userId": "123e4567-e89b-12d3-a456-426614174001"
},
)Response
{
"dateEnd": "2025-11-04T14:30:00Z",
"dateStart": "2025-11-04T09:30:00Z",
"id": "123e4567-e89b-12d3-a456-426614174002",
"taskId": "123e4567-e89b-12d3-a456-426614174000",
"userId": "123e4567-e89b-12d3-a456-426614174001"
}Invalid input data or validation failed
Unauthorized - Invalid or missing authentication token
Missing required permissions or not allowed to assign to target user
Pipeline item not found