Tasks API¶
List, create, and update tasks in the Fermi app.
Base URL¶
There is no https://api.fermi.dev/api/tasks route (404).
Authentication¶
These routes are Fermi app user-session APIs. The Next.js app reads identity from the signed-in user (getUser), not from a service-actor JWT.
A service-actor Authorization: Bearer token returns 401 (Missing required identity headers). Sending X-Fermi-Actor-Id / X-Fermi-Organisation-Id with that token then fails with a different 401 (cookie authToken required). Do not document a header combo for partners — call these APIs only from a logged-in Fermi app session.
List tasks¶
GET /
Query Parameters:
| Parameter | Type | Description |
|---|---|---|
view | string | View filter |
completion | string | Completion filter |
priority | string | Priority filter |
status | string | Status filter |
assigneeUserId | string | Filter by assignee |
teamIds | string | Team filter |
departmentId | string | Department filter |
q | string | Search |
page | string | Page |
limit | string | Page size |
curl --request GET \
--url "${BASE_URL}?limit=20" \
--header "Authorization: Bearer <user-session-token>"
The response body is the upstream tasks JSON.
My task¶
GET /todo
| Parameter | Type | Description |
|---|---|---|
priority | string | Priority filter |
includeCompleted | string | Include completed items |
page | string | Page |
limit | string | Page size |
curl --request GET \
--url "${BASE_URL}/todo?limit=20" \
--header "Authorization: Bearer <user-session-token>"
GET /todo/counts — counts for the My task queue.
GET /counts — overall counts.
Create a task¶
POST /
The API sets tenantId and createdByUserId from the app session. If assignees is empty, it uses assignee or { userId } from the session.
curl --request POST \
--url "${BASE_URL}" \
--header "Authorization: Bearer <user-session-token>" \
--header "Content-Type: application/json" \
--data '{
"title": "Follow up with finance"
}'
Get, update, delete¶
- GET
/{id} - PATCH
/{id}— JSON body forwarded upstream - DELETE
/{id}
Complete, comments, attachments¶
- POST
/{id}/complete— no body - POST
/{id}/comments— JSON body forwarded - POST
/{id}/attachments— JSON body forwarded - POST
/attachments/upload— multipartfile,taskId, optionalorganizationId,userId - GET
/attachments/download?s3Key=...—{ url, expiresIn, s3Key, disposition }
Summary¶
| Method | Path | Notes |
|---|---|---|
| GET | /api/tasks | List |
| POST | /api/tasks | Create |
| GET | /api/tasks/todo | My task |
| GET | /api/tasks/todo/counts | My task counts |
| GET | /api/tasks/counts | Counts |
| GET/PATCH/DELETE | /api/tasks/{id} | Item |
| POST | /api/tasks/{id}/complete | Complete |
| POST | /api/tasks/{id}/comments | Comment |
| POST | /api/tasks/{id}/attachments | Attach |
| POST | /api/tasks/attachments/upload | Upload file |
| GET | /api/tasks/attachments/download | Presigned download |