Zum Inhalt springen
Leadtime
Deutsch
Esc
↑↓navigieren↵öffnen⌘Jvorschau

Plan a task (create pipeline item)

What this does: Creates a new pipeline item, scheduling a task on the timeline for a specific team member. This is equivalent to adding a task to the pipeline during weekly planning meetings. The task will appear as a colored card in the pipeline view and, once the week is activated, will automatically appear in the assigned team member’s personal stack in the correct order.

How it works:

  • The pipeline item links a task to a user with specific start/end dates and times
  • The length of the pipeline card matches the planned working time
  • Tasks are placed in 15-minute increments for precise scheduling
  • The order of tasks in the pipeline determines their order in the team member’s stack

Required Permission: User must have either Pipeline.canPlanAll OR Pipeline.canPlanOwnTeams permission

Permission-based Assignment:

  • Users with Pipeline.canPlanAll can assign tasks to any user in the workspace
  • Users with Pipeline.canPlanOwnTeams can only assign tasks 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 assigned 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)
  • Important: timeStart/timeEnd are NOT hours since midnight. If work day starts at 09, timeStart=0 means 09, not 00.

Use cases:

  • Programmatically add tasks to the pipeline during planning
  • Integrate with external planning tools
  • Automate task scheduling based on capacity calculations
  • Bulk import planned tasks from other systems
POST/tasks/pipeline/items
Authorization
AuthorizationOAuth2 access token · headerrequired
Scopes:api:write
or
AuthorizationBearer token (JWT) · headerrequired
Query parameters
fieldsToReturnstring

Comma-separated list of top-level response fields to return. Overrides the endpoint compact default unless responseShape=full is used.

responseShapestring

Advanced 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:compactfull
Header parameters
LT-Response-Shapestring

Advanced override. Set to full only when you need the complete endpoint response, including nested fields that are not selectable with fieldsToReturn.

Allowed:full
Request body
requiredapplication/json
dateEndstringrequired

End 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. Example: "2025-11-04T00:00:00Z" (the time part is ignored).

dateStartstringrequired

Start 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. Example: "2025-11-04T00:00:00Z" (the time part is ignored).

taskIdstringrequired

Unique identifier of the task to plan in the pipeline. The task must exist and the user must have access to view it.

timeEndnumberrequired

CRITICAL: End time in MINUTES from the beginning of the work day (NOT from midnight, NOT absolute clock time).

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
timeStartnumberrequired

CRITICAL: Start time in 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.

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
userIdstringrequired

Unique identifier of the user/team member to assign this task to. 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
201

Pipeline item successfully created

dateEndstringrequired

End 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.

dateStartstringrequired

Start 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.

idstringrequired

Unique identifier of the created or updated pipeline item

taskIdstringrequired

Unique identifier of the task that was planned

userIdstringrequired

Unique identifier of the user/team member the task is assigned to

400

Invalid input data or validation failed

401

Unauthorized - Invalid or missing authentication token

403

Missing required permissions or not allowed to assign to target user

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST "https://leadtime.app/api/public/tasks/pipeline/items" \
  -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"
}'
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"
}