Task Management
This endpoint group provides functionalities for managing tasks, including creation, retrieval, updating, deletion, and adding comments within specific task instances.
Endpoints
POST /api/rpc (Method: TaskRpc.getData)
Description: Retrieves a paginated list of tasks for a given task instance.
Request Body:
{ "method": "TaskRpc.getData", "params": { "taskInstanceId": "string", "filter": {}, "sort": {}, "page": 1, "pageSize": 50 } }Parameters:
Name Type Required Description taskInstanceIdStringYes The ID of the task instance to retrieve tasks from. filterObjectNo An optional object to filter the tasks (e.g., {"status": "todo"}). Defaults to{}.sortObjectNo An optional object to define the sorting order (e.g., {"createdAt": -1}). Defaults to{}.pageNumberNo The page number for pagination. Must be a positive integer. Defaults to 1.pageSizeNumberNo The number of tasks per page. Must be a positive integer. Defaults to 50.Response:
{ "success": true, "data": { "data": [ { "_id": "string", "taskInstanceId": "string", "title": "string", "description": "string | null", "status": "todo | in_progress | in_review | done | blocked", "priority": "low | medium | high | urgent", "assignees": ["string"], "parentId": "string | null", "dueDate": "Date | null", "completedAt": "Date | null", "createdAt": "Date", "updatedAt": "Date", "tags": ["string"], "comments": [ { "commentId": "string (UUID)", "authorContactId": "string", "content": "string", "createdAt": "Date", "updatedAt": "Date | null" } ], "isArchived": "boolean" } ], "totalCount": "number" } }Example (cURL):
curl -X POST https://api.example.com/api/rpc \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "method": "TaskRpc.getData", "params": { "taskInstanceId": "654321098765432109876543", "page": 1, "pageSize": 10, "filter": { "status": "todo" } } }'
POST /api/rpc (Method: TaskRpc.create)
Description: Creates a new task within a specific task instance.
Request Body:
{ "method": "TaskRpc.create", "params": { "taskInstanceId": "string", "title": "string", "description": "string | null", "status": "todo | in_progress | in_review | done | blocked", "priority": "low | medium | high | urgent", "assignees": ["string"], "parentId": "string | null", "dueDate": "Date | null", "completedAt": "Date | null", "tags": ["string"], "comments": [ { "commentId": "string (UUID)", "authorContactId": "string", "content": "string", "createdAt": "Date", "updatedAt": "Date | null" } ], "isArchived": "boolean" } }Parameters:
Name Type Required Description taskInstanceIdStringYes Links this task to its TaskInstance container. titleStringYes The title of the task. descriptionStringNo A detailed description of the task. statusEnumNo The current status of the task. Valid values: todo,in_progress,in_review,done,blocked. Defaults totodo.priorityEnumNo The priority level of the task. Valid values: low,medium,high,urgent. Defaults tomedium.assigneesArray<String>No An array of MessagingContact IDs assigned to this task. Defaults to [].parentIdStringNo The _idof the parent task, if this is a subtask.dueDateDateNo The target completion date for the task. completedAtDateNo The actual completion date of the task. tagsArray<String>No An array of tags associated with the task. Defaults to [].commentsArray<Object>No An array of comment objects associated with the task. Defaults to [].isArchivedBooleanNo Whether this specific task is archived. Defaults to false.Response:
{ "success": true, "data": { "_id": "string", "taskInstanceId": "string", "title": "string", "description": "string | null", "status": "todo | in_progress | in_review | done | blocked", "priority": "low | medium | high | urgent", "assignees": ["string"], "parentId": "string | null", "dueDate": "Date | null", "completedAt": "Date | null", "createdAt": "Date", "updatedAt": "Date", "tags": ["string"], "comments": [ { "commentId": "string (UUID)", "authorContactId": "string", "content": "string", "createdAt": "Date", "updatedAt": "Date | null" } ], "isArchived": "boolean" } }Example (cURL):
curl -X POST https://api.example.com/api/rpc \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "method": "TaskRpc.create", "params": { "taskInstanceId": "654321098765432109876543", "title": "New Feature Implementation", "description": "Develop the 'X' feature according to specifications.", "status": "todo", "priority": "high", "assignees": ["contact_id_1"] } }'
POST /api/rpc (Method: TaskRpc.update)
Description: Updates a task's details.
Request Body:
{ "method": "TaskRpc.update", "params": { "_id": "string", "title": "string", "description": "string | null", "status": "todo | in_progress | in_review | done | blocked", "priority": "low | medium | high | urgent", "assignees": ["string"], "dueDate": "Date | null", "completedAt": "Date | null", "tags": ["string"], "isArchived": "boolean" } }Parameters:
Name Type Required Description _idStringYes The unique identifier of the task to update. titleStringNo The updated title of the task. descriptionStringNo The updated description of the task. statusEnumNo The updated status of the task. Valid values: todo,in_progress,in_review,done,blocked.priorityEnumNo The updated priority level of the task. Valid values: low,medium,high,urgent.assigneesArray<String>No The updated array of MessagingContact IDs assigned to this task. dueDateDateNo The updated target completion date for the task. completedAtDateNo The updated actual completion date of the task. tagsArray<String>No The updated array of tags associated with the task. isArchivedBooleanNo Whether this specific task is archived. Response:
{ "success": true, "data": { "_id": "string", "taskInstanceId": "string", "title": "string", "description": "string | null", "status": "todo | in_progress | in_review | done | blocked", "priority": "low | medium | high | urgent", "assignees": ["string"], "parentId": "string | null", "dueDate": "Date | null", "completedAt": "Date | null", "createdAt": "Date", "updatedAt": "Date", "tags": ["string"], "comments": [ { "commentId": "string (UUID)", "authorContactId": "string", "content": "string", "createdAt": "Date", "updatedAt": "Date | null" } ], "isArchived": "boolean" } }Example (cURL):
curl -X POST https://api.example.com/api/rpc \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "method": "TaskRpc.update", "params": { "_id": "654321098765432109876544", "status": "in_progress", "assignees": ["contact_id_1", "contact_id_2"] } }'
POST /api/rpc (Method: TaskRpc.delete)
Description: Deletes a task and all of its subtasks.
Request Body:
{ "method": "TaskRpc.delete", "params": { "_id": "string" } }Parameters:
Name Type Required Description _idStringYes The unique identifier of the task to delete. Response:
{ "success": true, "data": { "success": "boolean" } }Example (cURL):
curl -X POST https://api.example.com/api/rpc \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "method": "TaskRpc.delete", "params": { "_id": "654321098765432109876545" } }'
POST /api/rpc (Method: TaskRpc.findById)
Description: Retrieves a single task by its ID.
Request Body:
{ "method": "TaskRpc.findById", "params": { "_id": "string" } }Parameters:
Name Type Required Description _idStringYes The unique identifier of the task to retrieve. Response:
{ "success": true, "data": { "_id": "string", "taskInstanceId": "string", "title": "string", "description": "string | null", "status": "todo | in_progress | in_review | done | blocked", "priority": "low | medium | high | urgent", "assignees": ["string"], "parentId": "string | null", "dueDate": "Date | null", "completedAt": "Date | null", "createdAt": "Date", "updatedAt": "Date", "tags": ["string"], "comments": [ { "commentId": "string (UUID)", "authorContactId": "string", "content": "string", "createdAt": "Date", "updatedAt": "Date | null" } ], "isArchived": "boolean" } }Example (cURL):
curl -X POST https://api.example.com/api/rpc \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "method": "TaskRpc.findById", "params": { "_id": "654321098765432109876546" } }'
POST /api/rpc (Method: TaskRpc.addComment)
Description: Adds a comment to a task.
Request Body:
{ "method": "TaskRpc.addComment", "params": { "taskId": "string", "content": "string" } }Parameters:
Name Type Required Description taskIdStringYes The ID of the task to add the comment to. contentStringYes The content of the comment. Must not be empty. Response:
{ "success": true, "data": { "commentId": "string (UUID)", "authorContactId": "string", "content": "string", "createdAt": "Date" } }Example (cURL):
curl -X POST https://api.example.com/api/rpc \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "method": "TaskRpc.addComment", "params": { "taskId": "654321098765432109876547", "content": "This task needs more details on the design." } }'
POST /api/rpc (Method: TaskRpc.createTaskTree)
Description: Creates a hierarchy of tasks (a tree) in a single operation.
Request Body:
{ "method": "TaskRpc.createTaskTree", "params": { "taskInstanceId": "string", "tasks": [ { "title": "string", "description": "string | null", "status": "todo | in_progress | in_review | done | blocked", "priority": "low | medium | high | urgent", "assignees": ["string"], "dueDate": "Date | null", "completedAt": "Date | null", "tags": ["string"], "comments": [ { "commentId": "string (UUID)", "authorContactId": "string", "content": "string", "createdAt": "Date", "updatedAt": "Date | null" } ], "isArchived": "boolean", "subtasks": [ { "title": "string", "description": "string | null", "status": "todo | in_progress | in_review | done | blocked", "priority": "low | medium | high | urgent", "assignees": ["string"], "dueDate": "Date | null", "completedAt": "Date | null", "tags": ["string"], "comments": [ { "commentId": "string (UUID)", "authorContactId": "string", "content": "string", "createdAt": "Date", "updatedAt": "Date | null" } ], "isArchived": "boolean", "subtasks": [] } ] } ] } }Parameters:
Name Type Required Description taskInstanceIdStringYes The ID of the Task Instance (board) to add the tasks to. tasksArray<Object>Yes An array of task objects. Each object can contain a subtasksarray for recursion. Minimum 1 task.tasks[].titleStringYes The title of the task. tasks[].descriptionStringNo A detailed description of the task. tasks[].statusEnumNo The current status of the task. Valid values: todo,in_progress,in_review,done,blocked. Defaults totodo.tasks[].priorityEnumNo The priority level of the task. Valid values: low,medium,high,urgent. Defaults tomedium.tasks[].assigneesArray<String>No An array of MessagingContact IDs assigned to this task. Defaults to [].tasks[].dueDateDateNo The target completion date for the task. tasks[].completedAtDateNo The actual completion date of the task. tasks[].tagsArray<String>No An array of tags associated with the task. Defaults to [].tasks[].commentsArray<Object>No An array of comment objects associated with the task. Defaults to [].tasks[].isArchivedBooleanNo Whether this specific task is archived. Defaults to false.tasks[].subtasksArray<Object>No An array of sub-task objects, recursively following the same structure. Response:
{ "success": true, "data": [ { "_id": "string", "taskInstanceId": "string", "title": "string", "description": "string | null", "status": "todo | in_progress | in_review | done | blocked", "priority": "low | medium | high | urgent", "assignees": ["string"], "parentId": "string | null", "dueDate": "Date | null", "completedAt": "Date | null", "createdAt": "Date", "updatedAt": "Date", "tags": ["string"], "comments": [ { "commentId": "string (UUID)", "authorContactId": "string", "content": "string", "createdAt": "Date", "updatedAt": "Date | null" } ], "isArchived": "boolean" } ] }Example (cURL):
curl -X POST https://api.example.com/api/rpc \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "method": "TaskRpc.createTaskTree", "params": { "taskInstanceId": "654321098765432109876548", "tasks": [ { "title": "Parent Task 1", "subtasks": [ { "title": "Subtask 1.1" }, { "title": "Subtask 1.2", "subtasks": [ { "title": "Sub-subtask 1.2.1" } ] } ] }, { "title": "Parent Task 2" } ] } }'
POST /api/rpc (Method: TaskRpc.archiveTask)
Description: Archives or un-archives a specific task.
Request Body:
{ "method": "TaskRpc.archiveTask", "params": { "taskId": "string", "isArchived": "boolean" } }Parameters:
Name Type Required Description taskIdStringYes The ID of the task to archive or un-archive. isArchivedBooleanYes Set to trueto archive the task,falseto un-archive it.Response:
{ "success": true, "data": { "_id": "string", "taskInstanceId": "string", "title": "string", "description": "string | null", "status": "todo | in_progress | in_review | done | blocked", "priority": "low | medium | high | urgent", "assignees": ["string"], "parentId": "string | null", "dueDate": "Date | null", "completedAt": "Date | null", "createdAt": "Date", "updatedAt": "Date", "tags": ["string"], "comments": [ { "commentId": "string (UUID)", "authorContactId": "string", "content": "string", "createdAt": "Date", "updatedAt": "Date | null" } ], "isArchived": "boolean" } }Example (cURL):
curl -X POST https://api.example.com/api/rpc \ -H "Content-Type: application/json" \ -H "X-API-Key: YOUR_API_KEY" \ -d '{ "method": "TaskRpc.archiveTask", "params": { "taskId": "654321098765432109876549", "isArchived": true } }'