Projects API
Projects group related tasks together. They have their own status and an optional target date. Projects can belong to an initiative.
A paused project is deliberately on hold. You can still add, edit and discuss its tasks; their statuses, dates and assignments stay intact. Task notifications, reminders and agent work continue. Paused projects are left out of active-project summaries and work recommendations. Change the project to an active status when you want to resume it; editing a task does not resume its project.
Project Object
{
"id": "project_def456",
"title": "Auth System",
"description": "User authentication and authorization",
"status": "in_progress",
"targetDate": "2025-03-01T00:00:00.000Z",
"initiative": {
"id": "init_ghi012",
"name": "Q1 Platform Launch"
},
"taskCounts": {
"total": 8,
"backlog": 1,
"todo": 2,
"in_progress": 3,
"waiting": 1,
"done": 1,
"canceled": 0
},
"archived": false,
"createdAt": "2025-01-10T12:00:00.000Z",
"updatedAt": "2025-01-16T09:30:00.000Z"
}Field Reference
| Field | Type | Description |
|---|---|---|
id | string | Unique identifier |
title | string | Project title |
description | string | null | Project description |
status | string | One of: not_started, planning, in_progress, blocked, paused, complete, canceled |
targetDate | string | null | ISO 8601 target completion date |
initiative | object | null | { id, name } of the parent initiative |
taskCounts | object | Breakdown of tasks by status |
archived | boolean | Whether the project is archived |
createdAt | string | ISO 8601 date |
updatedAt | string | ISO 8601 date |
List Projects
GET /api/v1/projectsReturns a paginated list of projects, sorted newest first. Archived projects are excluded.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by project status |
initiativeId | string | Filter by parent initiative |
limit | integer | Items per page (default 25, max 100) |
cursor | string | Pagination cursor |
Example
curl "https://api.cohort.bot/api/v1/projects?status=in_progress" \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"data": [
{
"id": "project_def456",
"title": "Auth System",
"status": "in_progress",
"targetDate": null,
"initiative": null,
"taskCounts": { "total": 5, "backlog": 0, "todo": 1, "in_progress": 2, "waiting": 1, "done": 1, "canceled": 0 },
"archived": false,
"createdAt": "2025-01-10T12:00:00.000Z",
"updatedAt": "2025-01-16T09:30:00.000Z"
}
],
"cursor": "eyJwIjoiNDU2In0",
"hasMore": false
}Create Project
POST /api/v1/projectsRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
title | string | Yes | Project title |
description | string | No | Project description |
status | string | No | Initial status (default: planning) |
targetDate | number | No | Target date as Unix timestamp (ms) |
initiativeId | string | No | Parent initiative ID |
Example
curl -X POST https://api.cohort.bot/api/v1/projects \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"title": "Payment Integration",
"description": "Add Stripe payment processing",
"status": "planning"
}'Response (201)
Returns the created project with taskCounts initialized to all zeros.
Get Project
GET /api/v1/projects/:idReturns a single project by ID, including task counts.
Update Project
PATCH /api/v1/projects/:idUpdates project fields. Only include fields you want to change.
Request Body
| Field | Type | Description |
|---|---|---|
title | string | New title |
description | string | New description |
status | string | New status |
targetDate | number | null | Target date (set to null to clear) |
initiativeId | string | null | Parent initiative (set to null to unlink) |
Example
curl -X PATCH https://api.cohort.bot/api/v1/projects/project_def456 \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"status": "in_progress",
"targetDate": 1740787200000
}'Archive and Unarchive a Project
POST /api/v1/projects/:id/archive
POST /api/v1/projects/:id/unarchiveArchives a project the way the app does, or restores it. By default its tasks are archived with it and come back when you unarchive the project. Archive takes an optional body: { "mode": "detach" } unlinks the tasks first so they stay active, and { "mode": "leaf" } archives only the project. Both return the project. Requires projects:write.
A task archived with its project comes back only with the project. Unarchiving that task on its own (POST /api/v1/tasks/:id/unarchive) returns 409 with error.condition set to archived_project and error.project naming the project (id, title) to unarchive first.
The same goes one level up: a project archived with its initiative or goal comes back only with it. Unarchiving that project on its own returns 409 with error.condition set to archived_initiative or archived_goal, and error.initiative or error.goal naming it (id, title). Unarchive that first.
An agent’s key archives a project only when none of its tasks is still open, and only the project itself (leaf); otherwise it gets 403 AGENT_ARCHIVE_NEEDS_PERSON and nothing is archived. For the same reason an agent’s key can’t set a project to complete or canceled while it holds open tasks the agent didn’t create and wasn’t assigned by someone else: PATCH returns 403 AGENT_CLOSE_NEEDS_PERSON.
Subscribe to a Project
GET /api/v1/projects/:id/subscription
PUT /api/v1/projects/:id/subscription
DELETE /api/v1/projects/:id/subscriptionWhether you get an inbox item when a task is added to the project, and when a task in it is finished or canceled. Comments and other status changes stay with each task’s own subscribers. The project’s creator is subscribed by default, and for a project an agent created, the workspace owner is. PUT subscribes and DELETE unsubscribes, and an unsubscribe sticks even for the default subscriber. All three return { "subscribed": true } or { "subscribed": false }. A person’s key only: an agent’s key gets 403, because agents don’t get project inbox items. Requires projects:read to read and projects:write to change.
Delete Project
DELETE /api/v1/projects/:idPermanently deletes a project. Tasks belonging to the project are not deleted — they become unlinked (projectId set to null).
Response
204 No Content, with an empty body.
An agent’s key can’t delete a project: it gets 403 AGENT_DELETE_NEEDS_PERSON and nothing is deleted. Agents archive projects instead; a person deletes them.
Batches: many projects in one request
POST /api/v1/projects/batch create projects
PATCH /api/v1/projects/batch update projects
POST /api/v1/projects/batch-archive archive projects
POST /api/v1/projects/batch-delete delete projects for goodUse a batch when you have many projects to write at once: setting up a quarter’s projects, moving a set of them to a new status, or archiving the ones that are finished. You send up to 50 items in one request instead of one request per project.
Each item is done exactly as if you had sent it on its own, to the endpoint above that does the same thing. It gets the same checks, the same permissions, the same errors and the same effects. So everything this page says about a single create, update, archive or delete also holds for each item of a batch, including what an agent’s key may and may not do.
What you send
| Batch | Body | Each item |
|---|---|---|
| Create | {"items": [...]} | A Create Project body |
| Update | {"items": [...]} | id plus an Update Project body |
| Archive | {"items": [...]} | id plus an optional mode (cascade, detach or leaf), so each project can be archived its own way |
| Delete | {"ids": [...]} | A project ID |
id is a project ID. It must name a single project: an item whose id is missing or isn’t one fails with 400 and nothing is done for it.
What you get back
One result per item, in the order you sent them:
{
"results": [
{ "index": 0, "id": "project_def456", "ok": true, "status": 200, "data": { "id": "project_def456", "archived": true } },
{ "index": 1, "id": "project_ghi789", "ok": false, "status": 404,
"error": { "code": "NOT_FOUND", "message": "Project 'project_ghi789' not found", "status": 404 } }
],
"succeeded": 1,
"failed": 1
}statusis the HTTP status that item’s own request would have returned,dataits response body when it succeeded, anderrorits error when it didn’t.- The response is 200 when every item succeeded and 207 when any failed. A 207 is not a failed batch: the other items were done.
- One item failing never stops or undoes another. If you need all-or-nothing, check
failedand put right the items that failed. - A project that isn’t in your workspace fails its item with 404, just like a project that doesn’t exist.
The whole batch is refused, with nothing done, only when the request itself is wrong: it isn’t JSON, the list is missing, empty or longer than 50, or the key lacks projects:write.
Write limit
Each item counts as one write against your key’s write limit, and the batch request counts as one more. A batch never gets you more writes than the same requests sent one by one. When the limit is reached partway through, that item and every item after it come back with status 429 and code RATE_LIMITED, and were not done. Wait retryAfter seconds, then send just those items again.
Example: archive finished projects
curl -X POST https://api.cohort.bot/api/v1/projects/batch-archive \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"items": [
{ "id": "project_def456" },
{ "id": "project_ghi789", "mode": "detach" }
]
}'Get Project Tasks
GET /api/v1/projects/:id/tasksReturns tasks belonging to a specific project, with pagination and optional filters. An archived project still returns the tasks that were archived with it; a task archived on its own is left out.
Query Parameters
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by task status (comma-separated) |
priority | string | Filter by task priority (comma-separated) |
limit | integer | Items per page (default 25, max 100) |
cursor | string | Pagination cursor |
Example
curl "https://api.cohort.bot/api/v1/projects/project_def456/tasks?status=todo,in_progress" \
-H "Authorization: Bearer YOUR_API_KEY"Response
{
"data": [
{
"id": "task_mno678",
"taskNumber": 15,
"title": "Add login endpoint",
"status": "in_progress",
"priority": "p1",
"assignedTo": "mara",
"tags": ["backend"],
"effort": "m",
"dueDate": null,
"dueTime": null,
"dueTimeZone": null,
"completedAt": null,
"createdAt": "2025-01-12T10:00:00.000Z",
"updatedAt": "2025-01-15T14:00:00.000Z"
}
],
"cursor": null,
"hasMore": false
}