Hi @ben_hp ,
Instead of directly accessing the /libs/granite/taskmanager/updatetask
URL, you can use the TaskManager API provided by AEM.
Task task = taskManager.getTask(taskId);
if (task != null) {
// Update the task's state
task.setState(newState);
// Save the changes
taskManager.updateTask(task);
}