### Project By ID Response Example (JSON) Source: https://developer.ticktick.com/index This snippet provides an example of a JSON response when retrieving a single project by its ID. It includes project-specific details such as ID, name, color, and view mode. ```JSON { "id": "6226ff9877acee87727f6bca", "name": "project name", "color": "#F18181", "closed": false, "groupId": "6436176a47fd2e05f26ef56e", "viewMode": "list", "kind": "TASK" } ``` -------------------------------- ### User Projects Response Example (JSON) Source: https://developer.ticktick.com/index This snippet provides an example of a JSON array response when requesting user projects. Each project object includes details like ID, name, color, and permissions. ```JSON [ { "id": "6226ff9877acee87727f6bca", "name": "project name", "color": "#F18181", "closed": false, "groupId": "6436176a47fd2e05f26ef56e", "viewMode": "list", "permission": "write", "kind": "TASK" } ] ``` -------------------------------- ### Get User Projects Request (HTTP) Source: https://developer.ticktick.com/index This snippet shows the HTTP GET request to retrieve a list of all projects associated with the user. It requires an authorization token. ```HTTP GET /open/v1/project HTTP/1.1 Host: api.ticktick.com Authorization: Bearer {{token}} ``` -------------------------------- ### Task Response Example (JSON) Source: https://developer.ticktick.com/index This snippet provides an example of a JSON response when retrieving task details. It outlines the structure and fields returned for a task, including its ID, title, content, dates, and associated items. ```JSON { "id" : "63b7bebb91c0a5474805fcd4", "projectId" : "6226ff9877acee87727f6bca", "title" : "Task Title", "content" : "Task Content", "desc" : "Task Description", "isAllDay" : true, "startDate" : "2019-11-13T03:00:00+0000", "dueDate" : "2019-11-14T03:00:00+0000", "timeZone" : "America/Los_Angeles", "reminders" : [ "TRIGGER:P0DT9H0M0S", "TRIGGER:PT0S" ], "repeatFlag" : "RRULE:FREQ=DAILY;INTERVAL=1", "priority" : 1, "status" : 0, "completedTime" : "2019-11-13T03:00:00+0000", "sortOrder" : 12345, "items" : [ { "id" : "6435074647fd2e6387145f20", "status" : 1, "title" : "Item Title", "sortOrder" : 12345, "startDate" : "2019-11-13T03:00:00+0000", "isAllDay" : false, "timeZone" : "America/Los_Angeles", "completedTime" : "2019-11-13T03:00:00+0000" } ], "kind": "CHECKLIST" } ``` -------------------------------- ### Get User Projects API Source: https://developer.ticktick.com/index Retrieves a list of all projects associated with the authenticated user. The response is an array of project objects. ```APIDOC ## GET /open/v1/project ### Description Retrieves a list of all projects associated with the authenticated user. The response is an array of project objects. ### Method GET ### Endpoint /open/v1/project ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ``` GET /open/v1/project HTTP/1.1 Host: api.ticktick.com Authorization: Bearer {{token}} ``` ### Response #### Success Response (200) - **Project** (array) - An array of project objects. - **id** (string) - Unique identifier for the project. - **name** (string) - Name of the project. - **color** (string) - Color associated with the project. - **closed** (boolean) - Indicates if the project is closed. - **groupId** (string) - Identifier for the group the project belongs to. - **viewMode** (string) - The view mode of the project (e.g., "list"). - **permission** (string) - User's permission level for the project. - **kind** (string) - Type of the project (e.g., "TASK"). #### Response Example ```json [ { "id": "6226ff9877acee87727f6bca", "name": "project name", "color": "#F18181", "closed": false, "groupId": "6436176a47fd2e6387145f20", "viewMode": "list", "permission": "write", "kind": "TASK" } ] ``` #### Error Responses - **401** Unauthorized - **403** Forbidden - **404** Not Found ``` -------------------------------- ### Get Project By ID Request (HTTP) Source: https://developer.ticktick.com/index This snippet shows the HTTP GET request to retrieve details for a specific project using its ID. The project ID is included as a path parameter. ```HTTP GET /open/v1/project/{projectId} HTTP/1.1 Host: api.ticktick.com Authorization: Bearer {{token}} ``` -------------------------------- ### Get Project With Data API Source: https://developer.ticktick.com/index Retrieves comprehensive data for a specific project, including tasks and other related information. Requires the project ID as a path parameter. ```APIDOC ## GET /open/v1/project/{projectId}/data ### Description Retrieves comprehensive data for a specific project, including tasks and other related information. Requires the project ID as a path parameter. ### Method GET ### Endpoint /open/v1/project/{projectId}/data ### Parameters #### Path Parameters - **projectId** (string) - Required - Project identifier. #### Query Parameters None #### Request Body None ### Request Example ``` GET /open/v1/project/{{projectId}}/data HTTP/1.1 Host: api.ticktick.com Authorization: Bearer {{token}} ``` ### Response #### Success Response (200) - **ProjectData** (object) - Contains all data associated with the project. #### Error Responses - **401** Unauthorized - **403** Forbidden - **404** Not Found ``` -------------------------------- ### Get Project Data Request (HTTP) Source: https://developer.ticktick.com/index This snippet shows the HTTP GET request to retrieve data associated with a specific project. The project ID is required as a path parameter. ```HTTP GET /open/v1/project/{projectId}/data HTTP/1.1 Host: api.ticktick.com Authorization: Bearer {{token}} ``` -------------------------------- ### API Reference - Get Task By Project ID and Task ID Source: https://developer.ticktick.com/index This GET request retrieves a specific task using its project ID and task ID. It requires 'projectId' and 'taskId' as path parameters and an 'Authorization' header with a Bearer token. ```HTTP GET /open/v1/project/{projectId}/task/{taskId} HTTP/1.1 Host: api.ticktick.com Authorization: Bearer {{token}} ``` ```JSON { "id" : "63b7bebb91c0a5474805fcd4", "isAllDay" : true, "projectId" : "6226ff9877acee87727f6bca", "title" : "Task Title", "content" : "Task Content", "desc" : "Task Description", "timeZone" : "America/Los_Angeles", "repeatFlag" : "RRULE:FREQ=DAILY;INTERVAL=1", "startDate" : "2019-11-13T03:00:00+0000", "dueDate" : "2019-11-14T03:00:00+0000", "reminders" : [ "TRIGGER:P0DT9H0M0S", "TRIGGER:PT0S" ], "priority" : 1, "status" : 0, "completedTime" : "2019-11-13T03:00:00+0000", "sortOrder" : 12345, "items" : [ { "id" : "6435074647fd2e6387145f20", "status" : 0, "title" : "Item Title", "sortOrder" : 12345, "startDate" : "2019-11-13T03:00:00+0000", "isAllDay" : false, "timeZone" : "America/Los_Angeles", "completedTime" : "2019-11-13T03:00:00+0000" } ] } ``` -------------------------------- ### Get Project By ID API Source: https://developer.ticktick.com/index Retrieves details for a specific project using its unique identifier. The response contains a single project object. ```APIDOC ## GET /open/v1/project/{projectId} ### Description Retrieves details for a specific project using its unique identifier. The response contains a single project object. ### Method GET ### Endpoint /open/v1/project/{projectId} ### Parameters #### Path Parameters - **projectId** (string) - Required - Project identifier. #### Query Parameters None #### Request Body None ### Request Example ``` GET /open/v1/project/{{projectId}} HTTP/1.1 Host: api.ticktick.com Authorization: Bearer {{token}} ``` ### Response #### Success Response (200) - **Project** (object) - Project details. - **id** (string) - Unique identifier for the project. - **name** (string) - Name of the project. - **color** (string) - Color associated with the project. - **closed** (boolean) - Indicates if the project is closed. - **groupId** (string) - Identifier for the group the project belongs to. - **viewMode** (string) - The view mode of the project (e.g., "list"). - **kind** (string) - Type of the project (e.g., "TASK"). #### Response Example ```json { "id": "6226ff9877acee87727f6bca", "name": "project name", "color": "#F18181", "closed": false, "groupId": "6436176a47fd2e6387145f20", "viewMode": "list", "kind": "TASK" } ``` #### Error Responses - **401** Unauthorized - **403** Forbidden - **404** Not Found ``` -------------------------------- ### GET /open/v1/project/{projectId}/task/{taskId} Source: https://developer.ticktick.com/index Retrieves a specific task within a project using its project ID and task ID. ```APIDOC ## GET /open/v1/project/{projectId}/task/{taskId} ### Description Retrieves a specific task within a project using its project ID and task ID. ### Method GET ### Endpoint `/open/v1/project/{projectId}/task/{taskId}` ### Parameters #### Path Parameters - **projectId** (string) - Required - Project identifier - **taskId** (string) - Required - Task identifier ### Request Example ```http GET /open/v1/project/{{projectId}}/task/{{taskId}} HTTP/1.1 Host: api.ticktick.com Authorization: Bearer {{token}} ``` ### Response #### Success Response (200 OK) - **id** (string) - Task identifier - **isAllDay** (boolean) - Whether the task is an all-day event - **projectId** (string) - Identifier of the project the task belongs to - **title** (string) - The title of the task - **content** (string) - Detailed content of the task - **desc** (string) - Description of the task - **timeZone** (string) - Time zone of the task - **repeatFlag** (string) - Recurrence rule for the task (e.g., `RRULE:FREQ=DAILY;INTERVAL=1`) - **startDate** (string) - Start date and time of the task (ISO 8601 format) - **dueDate** (string) - Due date and time of the task (ISO 8601 format) - **reminders** (array) - Array of reminder triggers (e.g., `["TRIGGER:P0DT9H0M0S", "TRIGGER:PT0S"]`) - **priority** (integer) - Priority level of the task (e.g., 1) - **status** (integer) - Status of the task (e.g., 0 for incomplete) - **completedTime** (string) - Completion date and time of the task (ISO 8601 format) - **sortOrder** (integer) - Sorting order of the task - **items** (array) - Sub-items within the task (if any) - **id** (string) - Sub-item identifier - **status** (integer) - Status of the sub-item - **title** (string) - Title of the sub-item - **sortOrder** (integer) - Sorting order of the sub-item - **startDate** (string) - Start date and time of the sub-item - **isAllDay** (boolean) - Whether the sub-item is an all-day event - **timeZone** (string) - Time zone of the sub-item - **completedTime** (string) - Completion date and time of the sub-item #### Response Example (200 OK) ```json { "id" : "63b7bebb91c0a5474805fcd4", "isAllDay" : true, "projectId" : "6226ff9877acee87727f6bca", "title" : "Task Title", "content" : "Task Content", "desc" : "Task Description", "timeZone" : "America/Los_Angeles", "repeatFlag" : "RRULE:FREQ=DAILY;INTERVAL=1", "startDate" : "2019-11-13T03:00:00+0000", "dueDate" : "2019-11-14T03:00:00+0000", "reminders" : [ "TRIGGER:P0DT9H0M0S", "TRIGGER:PT0S" ], "priority" : 1, "status" : 0, "completedTime" : "2019-11-13T03:00:00+0000", "sortOrder" : 12345, "items" : [ { "id" : "6435074647fd2e6387145f20", "status" : 0, "title" : "Item Title", "sortOrder" : 12345, "startDate" : "2019-11-13T03:00:00+0000", "isAllDay" : false, "timeZone" : "America/Los_Angeles", "completedTime" : "2019-11-13T03:00:00+0000" } ] } ``` #### Error Responses - **401** Unauthorized: No Content - **403** Forbidden: No Content - **404** Not Found: No Content ``` -------------------------------- ### Authorization - Get Access Token Source: https://developer.ticktick.com/index This section details the OAuth2 flow to obtain an access token required for authenticating API requests. ```APIDOC ## Authorization - Get Access Token ### Description This section details the OAuth2 flow to obtain an access token required for authenticating API requests. ### Method GET (for redirect) / POST (for token exchange) ### Endpoints 1. **Authorization Page:** `https://ticktick.com/oauth/authorize` 2. **Token Exchange:** `https://ticktick.com/oauth/token` ### Parameters #### Step 1: Authorization Request **Query Parameters** - **client_id** (string) - Required - Application unique id - **scope** (string) - Required - Spaces-separated permission scope (e.g., `tasks:write tasks:read`) - **state** (string) - Required - Passed to redirect url as is - **redirect_uri** (string) - Required - User-configured redirect url - **response_type** (string) - Required - Fixed as `code` **Example Request URL:** `https://ticktick.com/oauth/authorize?scope=tasks:read&client_id=YOUR_CLIENT_ID&state=YOUR_STATE&redirect_uri=YOUR_REDIRECT_URI&response_type=code` #### Step 2: Redirect from TickTick **Query Parameters** - **code** (string) - Required - Authorization code for subsequent access tokens - **state** (string) - Required - State parameter passed in the first step #### Step 3: Token Exchange Request **Request Body Parameters** (Content-Type: application/x-www-form-urlencoded) - **client_id** (string) - Required - Application unique id - **client_secret** (string) - Required - Application secret - **code** (string) - Required - The code obtained in the second step - **grant_type** (string) - Required - Fixed as `authorization_code` - **scope** (string) - Required - Spaces-separated permission scope (e.g., `tasks:write tasks:read`) - **redirect_uri** (string) - Required - User-configured redirect url ### Request Example (Token Exchange) ``` POST https://ticktick.com/oauth/token Content-Type: application/x-www-form-urlencoded client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&code=AUTHORIZATION_CODE&grant_type=authorization_code&scope=tasks:read&redirect_uri=YOUR_REDIRECT_URI ``` ### Response #### Success Response (200 OK) - **access_token** (string) - The access token for API requests. - **token_type** (string) - The type of token (e.g., `Bearer`). - **expires_in** (integer) - The expiration time of the token in seconds. - **refresh_token** (string) - The refresh token to obtain a new access token. - **scope** (string) - The granted scopes. #### Response Example (Token Exchange) ```json { "access_token": "YOUR_ACCESS_TOKEN", "token_type": "Bearer", "expires_in": 86400, "refresh_token": "YOUR_REFRESH_TOKEN", "scope": "tasks:read" } ``` ### Request OpenAPI Set **Authorization** in the header, the value is **Bearer** `access token value` ``` Authorization: Bearer YOUR_ACCESS_TOKEN ``` ``` -------------------------------- ### Get Access Token - Redirect to Authorization Page Source: https://developer.ticktick.com/index This step involves redirecting the user to the TickTick authorization page to initiate the OAuth2 flow. Required parameters include client_id, scope, state, redirect_uri, and response_type. ```URL https://ticktick.com/oauth/authorize?scope=scope&client_id=client_id&state=state&redirect_uri=redirect_uri&response_type=code ``` -------------------------------- ### Get Access Token - Exchange Code for Token Source: https://developer.ticktick.com/index After obtaining an authorization code, this POST request exchanges it for an access token. It requires client_id, client_secret, code, grant_type, scope, and redirect_uri. The response contains the access_token. ```HTTP POST https://ticktick.com/oauth/token Content-Type: application/x-www-form-urlencoded client_id=YOUR_CLIENT_ID&client_secret=YOUR_CLIENT_SECRET&code=AUTHORIZATION_CODE&grant_type=authorization_code&scope=tasks:write tasks:read&redirect_uri=YOUR_REDIRECT_URI ``` ```JSON { "access_token": "access token value" } ``` -------------------------------- ### Create Project Source: https://developer.ticktick.com/index Creates a new project with specified details. You can set the project name, color, view mode, and kind. ```APIDOC ## POST /open/v1/project ### Description Creates a new project with specified details. You can set the project name, color, view mode, and kind. ### Method POST ### Endpoint /open/v1/project ### Parameters #### Query Parameters None #### Request Body - **name** (string) - Required - Name of the project - **color** (string) - Optional - Color of the project, e.g., "#F18181" - **sortOrder** (integer) - Optional - Sort order value of the project - **viewMode** (string) - Optional - View mode, "list", "kanban", "timeline" - **kind** (string) - Optional - Project kind, "TASK", "NOTE" ### Request Example ```json { "name": "project name", "color": "#F18181", "viewMode": "list", "kind": "task" } ``` ### Response #### Success Response (200) - **id** (string) - Project identifier - **name** (string) - Project name - **color** (string) - Project color - **sortOrder** (integer) - Project sort order - **viewMode** (string) - Project view mode - **kind** (string) - Project kind #### Response Example ```json { "id": "6226ff9877acee87727f6bca", "name": "project name", "color": "#F18181", "sortOrder": 0, "viewMode": "list", "kind": "TASK" } ``` ``` -------------------------------- ### Create Project API Request (JSON) Source: https://developer.ticktick.com/index This snippet demonstrates how to create a new project using the TickTick API. It includes the endpoint, HTTP method, headers, and a JSON payload for the request body. The response schema for a successful creation is also provided. ```json { "project": { "id": "6226ff9877acee87727f6bca", "name": "project name", "color": "#F18181", "closed": false, "groupId": "6436176a47fd2e05f26ef56e", "viewMode": "list", "kind": "TASK" }, "tasks": [ { "id": "6247ee29630c800f064fd145", "isAllDay": true, "projectId": "6226ff9877acee87727f6bca", "title": "Task Title", "content": "Task Content", "desc": "Task Description", "timeZone": "America/Los_Angeles", "repeatFlag": "RRULE:FREQ=DAILY;INTERVAL=1", "startDate": "2019-11-13T03:00:00+0000", "dueDate": "2019-11-14T03:00:00+0000", "reminders": [ "TRIGGER:P0DT9H0M0S", "TRIGGER:PT0S" ], "priority": 1, "status": 0, "completedTime": "2019-11-13T03:00:00+0000", "sortOrder": 12345, "items": [ { "id": "6435074647fd2e6387145f20", "status": 0, "title": "Subtask Title", "sortOrder": 12345, "startDate": "2019-11-13T03:00:00+0000", "isAllDay": false, "timeZone": "America/Los_Angeles", "completedTime": "2019-11-13T03:00:00+0000" } ] } ], "columns": [ { "id": "6226ff9e76e5fc39f2862d1b", "projectId": "6226ff9877acee87727f6bca", "name": "Column Name", "sortOrder": 0 } ] } ``` -------------------------------- ### Create Project API Request (HTTP) Source: https://developer.ticktick.com/index This snippet shows the HTTP request for creating a project via the TickTick API. It specifies the POST method, the endpoint '/open/v1/project', required headers like 'Content-Type' and 'Authorization', and a sample JSON body. ```http POST /open/v1/project HTTP/1.1 Host: api.ticktick.com Content-Type: application/json Authorization: Bearer {{token}} { "name": "project name", "color": "#F18181", "viewMode": "list", "kind": "task" } ``` -------------------------------- ### POST /open/v1/task Source: https://developer.ticktick.com/index Creates a new task within TickTick. ```APIDOC ## POST /open/v1/task ### Description Creates a new task within TickTick. ### Method POST ### Endpoint `/open/v1/task` ### Parameters #### Request Body * **title** (string) - Required - The title of the task. * **projectId** (string) - Optional - The ID of the project to which the task belongs. * **content** (string) - Optional - Detailed content of the task. * **desc** (string) - Optional - Description of the task. * **startDate** (string) - Optional - Start date and time of the task (ISO 8601 format). * **dueDate** (string) - Optional - Due date and time of the task (ISO 8601 format). * **reminders** (array) - Optional - Array of reminder triggers (e.g., `["TRIGGER:P0DT9H0M0S"]`). * **repeatFlag** (string) - Optional - Recurrence rule for the task (e.g., `RRULE:FREQ=DAILY;INTERVAL=1`). * **timeZone** (string) - Optional - Time zone of the task (e.g., `America/Los_Angeles`). * **priority** (integer) - Optional - Priority level of the task (e.g., 1). * **status** (integer) - Optional - Status of the task (e.g., 0 for incomplete). * **isAllDay** (boolean) - Optional - Whether the task is an all-day event. ### Request Example ```json { "title": "New Task Title", "projectId": "6226ff9877acee87727f6bca", "content": "This is the content of the new task.", "dueDate": "2024-12-31T17:00:00+0000", "reminders": ["TRIGGER:P1DT0H0M0S"] } ``` ### Response #### Success Response (201 Created) - **id** (string) - The unique identifier of the newly created task. - **title** (string) - The title of the created task. - **projectId** (string) - The project ID the task was added to. - **content** (string) - The content of the task. - **desc** (string) - The description of the task. - **startDate** (string) - The start date and time of the task. - **dueDate** (string) - The due date and time of the task. - **reminders** (array) - The reminders set for the task. - **repeatFlag** (string) - The recurrence rule for the task. - **timeZone** (string) - The time zone of the task. - **priority** (integer) - The priority of the task. - **status** (integer) - The status of the task. - **isAllDay** (boolean) - Whether the task is an all-day event. - **createdTime** (string) - The creation timestamp of the task. - **updatedTime** (string) - The last update timestamp of the task. #### Response Example (201 Created) ```json { "id": "65a8b1e391c0a5474805fcd5", "title": "New Task Title", "projectId": "6226ff9877acee87727f6bca", "content": "This is the content of the new task.", "desc": null, "startDate": null, "dueDate": "2024-12-31T17:00:00+0000", "reminders": ["TRIGGER:P1DT0H0M0S"], "repeatFlag": null, "timeZone": null, "priority": 0, "status": 0, "isAllDay": false, "createdTime": "2024-01-17T10:30:00+0000", "updatedTime": "2024-01-17T10:30:00+0000" } ``` #### Error Responses - **400** Bad Request: Invalid input parameters. - **401** Unauthorized: Authentication failed. - **403** Forbidden: Insufficient permissions. ``` -------------------------------- ### Create Task Request (HTTP) Source: https://developer.ticktick.com/index This snippet shows the HTTP request format for creating a new task. It includes the endpoint, host, content type, authorization header, and a JSON payload with task details. ```HTTP POST /open/v1/task/{{taskId}} HTTP/1.1 Host: api.ticktick.com Content-Type: application/json Authorization: Bearer {{token}} { "id": "{{taskId}}", "projectId": "{{projectId}}", "title": "Task Title", "priority": 1, ... } ``` -------------------------------- ### POST /open/v1/task/{{taskId}} Source: https://developer.ticktick.com/index This endpoint allows for the creation or update of a task within a project. It accepts task details in the request body and returns the updated task information. ```APIDOC ## POST /open/v1/task/{{taskId}} ### Description This endpoint allows for the creation or update of a task within a project. It accepts task details in the request body and returns the updated task information. ### Method POST ### Endpoint /open/v1/task/{{taskId}} ### Parameters #### Path Parameters - **taskId** (string) - Required - The ID of the task to be updated or created. #### Query Parameters None #### Request Body - **id** (string) - Required - The ID of the task. - **projectId** (string) - Required - The ID of the project the task belongs to. - **title** (string) - Required - The title of the task. - **priority** (integer) - Optional - The priority level of the task (e.g., 1 for highest). ### Request Example ```json { "id": "{{taskId}}", "projectId": "{{projectId}}", "title": "Task Title", "priority": 1 } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the task. - **projectId** (string) - The identifier of the project the task belongs to. - **title** (string) - The title of the task. - **content** (string) - The detailed content or description of the task. - **desc** (string) - A short description for the task. - **isAllDay** (boolean) - Indicates if the task is an all-day event. - **startDate** (string) - The start date and time of the task. - **dueDate** (string) - The due date and time of the task. - **timeZone** (string) - The time zone associated with the task's dates. - **reminders** (array) - An array of reminder settings for the task. - **repeatFlag** (string) - Specifies the recurrence rule for the task. - **priority** (integer) - The priority level of the task. - **status** (integer) - The current status of the task (e.g., 0 for open, 1 for completed). - **completedTime** (string) - The date and time when the task was completed. - **sortOrder** (integer) - The order in which the task should be displayed. - **items** (array) - A list of sub-items or checklist items within the task. - **kind** (string) - The type of the task (e.g., "CHECKLIST"). #### Response Example ```json { "id" : "63b7bebb91c0a5474805fcd4", "projectId" : "6226ff9877acee87727f6bca", "title" : "Task Title", "content" : "Task Content", "desc" : "Task Description", "isAllDay" : true, "startDate" : "2019-11-13T03:00:00+0000", "dueDate" : "2019-11-14T03:00:00+0000", "timeZone" : "America/Los_Angeles", "reminders" : [ "TRIGGER:P0DT9H0M0S", "TRIGGER:PT0S" ], "repeatFlag" : "RRULE:FREQ=DAILY;INTERVAL=1", "priority" : 1, "status" : 0, "completedTime" : "2019-11-13T03:00:00+0000", "sortOrder" : 12345, "items" : [ { "id" : "6435074647fd2e6387145f20", "status" : 1, "title" : "Item Title", "sortOrder" : 12345, "startDate" : "2019-11-13T03:00:00+0000", "isAllDay" : false, "timeZone" : "America/Los_Angeles", "completedTime" : "2019-11-13T03:00:00+0000" } ], "kind": "CHECKLIST" } ``` ``` -------------------------------- ### POST /open/v1/task Source: https://developer.ticktick.com/index Creates a new task in TickTick. Requires a title and projectId. Supports various fields for task details, dates, reminders, and subtasks. ```APIDOC ## POST /open/v1/task ### Description Creates a new task in TickTick. Requires a title and projectId. Supports various fields for task details, dates, reminders, and subtasks. ### Method POST ### Endpoint /open/v1/task ### Parameters #### Request Body - **title** (string) - Required - Task title - **projectId** (string) - Required - Project id - **content** (string) - Optional - Task content - **desc** (string) - Optional - Description of checklist - **isAllDay** (boolean) - Optional - All day - **startDate** (date) - Optional - Start date and time in "yyyy-MM-dd'T'HH:mm:ssZ" format - **dueDate** (date) - Optional - Due date and time in "yyyy-MM-dd'T'HH:mm:ssZ" format - **timeZone** (string) - Optional - The time zone in which the time is specified - **reminders** (list) - Optional - Lists of reminders specific to the task - **repeatFlag** (string) - Optional - Recurring rules of task - **priority** (integer) - Optional - The priority of task, default is "0" - **sortOrder** (integer) - Optional - The order of task - **items** (list) - Optional - The list of subtasks - **items.title** (string) - Subtask title - **items.startDate** (date) - Start date and time in "yyyy-MM-dd'T'HH:mm:ssZ" format - **items.isAllDay** (boolean) - All day - **items.sortOrder** (integer) - The order of subtask - **items.timeZone** (string) - The time zone in which the Start time is specified - **items.status** (integer) - The completion status of subtask - **items.completedTime** (date) - Completed time in "yyyy-MM-dd'T'HH:mm:ssZ" format ### Request Example ```json { "title":"Task Title", "projectId":"6226ff9877acee87727f6bca" // ... other optional fields } ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier for the created task. - **projectId** (string) - The project ID the task belongs to. - **title** (string) - The title of the task. - **content** (string) - The content of the task. - **desc** (string) - The description of the task. - **isAllDay** (boolean) - Indicates if the task is an all-day event. - **startDate** (date) - The start date and time of the task. - **dueDate** (date) - The due date and time of the task. - **timeZone** (string) - The time zone of the task. - **reminders** (list) - A list of reminders for the task. - **repeatFlag** (string) - The recurrence rule for the task. - **priority** (integer) - The priority level of the task. - **status** (integer) - The status of the task. - **completedTime** (date) - The time the task was completed. - **sortOrder** (integer) - The sort order of the task. - **items** (list) - A list of subtasks associated with the task. - **items.id** (string) - The unique identifier for the subtask. - **items.status** (integer) - The completion status of the subtask. - **items.title** (string) - The title of the subtask. - **items.sortOrder** (integer) - The sort order of the subtask. - **items.startDate** (date) - The start date and time of the subtask. - **items.isAllDay** (boolean) - Indicates if the subtask is an all-day event. - **items.timeZone** (string) - The time zone of the subtask. - **items.completedTime** (date) - The time the subtask was completed. #### Response Example ```json { "id" : "63b7bebb91c0a5474805fcd4", "projectId" : "6226ff9877acee87727f6bca", "title" : "Task Title", "content" : "Task Content", "desc" : "Task Description", "isAllDay" : true, "startDate" : "2019-11-13T03:00:00+0000", "dueDate" : "2019-11-14T03:00:00+0000", "timeZone" : "America/Los_Angeles", "reminders" : [ "TRIGGER:P0DT9H0M0S", "TRIGGER:PT0S" ], "repeatFlag" : "RRULE:FREQ=DAILY;INTERVAL=1", "priority" : 1, "status" : 0, "completedTime" : "2019-11-13T03:00:00+0000", "sortOrder" : 12345, "items" : [ { "id" : "6435074647fd2e6387145f20", "status" : 1, "title" : "Subtask Title", "sortOrder" : 12345, "startDate" : "2019-11-13T03:00:00+0000", "isAllDay" : false, "timeZone" : "America/Los_Angeles", "completedTime" : "2019-11-13T03:00:00+0000" } ] } ``` ``` -------------------------------- ### Create Task with TickTick API Source: https://developer.ticktick.com/index This snippet demonstrates how to create a new task using the TickTick API. It requires a title and projectId, and optionally accepts content, description, dates, reminders, and subtasks. The API responds with the created task details or an error. ```HTTP POST /open/v1/task HTTP/1.1 Host: api.ticktick.com Content-Type: application/json Authorization: Bearer {{token}} { "title":"Task Title", "projectId":"6226ff9877acee87727f6bca" } ``` -------------------------------- ### API Reference - Create Task Source: https://developer.ticktick.com/index This POST request is used to create a new task within TickTick. The endpoint is '/open/v1/task'. Specific request body details are not provided in this snippet. ```HTTP POST /open/v1/task ``` -------------------------------- ### Complete Task Request (HTTP) Source: https://developer.ticktick.com/index This snippet shows the HTTP request for completing a task. It uses a POST request to a specific endpoint, requiring the project ID and task ID in the URL path, along with authentication. ```HTTP POST /open/v1/project/{projectId}/task/{taskId}/complete HTTP/1.1 Host: api.ticktick.com Authorization: Bearer {{token}} ``` -------------------------------- ### Update Project Source: https://developer.ticktick.com/index Updates an existing project identified by its ID. You can modify the project's name, color, view mode, and kind. ```APIDOC ## POST /open/v1/project/{projectId} ### Description Updates an existing project identified by its ID. You can modify the project's name, color, view mode, and kind. ### Method POST ### Endpoint /open/v1/project/{projectId} ### Parameters #### Path Parameters - **projectId** (string) - Required - Project identifier #### Query Parameters None #### Request Body - **name** (string) - Optional - Name of the project - **color** (string) - Optional - Color of the project - **sortOrder** (integer) - Optional - Sort order value, default 0 - **viewMode** (string) - Optional - View mode, "list", "kanban", "timeline" - **kind** (string) - Optional - Project kind, "TASK", "NOTE" ### Request Example ```json { "name": "Project Name", "color": "#F18181", "viewMode": "list", "kind": "TASK" } ``` ### Response #### Success Response (200) - **id** (string) - Project identifier - **name** (string) - Project name - **color** (string) - Project color - **sortOrder** (integer) - Project sort order - **viewMode** (string) - Project view mode - **kind** (string) - Project kind #### Response Example ```json { "id": "6226ff9877acee87727f6bca", "name": "Project Name", "color": "#F18181", "sortOrder": 0, "viewMode": "list", "kind": "TASK" } ``` ``` -------------------------------- ### Complete Task API Source: https://developer.ticktick.com/index Marks a specific task as complete within a given project. This operation does not return any content in the response body. ```APIDOC ## POST /open/v1/project/{projectId}/task/{taskId}/complete ### Description Marks a specific task as complete within a given project. This operation does not return any content in the response body. ### Method POST ### Endpoint /open/v1/project/{projectId}/task/{taskId}/complete ### Parameters #### Path Parameters - **projectId** (string) - Required - Project identifier. - **taskId** (string) - Required - Task identifier. #### Query Parameters None #### Request Body None ### Request Example ``` POST /open/v1/project/{{projectId}}/task/{{taskId}}/complete HTTP/1.1 Host: api.ticktick.com Authorization: Bearer {{token}} ``` ### Response #### Success Response (200, 201) No Content #### Error Responses - **401** Unauthorized - **403** Forbidden - **404** Not Found ``` -------------------------------- ### Delete Project Source: https://developer.ticktick.com/index Deletes a project identified by its ID. ```APIDOC ## DELETE /open/v1/project/{projectId} ### Description Deletes a project identified by its ID. ### Method DELETE ### Endpoint /open/v1/project/{projectId} ### Parameters #### Path Parameters - **projectId** (string) - Required - Project identifier #### Query Parameters None #### Request Body None ### Request Example ```http DELETE /open/v1/project/{{projectId}} HTTP/1.1 Host: api.ticktick.com Authorization: Bearer {{token}} ``` ### Response #### Success Response (200) No Content #### Response Example No Content ``` -------------------------------- ### Update Project API Request (HTTP) Source: https://developer.ticktick.com/index This snippet illustrates an HTTP request to update an existing project using the TickTick API. It uses the POST method with the endpoint '/open/v1/project/{projectId}', including the project ID in the path and a JSON body with fields to be updated. ```http POST /open/v1/project/{{projectId}} HTTP/1.1 Host: api.ticktick.com Content-Type: application/json Authorization: Bearer {{token}} { "name": "Project Name", "color": "#F18181", "viewMode": "list", "kind": "TASK" } ```