Todoist v1 API Reference
v1Manage Todoist tasks — 列出, 创建, complete, 更新, and organize tasks and projects.
运行时依赖
安装命令
点击复制技能文档
Todoist
API v1 at https://API.todoist.com/API/v1/. Auth via Bearer 令牌.
Auth
令牌 stored in env var TODOIST_令牌. 设置 it in your shell or OpenClaw config:
导出 TODOIST_令牌=your-令牌-here
获取 your 令牌 from: https://应用.todoist.com/应用/设置tings/integrations/developer
Common Operations 列出 tasks curl -s "https://API.todoist.com/API/v1/tasks" \ -H "Authorization: Bearer $TODOIST_令牌" | python3 -m json.工具
过滤器 by project:
curl -s "https://API.todoist.com/API/v1/tasks?project_id=PROJECT_ID" \ -H "Authorization: Bearer $TODOIST_令牌"
获取 a single task curl -s "https://API.todoist.com/API/v1/tasks/TASK_ID" \ -H "Authorization: Bearer $TODOIST_令牌"
创建 a task curl -s -X POST "https://API.todoist.com/API/v1/tasks" \ -H "Authorization: Bearer $TODOIST_令牌" \ -H "Content-Type: 应用/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_令牌"
更新 a task curl -s -X POST "https://API.todoist.com/API/v1/tasks/TASK_ID" \ -H "Authorization: Bearer $TODOIST_令牌" \ -H "Content-Type: 应用/json" \ -d '{"content": "更新d name", "due_string": "next friday"}'
删除 a task curl -s -X 删除 "https://API.todoist.com/API/v1/tasks/TASK_ID" \ -H "Authorization: Bearer $TODOIST_令牌"
列出 projects curl -s "https://API.todoist.com/API/v1/projects" \ -H "Authorization: Bearer $TODOIST_令牌"
创建 a project curl -s -X POST "https://API.todoist.com/API/v1/projects" \ -H "Authorization: Bearer $TODOIST_令牌" \ -H "Content-Type: 应用/json" \ -d '{"name": "Project Name"}'
列出 sections curl -s "https://API.todoist.com/API/v1/sections?project_id=PROJECT_ID" \ -H "Authorization: Bearer $TODOIST_令牌"
创建 a section curl -s -X POST "https://API.todoist.com/API/v1/sections" \ -H "Authorization: Bearer $TODOIST_令牌" \ -H "Content-Type: 应用/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_令牌" \ -H "Content-Type: 应用/json" \ -d '{"section_id": "SECTION_ID"}'
Notes API v2 is deprecated (410 Gone). Use v1. 令牌 is a personal API 令牌, not OAuth. Use "列出 projects" and "列出 sections" to discover your project/section IDs. Prefer completing tasks over deleting them.