Skip to content

Recommend a project for each task​

POST
/api/process/recommend-projects

For the Process button's sorting step: the project each given task
probably belongs in, or null when none clearly fits. The AI only
recommends — nothing is written; the user picks. It reads each
project's description (what belongs there) and the user's global
ai_context.

Ids that are not the caller's own live tasks are ignored. A
project_id is always one of the caller's own or shared projects,
never the Inbox; a model answer naming any other project is dropped,
so a task can be missing from recommendations (no recommendation).
Entries follow the order of ids.

AI disabled (server-wide, or the user's Insights mode set to off)
returns { recommendations: [] } with 200, never an error. Uses the
Insights feature's AI mode, model and timeout.

Authorizations​

bearerAuth

API token created via POST /api/tokens or the db:create-token CLI command

Type
HTTP (bearer)

Request Body​

application/json
JSON
{
"ids": [
0
]
}

Responses​

Recommendations (empty when AI is off)

application/json
JSON
{
"data": {
"recommendations": [
{
"task_id": 0,
"project_id": 0,
"reason": "string"
}
]
}
}

Samples​

Powered by VitePress OpenAPI