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
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status: todo, in_progress, done, blocked |
project_id | string | Filter by project UUID |
limit | number | Max 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
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Task title |
description | string | No | Task description |
project_id | string | No | Project UUID to associate |
priority | number | No | 1 (low) to 4 (critical), default 2 |
due_date | string | No | ISO 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:
| Field | Type | Description |
|---|---|---|
title | string | New title |
description | string | New description |
status | string | todo, in_progress, done, blocked |
priority | number | 1-4 |
due_date | string | ISO 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"}'