Files
nexus/wiki/concepts/Todoist-API.md

60 lines
2.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Todoist API"
type: concept
tags: [api, task-management, integration, automation]
sources: [todoist-task-manager, multi-channel-assistant, custom-morning-brief, meeting-notes-action-items]
last_updated: 2026-04-21
---
## Definition
Todoist 官方 APIREST API 和 Sync API允许第三方应用通过 OAuth2 认证创建、读取、更新、删除 Todoist 中的任务、项目、标签和评论。是 AI Agent 集成 Todoist 的底层技术基础。
## Aliases
- Todoist REST API
- Todoist Sync API
- Todoist REST
- Todoist API
## Core Capabilities
- **Tasks**:创建任务(含截止日期、优先级、标签、项目)、更新状态、添加评论
- **Projects**:创建和管理项目层级结构
- **Labels**:创建和管理标签(支持多标签)
- **Sections**:项目内的分组(分区)
- **Comments**:任务评论
- **Sync**:实时双向同步,支持 WebSocket 推送
## API Integration Pattern (OpenClaw)
```
用户自然语言指令 → OpenClaw Agent → LLM 解析结构化字段
→ Todoist REST API POST /tasks → 任务创建
→ 确认消息回复用户
```
## Key Endpoints
| Method | Endpoint | 功能 |
|--------|----------|------|
| POST | /rest/v2/tasks | 创建任务 |
| GET | /rest/v2/tasks | 列出任务 |
| POST | /rest/v2/tasks/{id}/close | 完成任务 |
| DELETE | /rest/v2/tasks/{id} | 删除任务 |
| POST | /sync/v9/sync | 同步变更 |
## Use Cases
- [[Todoist Task Manager]]:自然语言 → API 调用
- [[Custom Morning Brief]]:拉取今日任务和逾期任务
- [[Meeting Notes Action Items]]:自动从会议记录创建任务
- [[Phone-Based Personal Assistant]]:语音指令创建任务
## Key Relationships
- [[OpenClaw]] — Agent 框架,通过 API 集成 Todoist
- [[Todoist]] — API 提供方
- [[Natural Language Task Parsing]] — LLM 解析自然语言为 API 参数
- [[Cron Job]] — 定时调用 API 检查逾期任务