POST /api/deep-work/projects/{project_id}/tasks/{task_id}/skip Bearer

Skip Deep Work Task

Skip a task in a Deep Work project without executing it. The task is marked as SKIPPED, its dependents are unblocked, and project progress is recalculated to reflect the change.

Overview

Skips a task without running it. The task is marked as SKIPPED and dependent tasks are unblocked, allowing execution to continue.

Path Parameters

project_id string

The project ID.

task_id string

The task ID to skip. Must belong to the project and not already be done, skipped, or in progress.

Response

success boolean

Whether the task was skipped.

task object

The updated task with status: "skipped".

progress object

Updated project progress after the skip.

Terminal window
curl -X POST http://localhost:8000/api/deep-work/projects/PROJECT_ID/tasks/TASK_ID/skip \
-H "Authorization: Bearer YOUR_TOKEN"
{
"success": true,
"task": {
"id": "task-3",
"title": "Write unit tests",
"status": "skipped",
"completed_at": "2024-01-15T15:00:00Z"
},
"progress": {
"total": 8,
"completed": 3,
"skipped": 1,
"percent": 50
}
}
{
"detail": "Task is already done or in progress"
}
Request
curl -X POST "http://localhost:8000/api/deep-work/projects/{project_id}/tasks/{task_id}/skip" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <token>"
const response = await fetch("http://localhost:8000/api/deep-work/projects/{project_id}/tasks/{task_id}/skip", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
},
});

const data = await response.json();
console.log(data);
import requests

response = requests.post(
    "http://localhost:8000/api/deep-work/projects/{project_id}/tasks/{task_id}/skip",
    headers={'Content-Type':'application/json','Authorization':'Bearer <token>'},
)

print(response.json())
package main

import (
    "fmt"
    "net/http"
    "io"
)

func main() {
    req, _ := http.NewRequest("POST", "http://localhost:8000/api/deep-work/projects/{project_id}/tasks/{task_id}/skip", nil)
    req.Header.Set("Content-Type", "application/json")
    req.Header.Set("Authorization", "Bearer <token>")

    client := &http.Client{}
    resp, _ := client.Do(req)
    defer resp.Body.Close()

    body, _ := io.ReadAll(resp.Body)
    fmt.Println(string(body))
}
Response
Send a request to see the response