The following PHP code will move an existing Task to another existing Task List.

In your code, change DESTINATION_TASKLIST_ID, TEAMWORK_URL, CURRENT_TASK_ID and BASIC_AUTH_PASSWORD to your our own settings.

<?php

// Report all errors except E_NOTICE
error_reporting(E_ALL & ~E_NOTICE);

$data = array(
'todo-item'=>array(
'tasklistId'=>[DESTINATION_TASKLIST_ID]
)
);

$json = json_encode($data);

$ch = curl_init('http://[TEAMWORK_URL]/tasks/[CURRENT_TASK_ID].json');

$headers = array(
'Content-Type:application/json',
'Authorization: Basic [BASIC_AUTH_PASSWORD]'
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_POSTFIELDS, $json);

$response = curl_exec($ch);

echo $response;