Todoist API TypeScript Client
This is the official TypeScript SDK for the Todoist API.
Version 4.0.0 - Major Update
This version introduces breaking changes to align with Todoist's new v1 API.
Important Changes
We have transitioned from the Todoist REST API v2 to the Todoist API v1. This migration brings several improvements:
- New unified API structure
- Enhanced TypeScript types and documentation
- Better error handling with specific error types
- New endpoint implementations
For detailed migration instructions from v9, please refer to the official Todoist API v1 migration guide.
Installation
npm install @doist/todoist-api-typescript
Basic Usage
Here's how to initialize the API client and fetch tasks:
import { TodoistApi } from '@doist/todoist-api-typescript'
const api = new TodoistApi('YOUR_API_TOKEN')
api.getTask('6X4Vw2Hfmg73Q2XR')
.then((task) => console.log(task))
.catch((error) => console.log(error))
Explore all available methods in TodoistApi.