Todoist v1 API Reference
简介
Todoist v1 API Reference
原始描述
Manage Todoist tasks — list, create, complete, update, and organize tasks and projects.
通过你的 Agent 添加
安装目录:todoist/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: todoist
description: Manage Todoist tasks — list, create, complete, update, and organize tasks and projects.
Todoist
API v1 at https://api.todoist.com/api/v1/. Auth via Bearer token.
Auth
Token stored in env var TODOIST_TOKEN. Set it in your shell or OpenClaw config:
export TODOIST_TOKEN=your-token-here
Get your token from: https://app.todoist.com/app/settings/integrations/developer
Common Operations
List tasks
curl -s "https://api.todoist.com/api/v1/tasks" \
-H "Authorization: Bearer $TODOIST_TOKEN" | python3 -m json.tool
Filter by project:
curl -s "https://api.todoist.com/api/v1/tasks?project_id=PROJECT_ID" \
-H "Authorization: Bearer $TODOIST_TOKEN"
Get a single task
curl -s "https://api.todoist.com/api/v1/tasks/TASK_ID" \
-H "Authorization: Bearer $TODOIST_TOKEN"
Create a task
curl -s -X POST "https://api.todoist.com/api/v1/tasks" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"content": "Task name", "project_id": "PROJECT_ID", "due_string": "tomorrow", "priority": 1}'
curl -s "https://api.todoist.com/api/v1/tasks/TASK_ID" \
-H "Authorization: Bearer $TODOIST_TOKEN"
curl -s -X POST "https://api.todoist.com/api/v1/tasks" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"content": "Task name", "project_id": "PROJECT_ID", "due_string": "tomorrow", "priority": 1}'
Priority: 1 (normal) to 4 (urgent). due_string supports natural language ("tomorrow", "every monday", "Feb 20").
Complete a task
curl -s -X POST "https://api.todoist.com/api/v1/tasks/TASK_ID/close" \
-H "Authorization: Bearer $TODOIST_TOKEN"
Update a task
curl -s -X POST "https://api.todoist.com/api/v1/tasks/TASK_ID" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"content": "Updated name", "due_string": "next friday"}'
Delete a task
curl -s -X DELETE "https://api.todoist.com/api/v1/tasks/TASK_ID" \
-H "Authorization: Bearer $TODOIST_TOKEN"
List projects
curl -s "https://api.todoist.com/api/v1/projects" \
-H "Authorization: Bearer $TODOIST_TOKEN"
Create a project
curl -s -X POST "https://api.todoist.com/api/v1/projects" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Project Name"}'
List sections
curl -s "https://api.todoist.com/api/v1/sections?project_id=PROJECT_ID" \
-H "Authorization: Bearer $TODOIST_TOKEN"
Create a section
curl -s -X POST "https://api.todoist.com/api/v1/sections" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"project_id": "PROJECT_ID", "name": "Section Name", "order": 0}'
Move task to section
curl -s -X POST "https://api.todoist.com/api/v1/tasks/TASK_ID" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"section_id": "SECTION_ID"}'
Notes
- API v2 is deprecated (410 Gone). Use v1.
- Token is a personal API token, not OAuth.
- Use "List projects" and "List sections" to discover your project/section IDs.
- Prefer completing tasks over deleting them.
curl -s -X POST "https://api.todoist.com/api/v1/tasks/TASK_ID/close" \
-H "Authorization: Bearer $TODOIST_TOKEN"
curl -s -X POST "https://api.todoist.com/api/v1/tasks/TASK_ID" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"content": "Updated name", "due_string": "next friday"}'
Delete a task
curl -s -X DELETE "https://api.todoist.com/api/v1/tasks/TASK_ID" \
-H "Authorization: Bearer $TODOIST_TOKEN"
List projects
curl -s "https://api.todoist.com/api/v1/projects" \
-H "Authorization: Bearer $TODOIST_TOKEN"
Create a project
curl -s -X POST "https://api.todoist.com/api/v1/projects" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Project Name"}'
List sections
curl -s "https://api.todoist.com/api/v1/sections?project_id=PROJECT_ID" \
-H "Authorization: Bearer $TODOIST_TOKEN"
Create a section
curl -s -X POST "https://api.todoist.com/api/v1/sections" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"project_id": "PROJECT_ID", "name": "Section Name", "order": 0}'
Move task to section
curl -s -X POST "https://api.todoist.com/api/v1/tasks/TASK_ID" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"section_id": "SECTION_ID"}'
Notes
- API v2 is deprecated (410 Gone). Use v1.
- Token is a personal API token, not OAuth.
- Use "List projects" and "List sections" to discover your project/section IDs.
- Prefer completing tasks over deleting them.
curl -s -X DELETE "https://api.todoist.com/api/v1/tasks/TASK_ID" \
-H "Authorization: Bearer $TODOIST_TOKEN"
curl -s "https://api.todoist.com/api/v1/projects" \
-H "Authorization: Bearer $TODOIST_TOKEN"
Create a project
curl -s -X POST "https://api.todoist.com/api/v1/projects" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Project Name"}'
List sections
curl -s "https://api.todoist.com/api/v1/sections?project_id=PROJECT_ID" \
-H "Authorization: Bearer $TODOIST_TOKEN"
Create a section
curl -s -X POST "https://api.todoist.com/api/v1/sections" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"project_id": "PROJECT_ID", "name": "Section Name", "order": 0}'
Move task to section
curl -s -X POST "https://api.todoist.com/api/v1/tasks/TASK_ID" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"section_id": "SECTION_ID"}'
Notes
- API v2 is deprecated (410 Gone). Use v1.
- Token is a personal API token, not OAuth.
- Use "List projects" and "List sections" to discover your project/section IDs.
- Prefer completing tasks over deleting them.
curl -s -X POST "https://api.todoist.com/api/v1/projects" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Project Name"}'
curl -s "https://api.todoist.com/api/v1/sections?project_id=PROJECT_ID" \
-H "Authorization: Bearer $TODOIST_TOKEN"
Create a section
curl -s -X POST "https://api.todoist.com/api/v1/sections" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"project_id": "PROJECT_ID", "name": "Section Name", "order": 0}'
Move task to section
curl -s -X POST "https://api.todoist.com/api/v1/tasks/TASK_ID" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"section_id": "SECTION_ID"}'
Notes
- API v2 is deprecated (410 Gone). Use v1.
- Token is a personal API token, not OAuth.
- Use "List projects" and "List sections" to discover your project/section IDs.
- Prefer completing tasks over deleting them.
curl -s -X POST "https://api.todoist.com/api/v1/sections" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"project_id": "PROJECT_ID", "name": "Section Name", "order": 0}'
curl -s -X POST "https://api.todoist.com/api/v1/tasks/TASK_ID" \
-H "Authorization: Bearer $TODOIST_TOKEN" \
-H "Content-Type: application/json" \
-d '{"section_id": "SECTION_ID"}'
Notes
- API v2 is deprecated (410 Gone). Use v1.
- Token is a personal API token, not OAuth.
- Use "List projects" and "List sections" to discover your project/section IDs.
- Prefer completing tasks over deleting them.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。