All Docs

Tasks API

Create, list, and update tasks in your Cognova workspace via the REST API.

List Tasks

GET /api/v1/tasks

Returns tasks for your workspace with optional filters.

Query Parameters

ParameterTypeDescription
statusstringFilter by status: todo, in_progress, done, blocked
project_idstringFilter by project UUID
limitnumberMax results (default 50)

Response

{
  "data": [
    {
      "id": "uuid",
      "title": "Implement user search",
      "description": "Add full-text search to the users endpoint",
      "status": "todo",
      "priority": 2,
      "projectId": "uuid",
      "dueDate": "2026-03-20T00:00:00.000Z",
      "createdAt": "2026-03-12T10:00:00.000Z"
    }
  ]
}

Example

# All tasks
curl -H "Authorization: Bearer cg_YOUR_KEY" \
  https://cognova.dev/api/v1/tasks

# Only in-progress tasks
curl -H "Authorization: Bearer cg_YOUR_KEY" \
  "https://cognova.dev/api/v1/tasks?status=in_progress"

Create a Task

POST /api/v1/tasks

Request Body

FieldTypeRequiredDescription
titlestringYesTask title
descriptionstringNoTask description
project_idstringNoProject UUID to associate
prioritynumberNo1 (low) to 4 (critical), default 2
due_datestringNoISO 8601 date

Response

{
  "data": {
    "id": "uuid",
    "title": "Implement user search",
    "status": "todo",
    "priority": 2,
    "createdAt": "2026-03-12T10:00:00.000Z"
  }
}

Example

curl -X POST https://cognova.dev/api/v1/tasks \
  -H "Authorization: Bearer cg_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title": "Implement user search", "priority": 3}'

Update a Task

PUT /api/v1/tasks/:id

Request Body

All fields are optional:

FieldTypeDescription
titlestringNew title
descriptionstringNew description
statusstringtodo, in_progress, done, blocked
prioritynumber1-4
due_datestringISO 8601 date

Example

# Mark as done
curl -X PUT https://cognova.dev/api/v1/tasks/TASK_ID \
  -H "Authorization: Bearer cg_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status": "done"}'