### Project Object Example Source: https://developer.todoist.com/api/v1 An example of a project object, detailing its properties such as ID, name, description, and workspace information. ```json { "id": "6Jf8VQXxpwv56VQ7", "name": "Shopping List", "description": "Stuff to buy", "workspace_id": 12345, "is_invite_only": false, "status": "IN_PROGRESS", "is_link_sharing_enabled": true, "collaborator_role_default": "READ_WRITE", "color": "lime_green", "parent_id": null, "child_order": 1, "is_collapsed": false, "shared": false, "can_assign_tasks": false, "is_deleted": false, "is_archived": false, "is_favorite": false, "is_frozen": false, "view_style": "list", "role": "READ_WRITE" "inbox_project": true, "folder_id": null, "created_at": "2023-07-13T10:20:59Z", "updated_at": "2024-12-10T13:27:29Z", "is_pending_default_collaborator_invites: false } ``` -------------------------------- ### Get Folder Response Sample Source: https://developer.todoist.com/api/v1 Example of a successful response when retrieving a specific folder. Includes folder details like ID, name, and workspace ID. ```json { "id": "1234", "name": "Design", "workspace_id": "123456", "default_order": 1, "child_order": 1, "is_deleted": false } ``` -------------------------------- ### Install Todoist CLI Source: https://developer.todoist.com/api/v1 Install the official Todoist CLI using npm. This package provides terminal access to Todoist functionalities. ```bash npm install -g @doist/todoist-cli ``` -------------------------------- ### Get Completed Tasks by Completion Date Query Parameters Source: https://developer.todoist.com/api/v1 This example demonstrates the query parameters for retrieving completed tasks. It requires a date range (since and until) and supports filtering by workspace, project, section, parent task, and custom filter queries. ```http GET /api/v1/tasks/completed/by_completion_date?since=2025-02-01T00:00:00Z&until=2025-02-28T23:59:59Z&project_id=6XGgm6PHrGgMpCFX&limit=50 ``` -------------------------------- ### Date Value Example Source: https://developer.todoist.com/api/v1 Provides an example of a raw date value for a task. ```text Tomorrow @ 14:00 ``` -------------------------------- ### Example OAuth Client ID Metadata Document Source: https://developer.todoist.com/api/v1 This JSON document serves as an example for hosting OAuth client metadata at a client-controlled URL. This enables a zero-registration flow for public clients. ```json { "client_id": "https://example.com/oauth-client-metadata.json", "client_name": "My App", "redirect_uris": ["https://example.com/callback"], "grant_types": ["authorization_code", "refresh_token"], "response_types": ["code"], "token_endpoint_auth_method": "none" } ``` -------------------------------- ### Search Query Example Source: https://developer.todoist.com/api/v1 Example of searching within the Todoist application for 'Test & Today' using the `todoist://search` scheme. The query must be URL-encoded. ```url todoist://search?query=Test%20%26%20Today ``` -------------------------------- ### Update Project Response Example Source: https://developer.todoist.com/api/v1 This is an example of a successful response when updating a project via the Todoist API v1. It shows the sync status for the command that was executed. ```json { "...", "sync_status": {"1ca42128-d12f-4a66-8413-4d6ff2838fde": "ok"}, "..." } ``` -------------------------------- ### Open Project by ID Source: https://developer.todoist.com/api/v1 Example of opening a specific project in Todoist by providing its ID. ```url todoist://project?id=128501470 ``` -------------------------------- ### Example of Temporary Resource ID Usage Source: https://developer.todoist.com/api/v1 This example demonstrates how to use temporary IDs to reference a newly created project in a subsequent command within the same request. The `project_add` command creates a project with a `temp_id`, which is then used as `project_id` in the `item_add` command. ```json [ { "type": "project_add", "temp_id": "c7beb07f-b226-4eb1-bf63-30d782b07b1a", "args": { "name": "Shopping List" }, "uuid": "ac417051-1cdc-4dc3-b4f8-14526d5bfd16" }, { "type": "item_add", "temp_id": "43f7ed23-a038-46b5-b2c9-4abda9097ffa", "args": { "content": "Buy Milk", "project_id": "c7beb07f-b226-4eb1-bf63-30d782b07b1a" }, "uuid": "849fff4e-8551-4abb-bd2a-838d092775d7" } ] ``` -------------------------------- ### Example Task Object Structure Source: https://developer.todoist.com/api/v1 This is an example of a task object, illustrating its various properties including ID, project, content, priority, due dates, labels, and timestamps. ```json { "id": "6X7rM8997g3RQmvh", "user_id": "2671355", "project_id": "6Jf8VQXxpwv56VQ7", "content": "Buy Milk", "description": "", "priority": 1, "due": null, "deadline": null, "parent_id": null, "child_order": 1, "section_id": "3Ty8VQXxpwv28PK3", "day_order": -1, "is_collapsed": false, "labels": ["Food", "Shopping"], "added_by_uid": "2671355", "assigned_by_uid": "2671355", "responsible_uid": null, "checked": false, "is_deleted": false, "added_at": "2025-01-21T21:28:43.841504Z", "updated_at": "2025-01-21T21:28:43Z", "completed_at": null, "deadline": null, "duration": { "amount": 15, "unit": "minute" } } ``` -------------------------------- ### Task Content Example Source: https://developer.todoist.com/api/v1 Illustrates a raw content value for a task. ```text Create document about URL Schemes! ``` -------------------------------- ### CORS Headers Example Source: https://developer.todoist.com/api/v1 This example demonstrates a successful API request with CORS headers. All API endpoints, except for the initial OAuth2 flow, support CORS from any origin. ```bash $ curl https://api.todoist.com/api/v1/sync \ -H "Authorization: Bearer 0123456789abcdef0123456789abcdef01234567" \ -H "Origin: http://example.com" HTTP/1.1 200 OK Access-Control-Allow-Credentials: false Access-Control-Allow-Origin: * ``` -------------------------------- ### Example Collaborator State Object Source: https://developer.todoist.com/api/v1 An example of a collaborator state object, which maps a user to a shared project and defines their role and status. ```json { "project_id": "6H2c63wj7x9hFJfX", "user_id": "2671362", "state": "active", "is_deleted": false, "role": "READ_WRITE" } ``` -------------------------------- ### View Options Object Example Source: https://developer.todoist.com/api/v1 An example of a view option object used for customizing task views. This object defines how tasks are displayed, filtered, grouped, and sorted. ```json { "view_type": "project", "object_id": "6Jf8VQXxpwv56VQ7", "filtered_by": "!assigned", "grouped_by": "priority", "sorted_by": "added_date", "sort_order": "asc", "show_completed_tasks": false, "view_mode": "calendar", "calendar_settings": { "layout": "month" }, "is_deleted": false, "deadline": "no deadline" } ``` -------------------------------- ### Open Label by Name Source: https://developer.todoist.com/api/v1 Example of opening a specific label in Todoist by providing its name. ```url todoist://label?name=Urgent ``` -------------------------------- ### Accept invitation response Source: https://developer.todoist.com/api/v1 Example response indicating the status of an accept invitation command. ```json { "...": "...", "sync_status": {"4b254da4-fa2b-4a88-9439-b27903a90f7f": "ok"}, "...": "..." } ``` -------------------------------- ### Get Tasks By Filter Source: https://developer.todoist.com/api/v1 Get all tasks matching the filter. This is a paginated endpoint. See the Pagination guide for details on using cursor-based pagination. ```APIDOC ## GET /api/v1/tasks ### Description Retrieves all tasks matching the specified filter criteria. This endpoint supports cursor-based pagination. ### Method GET ### Endpoint https://api.todoist.com/api/v1/tasks ### Parameters #### Query Parameters - **filter** (string) - Required - A Todoist filter query to specify which tasks to retrieve. Example: `filter=#Work & overdue` - **lang** (string) - Optional - Language code used to parse the `filter` query. Example: `lang=en` - **cursor** (string) - Optional - Cursor for pagination. Use the `next_cursor` from a previous response to fetch subsequent pages. - **limit** (integer) - Optional - Maximum number of tasks to return per page. Default: 50. ### Response #### Success Response (200) - **items** (array) - List of tasks matching the filter. - **added_at** (string) - Timestamp when the task was added. - **added_by_uid** (string) - User ID who added the task. - **assigned_by_uid** (string) - User ID assigned to the task. - **checked** (boolean) - Whether the task is checked. - **child_order** (integer) - Order of the task among its siblings. - **completed_at** (string) - Timestamp when the task was completed. - **completed_by_uid** (string) - User ID who completed the task. - **completed_count** (integer) - Number of times the task was completed. - **content** (string) - The content of the task. - **day_order** (integer) - Order of the task for the day. - **deadline** (object) - Deadline information for the task. - **date** (string) - The deadline date. - **lang** (string) - Language code for the date. - **description** (string) - Description of the task. - **due** (object) - Due date information for the task. - **date** (string) - The due date. - **is_recurring** (boolean) - Whether the due date is recurring. - **lang** (string) - Language code for the due date. - **string** (string) - String representation of the due date. - **duration** (object) - Duration information for the task. - **amount** (integer) - The duration amount. - **unit** (string) - The duration unit. - **goal_ids** (array) - List of goal IDs associated with the task. - **id** (string) - The unique identifier of the task. - **is_collapsed** (boolean) - Whether the task is collapsed. - **is_deleted** (boolean) - Whether the task is deleted. - **labels** (array) - List of labels applied to the task. - **note_count** (integer) - Number of notes associated with the task. - **parent_id** (string) - The ID of the parent task. - **postponed_count** (integer) - Number of times the task was postponed. - **priority** (integer) - Priority level of the task. - **project_id** (string) - The ID of the project the task belongs to. - **responsible_uid** (string) - User ID responsible for the task. - **section_id** (string) - The ID of the section the task belongs to. - **updated_at** (string) - Timestamp when the task was last updated. - **user_id** (string) - The ID of the user who owns the task. - **next_cursor** (string or null) - Cursor for fetching the next page of results. #### Response Example (200) ```json { "items": [ { "added_at": "2025-01-15T10:30:00Z", "added_by_uid": "1234567", "assigned_by_uid": "1234567", "checked": false, "child_order": 1, "completed_at": "2025-01-16T10:30:00Z", "completed_by_uid": "1234567", "completed_count": 3, "content": "Buy milk", "day_order": 1, "deadline": { "date": "2025-02-12", "lang": "en" }, "description": "Pick up organic milk", "due": { "date": "2025-02-12", "is_recurring": false, "lang": "en", "string": "tomorrow" }, "duration": { "amount": 30, "unit": "minute" }, "goal_ids": [ "12345" ], "id": "6XGgmFVcrG5RRjVr", "is_collapsed": false, "is_deleted": false, "labels": [ "priority" ], "note_count": 0, "parent_id": "6XGgmFVcrG5RRjVr", "postponed_count": 1, "priority": 1, "project_id": "6XGgm6PHrGgMpCFX", "responsible_uid": "1234567", "section_id": "6fFPHV272WWh3gpW", "updated_at": "2025-01-17T10:30:00Z", "user_id": "1234567" } ], "next_cursor": null } ``` #### Error Responses - **400** Bad Request - **401** Unauthorized - **403** Forbidden - **404** Not Found ``` -------------------------------- ### Quick Add Task Creation Examples Source: https://developer.todoist.com/api/v1 Illustrates various ways to use natural language for creating tasks with Todoist's Quick Add feature, including dates, projects, labels, and priorities. ```text "Buy milk today at 5pm #Shopping @groceries p1" ``` ```text "Team meeting next Monday at 10am #Work +JohnDoe !30m" ``` ```text "Review PR {Friday} // Check the new authentication flow" ``` ```text "Submit report tomorrow #Work /Urgent @important // Include Q3 metrics" ``` -------------------------------- ### Get Comment Response Source: https://developer.todoist.com/api/v1 Example JSON response for retrieving a single comment, showing its content, author, and reactions. ```json { "id": "6XGgmFQrx44wfGHr", "posted_uid": "1234567", "content": "Looks good to me.", "file_attachment": null, "uids_to_notify": [ "1234567" ], "is_deleted": false, "posted_at": "2025-01-15T10:30:00Z", "reactions": { "👍": [ "1234567" ] } } ``` -------------------------------- ### Open Global Quick Add with Task Content and Description Source: https://developer.todoist.com/api/v1 This scheme opens the global quick add panel pre-filled with a task's content and description. Ensure content and description are URL encoded. ```url todoist://openquickadd?content=mytask&description=%20is%20a%20description ``` -------------------------------- ### Batch Add Project and Items Source: https://developer.todoist.com/api/v1 This example demonstrates how to batch multiple commands, including adding a project and its associated items, into a single API call to the /sync endpoint. This reduces network calls and helps avoid rate limiting. ```bash curl https://api.todoist.com/api/v1/sync \ -H "Authorization: Bearer 0123456789abcdef0123456789abcdef01234567" \ -d commands='[ { "type": "project_add", "temp_id": "0a57a3db-2ff1-4d2d-adf6-12490c13c712", "uuid": "2c0f6e03-c372-46ba-8e85-d94af56abcf3", "args": { "name": "Shopping List" } }, { "type": "item_add", "temp_id": "ef3d840e-84c9-4433-9a32-86ae9a1e7d42", "uuid": "49ede211-12f3-42e9-8345-4c0d2b29c08d", "args": { "content": "Buy Milk", "project_id": "0a57a3db-2ff1-4d2d-adf6-12490c13c712" } }, { "type": "item_add", "temp_id": "8a23c8cb-1d76-469d-a2c0-80a28b3ea6f6", "uuid": "46619250-ae02-4ab0-bd31-3c9ab0307e53", "args": { "content": "Buy Coffee", "project_id": "0a57a3db-2ff1-4d2d-adf6-12490c13c712" } }, { "type": "item_add", "temp_id": "bf087eaf-aea9-4cb1-ab57-85188a2d428f", "uuid": "d0a1666b-d615-4250-aac5-65c7ea89091a", "args": { "content": "Buy Sugar", "project_id": "0a57a3db-2ff1-4d2d-adf6-12490c13c712" } }] ' ``` -------------------------------- ### Get Labels Source: https://developer.todoist.com/api/v1 Retrieves all user labels. This is a paginated endpoint, refer to the Pagination guide for details on using cursor-based pagination. ```APIDOC ## Get Labels Get all user labels. This is a paginated endpoint. See the Pagination guide for details on using cursor-based pagination. ``` -------------------------------- ### Common Todoist CLI Commands Source: https://developer.todoist.com/api/v1 Examples of common commands for the Todoist CLI, including adding tasks, viewing tasks, and listing projects. Use --help for a full reference. ```bash td add "Buy milk tomorrow #Shopping" ``` ```bash td today ``` ```bash td inbox ``` ```bash td task list ``` ```bash td task list --project "Work" ``` ```bash td project list ``` -------------------------------- ### Batching Commands Source: https://developer.todoist.com/api/v1 This example demonstrates how to batch multiple commands, such as creating a project and adding items to it, into a single API call to the /sync endpoint. This reduces network calls and helps avoid rate limiting. ```APIDOC ## POST /sync ### Description Allows batching multiple commands into a single API request to the `/sync` endpoint. This is useful for creating multiple resources or performing several updates efficiently. ### Method POST ### Endpoint https://api.todoist.com/api/v1/sync ### Parameters #### Request Body - **commands** (array) - Required - A JSON array of command objects to be executed. - Each command object can have a `type`, `temp_id`, `uuid`, and `args`. - Example `args` for `project_add`: `{ "name": "Shopping List" }` - Example `args` for `item_add`: `{ "content": "Buy Milk", "project_id": "" }` ### Request Example ```json { "commands": [ { "type": "project_add", "temp_id": "0a57a3db-2ff1-4d2d-adf6-12490c13c712", "uuid": "2c0f6e03-c372-46ba-8e85-d94af56abcf3", "args": { "name": "Shopping List" } }, { "type": "item_add", "temp_id": "ef3d840e-84c9-4433-9a32-86ae9a1e7d42", "uuid": "49ede211-12f3-42e9-8345-4c0d2b29c08d", "args": { "content": "Buy Milk", "project_id": "0a57a3db-2ff1-4d2d-adf6-12490c13c712" } } ] } ``` ### Response #### Success Response (200) - **sync_status** (object) - Maps UUIDs of commands to their execution status (e.g., "ok"). - **temp_id_mapping** (object) - Maps temporary IDs to actual resource IDs. - **full_sync** (boolean) - Indicates if this was a full sync. - **sync_token** (string) - A token to be used for subsequent incremental sync requests. #### Response Example ```json { "sync_status": { "2c0f6e03-c372-46ba-8e85-d94af56abcf3": "ok", "49ede211-12f3-42e9-8345-4c0d2b29c08d": "ok" }, "temp_id_mapping": { "0a57a3db-2ff1-4d2d-adf6-12490c13c712": "6X6HrfVQvQq5WCXH", "ef3d840e-84c9-4433-9a32-86ae9a1e7d42": "6X6HrhXfQ9857XVG" }, "full_sync": true, "sync_token": "GSg4kDBAKWU7TZA_a-gcuSpxmO1lXT5bhLqUGd1F-AH69_qKEdkN_fJoBq3c" } ``` ``` -------------------------------- ### Install Maintained Agent Skills Source: https://developer.todoist.com/api/v1 Use the `td skill install` command to add maintained skills for coding agents. Ensure the `td` CLI is installed and in your PATH. ```bash td skill install claude-code td skill install codex td skill install copilot td skill install cursor td skill install gemini td skill install pi td skill install universal ``` -------------------------------- ### Example User Settings Object Source: https://developer.todoist.com/api/v1 This object represents the current user settings for reminders and completion sounds. Availability of reminder functionality depends on the user's plan. ```json { "reminder_push": true, "reminder_desktop": true, "reminder_email": true, "completed_sound_desktop": true, "completed_sound_mobile": true } ``` -------------------------------- ### Get Project Collaborators Source: https://developer.todoist.com/api/v1 Get all collaborators for a given project. This is a paginated endpoint. ```APIDOC ## Get Project Collaborators ### Description Get all collaborators for a given project. This is a paginated endpoint. ### Method GET ### Endpoint /api/v1/projects/{project_id}/collaborators ### Path Parameters - **project_id** (string) - Required - String ID of the project. ### Query Parameters - **cursor** (string or null) - Optional - Cursor for pagination. - **limit** (integer) - Optional - The number of objects to return in a page. Default: 50. Max: 200. - **public_key** (string or null) - Optional - Public Key. ### Responses #### Success Response (200) Content type: application/json ```json { "results": [], "next_cursor": "14540000435w8hj8pXXwPQJJch.X9DBH8ya2Xenok55" } ``` ``` -------------------------------- ### Create Folder Request Sample Source: https://developer.todoist.com/api/v1 Example payload for creating a new folder. Requires the folder name and workspace ID. ```json { "name": "Design", "workspace_id": 123456, "default_order": 1, "child_order": 1 } ``` -------------------------------- ### Get Archived Projects Source: https://developer.todoist.com/api/v1 Get the user's archived projects. This is a paginated endpoint. ```APIDOC ## Get Archived Projects ### Description Get the user's archived projects. This is a paginated endpoint. ### Method GET ### Endpoint /api/v1/projects/archived ### Query Parameters - **cursor** (string or null) - Optional - Cursor for pagination. - **limit** (integer) - Optional - The number of objects to return in a page. Default: 50. Max: 200. ### Responses #### Success Response (200) Content type: application/json ```json { "results": [], "next_cursor": "14540000435w8hj8pXXwPQJJch.X9DBH8ya2Xenok55" } ``` ``` -------------------------------- ### Create Project Response Source: https://developer.todoist.com/api/v1 This is an example of a successful response when creating a project. It includes a new sync_token for subsequent incremental syncs, a sync_status indicating the command's success, and a temp_id_mapping to link temporary IDs to actual resource IDs. ```json { "sync_token": "cdTUEvJoChiaMysD7vJ14UnhN-FRdP-IS3aisOUpl3aGlIQA9qosBgvMmhbn", "sync_status": {"ed1ce597-e4c7-4a88-ba48-e048d827c067": "ok"}, "temp_id_mapping": {"381e601f-0ef3-4ed6-bf95-58f896d1a314": "6HWcc9PJCvPjCxC9"} } ``` -------------------------------- ### Example Collaborator Object Source: https://developer.todoist.com/api/v1 This is an example of a collaborator object returned by the API, containing user-specific properties. ```json { "id": "2671362", "email": "you@example.com", "full_name": "Example User", "timezone": "GMT +3:00", "image_id": null } ``` -------------------------------- ### Create Project From File Source: https://developer.todoist.com/api/v1 Upload a file to create a new project or import a template into an existing one. The file should be in a format suitable for template import. ```APIDOC ## POST /api/v1/templates/create_project_from_file ### Description Upload a file to create a new project or import a template into an existing one. The file should be in a format suitable for template import. ### Method POST ### Endpoint https://api.todoist.com/api/v1/templates/create_project_from_file ### Parameters #### Request Body - **name** (string) - Required - The name of the project. - **workspace_id** (string or null) - Optional - The ID of the workspace. - **file** (application/octet-stream) - Required - The template file to upload. ### Request Example ``` curl https://api.todoist.com/api/v1/templates/create_project_from_file \ -H "Authorization: Bearer 0123456789abcdef0123456789abcdef01234567" \ -F name=My Project \ -F file=@example.csv ``` ### Responses #### Success Response (200) Successful Response #### Error Responses - **400** Bad Request - **401** Unauthorized - **403** Forbidden - **404** Not Found ``` -------------------------------- ### Location Object Example Source: https://developer.todoist.com/api/v1 An example of a location object, represented as an ordered array containing name, latitude, and longitude. ```json ["Shibuya-ku, Japan", "35.6623001098633", "139.706527709961"] ``` -------------------------------- ### Create Project Source: https://developer.todoist.com/api/v1 Creates a new project with the specified details. Returns the newly created project. ```APIDOC ## Create Project Creates a new project and returns it. ### Method POST ### Endpoint /api/v1/projects ### Parameters #### Request Body - **name** (string) - Required - Name of the project. - **description** (string or null) - Optional - Description of the project. - **parent_id** (string or null) - Optional - Parent project ID. If provided, creates this project as a sub-project. - **color** (string or integer) - Optional - Color of the project icon. Default: "charcoal". - **is_favorite** (boolean) - Optional - Whether the project is a favorite for the user. Default: false. - **view_style** (string or null) - Optional - View style of the project. - **workspace_id** (integer or null) - Optional - Workspace ID. If provided, creates a workspace project instead of a personal project. ### Request Example ```json { "name": "Vacation Planning", "description": "Tasks for planning the trip.", "parent_id": "6XGgm6PHrGgMpCFX", "color": "charcoal", "is_favorite": false, "view_style": "list", "workspace_id": 123456 } ``` ``` -------------------------------- ### Personal Label Object Example Source: https://developer.todoist.com/api/v1 This is an example of a personal label object, showing its properties like ID, name, color, and order. ```json { "id": "2156154810", "name": "Food", "color": "lime_green", "item_order": 0, "is_deleted": false, "is_favorite": false } ``` -------------------------------- ### Fetching Tasks with Pagination Source: https://developer.todoist.com/api/v1 Demonstrates how to fetch tasks using the `limit` and `cursor` parameters for pagination. It includes an example of how to retrieve all tasks by repeatedly requesting subsequent pages until no more cursors are available. ```APIDOC ## GET /tasks ### Description Fetches a list of tasks, supporting pagination to retrieve large datasets. ### Method GET ### Endpoint /tasks ### Parameters #### Query Parameters - **limit** (integer) - Optional - Controls the number of objects to return per page. Default is 50, maximum is 200. - **cursor** (string) - Optional - An opaque token returned in the `next_cursor` field of the previous response, used to fetch the next page of results. Cursors are user-specific and parameter-dependent. ### Request Example ``` curl "https://api.todoist.com/api/v1/tasks?limit=100" -H "Authorization: Bearer YOUR_TOKEN" ``` ### Response #### Success Response (200) - **results** (array) - A list of task objects. - **next_cursor** (string) - An opaque token to fetch the next page of results. Will be null if there are no more pages. #### Response Example ```json { "results": [ { "id": "12345", "content": "Buy groceries", "completed": false } ], "next_cursor": "eyJwYWdlIjoyLCJsaW1pdCI6NTB9.aGFzaA" } ``` ### Error Handling #### Invalid Cursor If a malformed or tampered cursor is provided, a 400 Bad Request error will be returned. ```json { "error": "Invalid argument value", "error_code": 20, "error_extra": { "argument": "cursor" }, "error_tag": "INVALID_ARGUMENT_VALUE", "http_code": 400 } ``` #### Invalid Limit Value If a limit value greater than 200 is provided, a 400 Bad Request error will be returned. ```json { "error": "Invalid argument value", "error_code": 20, "error_extra": { "argument": "limit", "expected": "Input should be less than or equal to 200" }, "error_tag": "INVALID_ARGUMENT_VALUE", "http_code": 400 } ``` ``` -------------------------------- ### Create Project From File using cURL Source: https://developer.todoist.com/api/v1 This cURL command demonstrates how to create a new project in Todoist by uploading a file as a template. Ensure you replace placeholders with your actual project name, authorization token, and file path. ```bash $ curl https://api.todoist.com/api/v1/templates/create_project_from_file \ -H "Authorization: Bearer 0123456789abcdef0123456789abcdef01234567" \ -F name=My Project \ -F file=@example.csv ``` -------------------------------- ### Example Webhook Request Header Source: https://developer.todoist.com/api/v1 This is an example of the HTTP request header for a webhook event notification. It includes the Host, Content-Type, and a security hash. ```http POST /payload HTTP/1.1 Host: your_callback_url_host Content-Type: application/json X-Todoist-Hmac-SHA256: UEEq9si3Vf9yRSrLthbpazbb69kP9+CZQ7fXmVyjhPs= ``` -------------------------------- ### Configure Cursor for Todoist MCP Source: https://developer.todoist.com/api/v1 Set up the Todoist MCP server for Cursor by creating a `mcp.json` file. This file specifies the command and arguments to connect to the Todoist MCP server. ```json { "mcpServers": { "todoist": { "command": "npx", "args": ["-y", "mcp-remote", "https://ai.todoist.net/mcp"] } } } ``` -------------------------------- ### Import Project From File using cURL Source: https://developer.todoist.com/api/v1 This cURL command demonstrates how to import a project template file into an existing project. Ensure you replace placeholder values with your actual project ID and file path. ```bash $ curl https://api.todoist.com/api/v1/templates/import_into_project_from_file \ -H "Authorization: Bearer 0123456789abcdef0123456789abcdef01234567" \ -F project_id=6XGgm6PHrGgMpCFX \ -F file=@example.csv ``` -------------------------------- ### Install Shell Completions Source: https://developer.todoist.com/api/v1 Enable tab completion for your shell by running the `td completion install` command. Specify the shell (e.g., `zsh`) if it's not the default. ```bash td completion install td completion install zsh ``` -------------------------------- ### User Plan Info Object Example Source: https://developer.todoist.com/api/v1 The user plan info object details feature availability and limitations for a specific user plan, including properties like activity log, comment access, and project limits. ```json { "activity_log": true, "activity_log_limit": 7, "advanced_permissions": true, "automatic_backups": false, "calendar_feeds": true, "calendar_layout": true, "comments": true, "completed_tasks": true, "custom_app_icon": false, "customization_color": false, "deadlines": true, "durations": true, "email_forwarding": true, "filters": true, "labels": true, "max_calendar_accounts": 1, "max_collaborators": 5, "max_filters": 3, "max_folders_per_workspace": 25, "max_workspace_filters": 3, "workspace_filters": true, "max_free_workspaces_created": 1, "max_guests_per_workspace": 25, "max_labels": 500, "max_projects": 5, "max_projects_joined": 500, "max_reminders_location": 300, "max_reminders_time": 700, "max_sections": 20, "max_tasks": 300, "max_user_templates": 100, "plan_name": "free", "reminders": false, "reminders_at_due": true, "templates": true, "upload_limit_mb": 5, "uploads": true, "weekly_trends": true } ``` -------------------------------- ### Pagination Introduction Source: https://developer.todoist.com/api/v1 This section announces the introduction of pagination to many endpoints in Todoist API v1. It lists the endpoints that now support pagination and specifies that cursor-based pagination is used, directing users to the Pagination guide for full details. ```APIDOC ## Pagination This version adds pagination to many endpoints. The following endpoints are now paginated: * `/api/v1/tasks` * `/api/v1/tasks/filter` * `/api/v1/labels` * `/api/v1/labels/shared` * `/api/v1/comments` * `/api/v1/sections` * `/api/v1/projects` * `/api/v1/projects/archived` * `/api/v1/projects//collaborators` * `/api/v1/activities` They all use cursor-based pagination. See the Pagination guide for complete details. ``` -------------------------------- ### Move Task Response Sample Source: https://developer.todoist.com/api/v1 Example of a successful response when moving a task, showing updated task details. ```json { "user_id": "1234567", "id": "6XGgmFVcrG5RRjVr", "project_id": "6XGgm6PHrGgMpCFX", "section_id": "6fFPHV272WWh3gpW", "parent_id": "6fFPHRxcmVqm4C84", "added_by_uid": "1234567", "assigned_by_uid": "1234567", "responsible_uid": "1234567", "labels": [ "priority" ], "deadline": { "date": "2025-02-12", "lang": "en" }, "duration": { "amount": 30, "unit": "minute" }, "is_collapsed": false, "checked": false, "is_deleted": false, "added_at": "2025-01-15T10:30:00Z", "completed_at": "2025-01-16T10:30:00Z", "completed_by_uid": "1234567", "updated_at": "2025-01-17T10:30:00Z", "due": { "date": "2025-02-12", "is_recurring": false, "lang": "en", "string": "tomorrow" }, "priority": 1, "child_order": 1, "content": "Buy milk", "description": "Pick up organic milk", "note_count": 0, "day_order": 1, "goal_ids": [ "12345" ], "completed_count": 3, "postponed_count": 1 } ``` -------------------------------- ### Get Comment Source: https://developer.todoist.com/api/v1 Retrieves a single comment by its ID. ```APIDOC ## Get Comment ### Description Returns a single comment by ID. ### Method GET ### Endpoint /api/v1/comments/{comment_id} ### Path Parameters - **comment_id** (string) - Required - The unique identifier of the comment to retrieve. ### Responses #### Success Response (200) - **id** (string) - The comment's ID. - **posted_uid** (string) - The ID of the user who posted the comment. - **content** (string) - The content of the comment. - **file_attachment** (object | null) - Information about any file attachment. - **uids_to_notify** (array) - A list of user IDs to notify. - **is_deleted** (boolean) - Indicates if the comment is deleted. - **posted_at** (string) - The timestamp when the comment was posted. - **reactions** (object) - An object containing reactions to the comment. #### Response Example (200) { "id": "6XGgmFQrx44wfGHr", "posted_uid": "1234567", "content": "Looks good to me.", "file_attachment": null, "uids_to_notify": [ "1234567" ], "is_deleted": false, "posted_at": "2025-01-15T10:30:00Z", "reactions": { "👍": [ "1234567" ] } } ``` -------------------------------- ### Get Workspaces Source: https://developer.todoist.com/api/v1 Returns all workspaces where the user is a member. ```APIDOC ## GET /api/v1/workspaces ### Description Returns all workspaces where the user is a member. ### Method GET ### Endpoint /api/v1/workspaces ### Response #### Success Response (200) An array of workspace objects. #### Response Example ```json [ { } ] ``` ``` -------------------------------- ### 200 OK Response Sample for Project Source: https://developer.todoist.com/api/v1 This JSON object represents a successful response when retrieving project details. It includes information about the project's structure, tasks, sections, comments, collaborators, and subprojects. ```json { "project": { "archived_timestamp": 0, "child_order": 4, "collapsed": false, "color": "lime_green", "id": "6XGgff2vcGGQCQvj", "is_archived": false, "is_deleted": false, "name": "Shopping List", "user_id": "2671355", "view_style": "list" }, "tasks": [ { "user_id": "1234567", "id": "6XGgmFVcrG5RRjVr", "project_id": "6XGgm6PHrGgMpCFX", "section_id": "6fFPHV272WWh3gpW", "parent_id": "6XGgmFVcrG5RRjVr", "added_by_uid": "1234567", "assigned_by_uid": "1234567", "responsible_uid": "1234567", "labels": [ "priority" ], "deadline": { "date": "2025-02-12", "lang": "en" }, "duration": { "amount": 30, "unit": "minute" }, "is_collapsed": false, "checked": false, "is_deleted": false, "added_at": "2025-01-15T10:30:00Z", "completed_at": "2025-01-16T10:30:00Z", "completed_by_uid": "1234567", "updated_at": "2025-01-17T10:30:00Z", "due": { "date": "2025-02-12", "is_recurring": false, "lang": "en", "string": "tomorrow" }, "priority": 1, "child_order": 1, "content": "Buy milk", "description": "Pick up organic milk", "note_count": 0, "day_order": 1, "goal_ids": [ "12345" ], "completed_count": 3, "postponed_count": 1 } ], "sections": [ { "id": "6fFPHV272WWh3gpW", "user_id": "1234567", "project_id": "6XGgm6PHrGgMpCFX", "added_at": "2025-01-15T10:30:00Z", "updated_at": "2025-01-16T10:30:00Z", "archived_at": "2025-01-17T10:30:00Z", "name": "Groceries", "section_order": 1, "is_collapsed": false, "is_archived": false, "is_deleted": false, "goal_ids": [ "550e8400-e29b-41d4-a716-446655440000" ] } ], "comments": [ { "content": "Things I need to buy", "id": "6XGgg2HHQPRr9rm7", "is_deleted": false, "posted_at": "2019-11-06T09:37:28.000000Z", "posted_uid": "2671355", "project_id": "6XGgff2vcGGQCQvj", "uids_to_notify": [ ] } ], "collaborators": [ { "email": "ada@example.com", "full_name": "Ada Lovelace", "id": "123456", "is_deleted": false, "timezone": "Europe/London" } ], "collaborator_states": [ { "is_deleted": false, "project_id": "6XGgff2vcGGQCQvj", "state": "active", "user_id": "2671355" } ], "folder": null, "subprojects": [ { "archived_timestamp": 0, "child_order": 4, "collapsed": false, "color": "lime_green", "id": "6XGgfvm7fMGJhwgm", "is_archived": false, "is_deleted": false, "name": "Shop name", "parent_id": "6XGgff2vcGGQCQvj", "user_id": "2671355", "view_style": "list" } ] } ```