Skip to main content

Tasks API

POST /tasks/

Create a new task.

curl -X POST https://api.get-nimbus.com/tasks/ \
-H "X-API-Key: $NIMBUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"workspace_id": "ws-abc123",
"repo_id": "repo-xyz789",
"description": "Add rate limiting to the /api/users endpoint",
"auto_approve": false,
"skill_name": null,
"agent_name": null
}'

Response:

{
"id": "task-def456",
"description": "Add rate limiting to the /api/users endpoint",
"status": "queued",
"phase": "QUEUED",
"created_at": "2026-04-26T10:00:00Z",
"repo_id": "repo-xyz789",
"workspace_id": "ws-abc123",
"pr_url": null,
"error": null
}

GET /tasks/

List tasks. Filter by workspace:

curl "https://api.get-nimbus.com/tasks/?workspace_id=ws-abc123" \
-H "X-API-Key: $NIMBUS_API_KEY"

GET /tasks/{id}/

Get task status and current phase:

curl https://api.get-nimbus.com/tasks/task-def456/ \
-H "X-API-Key: $NIMBUS_API_KEY"

Response includes phase, which is one of: QUEUED, CLONING, INDEXING, PLANNING, AWAITING_APPROVAL, IMPLEMENTING, VERIFYING, FIXING, REVIEWING, CLEANUP, DONE, FAILED.

POST /tasks/{id}/approve

Approve the generated plan (when task is in AWAITING_APPROVAL phase):

curl -X POST https://api.get-nimbus.com/tasks/task-def456/approve \
-H "X-API-Key: $NIMBUS_API_KEY"

POST /tasks/{id}/reject

Reject the plan and cancel the task:

curl -X POST https://api.get-nimbus.com/tasks/task-def456/reject \
-H "X-API-Key: $NIMBUS_API_KEY"

POST /tasks/{id}/approve-diff

Approve the diff and proceed to PR creation:

curl -X POST https://api.get-nimbus.com/tasks/task-def456/approve-diff \
-H "X-API-Key: $NIMBUS_API_KEY"

POST /tasks/{id}/reject-diff

Reject the diff and cancel without pushing:

curl -X POST https://api.get-nimbus.com/tasks/task-def456/reject-diff \
-H "X-API-Key: $NIMBUS_API_KEY"

POST /tasks/review/

Request a review of an existing PR (does not create a new task):

curl -X POST https://api.get-nimbus.com/tasks/review/ \
-H "X-API-Key: $NIMBUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"pr_url": "https://github.com/acme/api/pull/142",
"post": true
}'

Set "post": true to post the review as a GitHub PR comment.

WebSocket: live logs

Stream real-time logs for a running task:

const ws = new WebSocket(
`wss://api.get-nimbus.com/tasks/${taskId}/ws`,
[],
{ headers: { 'X-API-Key': apiKey } }
);

ws.onmessage = (event) => {
const data = JSON.parse(event.data);
// data.event_type: "phase" | "log" | "plan" | "diff" | "done" | "error"
console.log(data);
};

Event types:

event_typePayload
phase{"phase": "IMPLEMENTING"}
log{"message": "writing api/routes/users.py"}
plan{"plan": [...]}
diff{"diff": "..."}
done{"pr_url": "https://..."}
error{"error": "..."}