The project ID. Project must be in awaiting_approval status.
POST
/api/deep-work/projects/{project_id}/approve BearerApprove Deep Work Plan
Approve a Deep Work project plan and transition it to autonomous execution. All tasks with no blockers are dispatched immediately to their assigned agents for parallel processing.
Overview
Approves a Deep Work project plan and transitions it to EXECUTING status. All tasks with no blockers are dispatched immediately.
Path Parameters
project_id string Response
success booleanWhether the project was approved and execution started.
project objectThe updated project object with status: "executing".
curl -X POST http://localhost:8000/api/deep-work/projects/PROJECT_ID/approve \ -H "Authorization: Bearer YOUR_TOKEN"const res = await fetch(`http://localhost:8000/api/deep-work/projects/${projectId}/approve`, { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_TOKEN' },});import httpx
res = httpx.post( f"http://localhost:8000/api/deep-work/projects/{project_id}/approve", headers={"Authorization": "Bearer YOUR_TOKEN"},){ "success": true, "project": { "id": "a1b2c3d4...", "status": "executing", "started_at": "2024-01-15T14:35:00Z" }}{ "detail": "Project status is not awaiting_approval"}Was this page helpful?
Request
curl -X POST "http://localhost:8000/api/deep-work/projects/{project_id}/approve" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>"const response = await fetch("http://localhost:8000/api/deep-work/projects/{project_id}/approve", {
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}/approve",
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}/approve", 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
Authorization
Headers
Body
Response