Manage vikanja tasks with curl
Posted on November 12, 2025
Delete tasks of a project
curl -s -H "Authorization: Bearer <TOKEN>" \
"https://vikunja.whysthatso.net/api/v1/projects/18/tasks" \
| jq -r '.[].id' \
| xargs -I {} curl -s -X DELETE \
-H "Authorization: Bearer <TOKEN>" \
"https://vikunja.whysthatso.net/api/v1/tasks/{}"
Reassign tasks to another project
SOURCE_PROJECT_ID=3
TARGET_PROJECT_ID=1
API_TOKEN="<TOKEN>"
BASE_URL="https://vikunja.whysthatso.net/api/v1"
curl -s -H "Authorization: Bearer $API_TOKEN" \
"$BASE_URL/projects/$SOURCE_PROJECT_ID/tasks" \
| jq -r '.[].id' \
| while IFS= read -r task_id; do
if [ -n "$task_id" ]; then
echo "Moving task $task_id -> project $TARGET_PROJECT_ID"
curl -s --fail -X PUT \
-H "Authorization: Bearer $API_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"project_id\": $TARGET_PROJECT_ID}" \
"$BASE_URL/tasks/$task_id" \
|| echo " FAILED to move $task_id"
fi
done
Hey! I'll happily receive your comments
via email.
Thanks for reading.
Andreas Wagner
freelance System Administrator and Ruby programmer in Tallinn, Estonia