Quick Start
Install the plugin:corsair.ts
Authentication
Supported Auth Types
The Todoist plugin supports:api_key(default) - Use a Todoist API token
Default Auth Type
If noauthType is specified, the plugin defaults to api_key.
Configuring API Key Authentication
Store credentials with the CLI:corsair.ts
Options
| Option | Type | Description |
|---|---|---|
authType | 'api_key' | Authentication method (defaults to 'api_key') |
key | string | API token (optional, uses database if not provided) |
webhookSecret | string | Webhook secret for verification |
hooks | object | Endpoint hooks for custom logic |
webhookHooks | object | Webhook hooks for event handling |
errorHandlers | object | Custom error handlers |
permissions | object | Permission configuration for AI agent access |
Hooks
Error Handling
The plugin includes built-in error handlers for common scenarios. For complete documentation, see the Error Handlers reference.Usage
Accessing the API
Webhooks
Todoist sends task and project events to your webhook endpoint (identified byx-todoist-delivery-id header):
app/api/webhook/route.ts
Database Access
Multi-Tenancy
Examples
Example 1: Create Tasks from Incoming Emails
inngest/functions.ts
Example 2: Notify on Task Completion
corsair.ts
inngest/functions.ts
Example 3: Sync GitHub Issues to Todoist
inngest/functions.ts