← 返回
开发者工具 Key 中文

Todoist v1 API Reference

Manage Todoist tasks — list, create, complete, update, and organize tasks and projects.
管理 Todoist 任务 — 列出、创建、完成、更新和组织任务与项目。
fluidiguana fluidiguana 来源
开发者工具 clawhub v1.0.0 1 版本 99876.2 Key: 需要
★ 0
Stars
📥 807
下载
💾 7
安装
1
版本
#latest

概述

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}'

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.

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 09:38 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

life-service

Caldav Calendar

asleep123
使用 vdirsyncer + khal 同步并查询 CalDAV 日历(iCloud、Google、Fastmail、Nextcloud 等)。适用于 Linux。
★ 242 📥 30,437
life-service

Weather

steipete
获取当前天气和预报(无需API密钥)
★ 451 📥 226,978
life-service

Sonoscli

steipete
控制Sonos音箱(发现/状态/播放/音量/分组)
★ 55 📥 84,835