API Reference
Machine-readable? Download the OpenAPI 3.1 spec for use with developer tools, SDKs, and agent frameworks.
Base URL
https://api.cohort.bot/api/v1All endpoints use the /api/v1 prefix. The API accepts and returns JSON.
Versioning
The current API version is v1. We recommend always including the version prefix in your requests.
Authentication
Every request requires a Bearer token in the Authorization header:
curl https://api.cohort.bot/api/v1/tasks \
-H "Authorization: Bearer YOUR_API_KEY"See Authentication for details on creating and managing API keys.
Pagination
List endpoints use cursor-based pagination. Every list response includes:
{
"data": [...],
"cursor": "eyJjIjoiNzg5In0",
"hasMore": true
}| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 25 | Number of items per page (max 100) |
cursor | string | — | Cursor from a previous response to get the next page |
If you request a limit greater than 100, it will be capped to 100 and the response will include a meta.limitCapped flag:
{
"data": [...],
"cursor": "...",
"hasMore": true,
"meta": { "limitCapped": true, "maxLimit": 100 }
}Iterating through pages
# First page
curl "https://api.cohort.bot/api/v1/tasks?limit=10"
# Next page (use cursor from previous response)
curl "https://api.cohort.bot/api/v1/tasks?limit=10&cursor=1707000000000"Request Format
- Content-Type:
application/jsonfor POST and PATCH requests - Methods: GET, POST, PATCH, DELETE
- Encoding: UTF-8
Response Format
All responses are JSON. Successful responses return the data directly. Error responses use a consistent format — see Errors.
Dates
All dates are returned as ISO 8601 strings (e.g., "2025-01-15T12:00:00.000Z"). When sending dates (e.g., dueDate), provide a Unix timestamp in milliseconds.
Endpoints
| Resource | Endpoints |
|---|---|
| Tasks | GET /tasks, POST /tasks, GET /tasks/:id, PATCH /tasks/:id, DELETE /tasks/:id, POST /tasks/:id/transition, POST /tasks/:id/relations, DELETE /tasks/:id/relations/:relationId |
| Projects | GET /projects, POST /projects, GET /projects/:id, PATCH /projects/:id, DELETE /projects/:id, GET /projects/:id/tasks |
| Initiatives | GET /initiatives, POST /initiatives, GET /initiatives/:id, PATCH /initiatives/:id, DELETE /initiatives/:id, GET /initiatives/:id/projects |
| Goals | GET /goals, POST /goals, GET /goals/:id, PATCH /goals/:id, POST /goals/:id/verify, POST /goals/:id/archive, DELETE /goals/:id |
| Agents | GET /agents, POST /agents, GET /agents/:id, PATCH /agents/:id, DELETE /agents/:id |
| Chat | GET /chats, POST /chats, GET /chats/:id, PATCH /chats/:id, DELETE /chats/:id, GET /chats/:id/messages, POST /chats/:id/messages, POST /chats/:id/archive, POST /chats/:id/unarchive, GET /chats/:id/turns/:turnId |
| Team | GET /team, GET /team/:id, PATCH /team/:id |
| Activity | GET /activity |
| Context | GET /context |
| Me | GET /me |