Add the power of the Box AI API to your custom apps at Content Cloud Summit on May 15

Learn more and register!

Delete a task

Delete a task

To remove a task, call the DELETE /tasks/:task_id API with the id of the task.

cURL
curl -i -X DELETE "https://api.box.com/2.0/tasks/12345" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
.NET
await client.TasksManager.DeleteTaskAsync("11111");
Java
BoxTask task = new BoxTask(api, "id");
task.delete();
Python
client.client.task('12345').delete()
print('The task was successfully delete!')
Node
client.tasks.delete('11111')
	.then(() => {
		// deletion succeeded — no value returned
	});
TypeScript (Beta)
await client.tasks.deleteTaskById(task.id!);
Python (Beta)
client.tasks.delete_task_by_id(task.id)
.NET (Beta)
await client.Tasks.DeleteTaskByIdAsync(taskId: NullableUtils.Unwrap(task.Id));